I have been searching in the forum for days, but couldn’t really find answer to my question about CDiv (Curve Derivatives) component in Grasshopper. I understand that the 1st derivative is tangent and the 2nd is curvature. It seems like the first in the component represents correct information-parallel to tangent vector at a given point, but I don’t understand why the 2nd differs from the direction of actual curvature vector. Could someone please shed some light on it?
This is a incorrect assumption based on school math.
see this:
basically what you need to do is:
get a Frenet Frame, however this can flip normals in some situations. Better is a “Bishop Frame”
Its basically a comparision between the Frenet Frame at t and a Fernet Frame at t-tinystep.
Its nothing difficult. Just simple Vector operations.
A Frenet frame at t:
tangent= normalize(N’(t))
v= normalize(tangent+ N’’(t))
r = normalize(v × tangent)
normal = normalize(r × tangent)
Edit “Bishop Frames” are also know as “Rotation Minimising Frames”
Thank you for the good explanation. Please excuse my lack of knowledge on differential geometry, but is it fair to say that a curvature vector that we are given from a gh component is just an approximation or just for visualization purpose?
A derivation of a NurbsCurve is a NurbsCurve of lower order.
Since you evaluate for a specific t in three dimensions you get a three dimensional vector back. This vector however doesn’t have anything to do with the normal of a curve, as well as the curvature. The curvature is calculated with the first and second derivative but its not just the second derivative.
Now, I’m not a mathematician, so I’m not able to prove it to you, especially in such a short comment. I’m just knowing that it is like this, from reading books and papers about Bezier and Nurbs.
@TomTom, I can’t thank you enough. I think it is getting really interesting at least to me. Could you please share any references so I can learn more about the formula? Ever since I became interested in the mathematical logic behind what I build in Rhino, I have been stumbling through books on topics like differential geometry, topology, but I feel like I am lost. Any books with lots of illustrations you could find useful on those subjects? - that would be much appreciated!!
But since there’s a MotoGP w/e (Brno) going on right now … in the mean time do some preparation: just read the 327 pages of this all times classic book and become a NURBS jedi master (Yoda and the likes):
BTW: The Rhino Method (as is also the case in other Rhino Methods [trans matrices etc]) ouputs derivative vectors differently : C2 is Rhino’s C0, C1 is C1 and C3 is C2.
Thank you @PeterFotiadis. A Primer on Bezier Curves, a friend of mine recommended as well, is one of my favorite materials - it seems like it is a live document, I just realized. Anyways lots of homeworks!