Perpendicular frames

I am trying to figure out how Rhino decide the direction of the X and Y axis in the GetPerpendicularFrames curve method.The Z axis is obvious (tangential), but the direction of the X and Y axes however is not uniqe.

Those are Frenet frames, I guess…

In my understanding, you got the tangent vector. Thats easy to understand. Then imagine you take from curve three infintitely nearby point. One at the tangent point, other just “before” that point and other “after” that point. Those three point create a plane. The second vector of frenet frame is the perpendicular vector to the tangent that is also contained at that plane. The third vector is perpendicular to the plane.

That plane is also the plane of the “osculating” circle of the curve at that certain point.

Ím just remenbering old geometry lessons. This would be better confirmed (or corrected) by some expert…

Thank you! This is very useful. I am still not quite sure how the initial frame orientation is decided in Rhino, but the procedure after that seems reasonable.