Curve derivatives

Any explanation why the second degree of the derivative is not perpendicular to the curve?

In this case i have nurb curve and non uniform controlpoints. But if i rebuild the curve with equal spacing points then it works so curve derivative components show right direction of the tangent (1st degree) and normal vector (2nd degree).

I have been studying more deeper the frenet-serret equations. And iam concluding that because arc length / domain has effect on the TNB frame. But still my thoughts are not completely clear with the logic.

If someone can explain why grasshopper showing weird vector directions and what its justification, i would be happy to take the insight.
Curve derivatives.gh (14.0 KB)

show right direction of the tangent (1st degree) and normal vector (2nd degree).

You are confusing stuff. Try rotating the tangent vector by 90° in the respective plane to get the normal vector.

See crv derivatives acc the available RC Methods.

Crv_DerivativesEntryLevel_V0.gh (14.8 KB)

Yes sure we can use easier ways to get solutions. My question was meant to understand the mathmatical logic behind it

Google nurbs derivatives: tons of related literature around - including de Boor implementations (BTW: if you know how to code it’s waaaaaaaay easier to understand what’s going on).

BTW: The all time classic :

1 Like

The second deriviative of a curve with respect to the arc length will be normal to the curve. As long as the curve parameter used for the derivative is porportional to the arc length then the second derivative will be perpendicular to the curve. In general the parameter of a NURBS curve will not be proportional to the second derivative. When you rebuild a curve with a lot of equally space points the resulting curve has a parameter which wil be close to the arc length; the more points the closer it will be.

1 Like

Thanks, if we have a long curve with multiple turns. how is then the arc length calculated at certain curve parameter? is it like a portion of the whole curve? or is it arc of circle which is created by the tangent at parameter? i could be asking wrong/stupid question.

Arc length is the distance along a curve between two points. A derivative with respect to arc length is independent of the location along the curve of the starting point for measuring arc length.

Note that arc length does not need to be calculated for determining the curvature of a parametric curve. There is a general formula for curvature which uses derivatives with respect to the parameter. Curvature - Wikipedia

Thanks for the response. Smart explanation :slight_smile: