Search code examples
pythonbsplinenurbs

Find the center of Curvature of a point on 3D b-spline using nurbs / geomdl in python


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?


Solution

  • 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).