1

I have a set of coordinates, and for research purposes, I need to make a program that can take this set of coordinates, and approximate a curvature from the set. Say for example a set; (0,0) (1,1), (2,2),(3,3),(2,4),(1,5), (0,6).

The data can be from any orientation, so I can't explicitly use, say a 2. degree polynomial, and find the curvature of that function. I need to be able to find the curvature no matter the orientation. The data will always be part of a circle, but depending on the measurement it will be completely differently orientated.

What I mean with orientation is this:

Orientation 1

Or this:

Orientation 2

These pictures do not represent my actual measurement data, it's just a few quick sketches to show how the measurements are made. The languages I understand best are Python and Matlab, so suggestions in those are greatly appreciated.

Yoni
  • 1,346
  • 3
  • 16
  • 38
PinnIver
  • 33
  • 6
  • Hi! Thanks for answering. I edited the op with some pictures to try and explain what I mean with the orientation. I would love to be able to just fit a circle into the data, but my experience with programming is limited, so I havent found an easy way to do that yet. – PinnIver Sep 13 '17 at 13:54
  • Neither of the data sets in your examples corresponds to a circle. They also don't have constant curvature, so it's still not at all clear what you're asking here. – r3mainer Sep 13 '17 at 14:00
  • The pictures I edited in are just a quick sketch, I know those points would not correnspond to a circle, but the actual coordinate data from the measurements will approxmate a circle. The images were just something I quickly threw together to try and explain what I meant. – PinnIver Sep 13 '17 at 14:03
  • @PinnIver Then please explain what you mean by "orientation". Surely a circle will always look the same no matter which direction it is oriented in? – r3mainer Sep 13 '17 at 14:07
  • Possible duplicate of [How do I calculate radius of curvature from discrete samples?](https://stackoverflow.com/questions/27095399/how-do-i-calculate-radius-of-curvature-from-discrete-samples) – m7913d Sep 13 '17 at 14:14
  • @squeamishossifrage What I mean is that I get data which describes coordinates in a 2d space. This coordinates describe a pathway in the form of a circle. However, the data we have is limited, so I dont have the entire circle, only a part of it, say for example the upper left corner, or the top half if I'm lucky. The point of the measurements are to try and find that circle which the data partially describes. – PinnIver Sep 13 '17 at 14:15
  • @PinnIver In that case your question has already been asked several times already. m7913d has provided one example above. [Here's another.](https://stackoverflow.com/q/26574945/1679849) Good luck. – r3mainer Sep 13 '17 at 14:17

1 Answers1

3

You didn't write any code, so I won't either.

If every point is on a circle, you can just keep 3 of them. Their coordinates provide enough information to uniquely define a circle.

You're looking for the circumcenter of the triangle : it's at the intersection of the perpendicular bisectors.

Once you have the center of the circumscribed circle, you can calculate its radius and its curvature.

Eric Duminil
  • 52,989
  • 9
  • 71
  • 124