5

Once again I am in over my head so please bear with me.

I have a B-spline (imported from Solidworks) that I can analyze with geomdl in python.
From geomdl I can extract the first and second derivatives as well as the tangent, normal, and binormal vectors for any given point on the spline.

From there I can calculate the curvature at that point from the first and second derivatives.

However I am not able to determine which way the curve is turning.

I would like to find the point that is at the center of curvature of current point of interest on the bspline.

I 'think' that the tangent vector and the normal vector both lie on the osculating plane of interest. The cross product would then give me the normal to the osculating plane. However I can not make this work.

At a minimum I need to know which way the curve is bending. i.e. CW or CCW.

But if I have the point at the center of curvature I would know pretty much everything about that point.

Is this correct?

To restate the question:

Given a point, the derivatives of the curve at that point, and and the Tangent, Normal, and BiNormal vectors, how do I find the center of curvature?

Burtski
  • 451
  • 5
  • 19

1 Answers1

5

Given a parametric curve C(t) and the first and 2nd derivatives C'(t) and C"(t), the curvature vector can be found

K(t) = m1*C"(t) - m2*C'(t)

where

m1 = 1.0/||C'(t)||^2 and m2 = m1*m1 * C'(t) \dot C"(t). 

From K(t), you can find the radius of curvature R(t) as

R(t) = K(t)/||K(t)||^2

and then the center of curvature is C(t)+R(t).

fang
  • 3,473
  • 1
  • 13
  • 19
  • Thank you. Would you be so kind to verify my math? C(t)= [ 242.949044 523.309432 -193.332342] C'(t)=[ -242.036209 -1065.603250 1037.828873] C''(t)=[-4426.444466 -0.274063 -1090.593028]. I believe the center of curvature to be at [-241.518674 520.192740 -309.517090]. Seams reasonable but I have no good way to verify. Thank you again. You have saved me three times now. – Burtski Jun 24 '20 at 19:01
  • 1
    Glad I can help. I did my calculation based on your data and the result is the same as yours. The best way to verify your codes is to use an exact circle to test and see if the result is the same as circle's center. You also need to check for the "zero curvature" cases in your codes. – fang Jun 24 '20 at 19:48
  • Would you be able to explain why the parentheses in "m1 = 1.0/||C'(t||^2" is not closed? Is it formatting or possibly just a typo? They way SO is colouring everything is making it hard for me to read so i may have missed the other, Additionally, what is the use of the back slash before the dot? – ZXYNINE Apr 14 '22 at 20:55
  • 1
    It is just a typo. It is corrected now. Good catch. The "\dot" simply means inner product. It is hard to write math formula as Stack Overflow does not enable MathJax. – fang Apr 14 '22 at 21:33