Evaluate a non planar curve but get Frenet Serret Frame

Evaluate curve but get Frenet Serret frame.gh (382.1 KB)

I like to get Frenet Serret Frame when I evaluate a nonplanar curve.

I tried the Curvature method shown below but seems like it is not working(stable) when the curve is more complicated. I believe Perp Frames can offer this, but I like to get it by evaluating a curve.

What is the best way?

Honeycam 2023-05-14 09-20-50

Hi! I can think of a naive way: if you can get the equation for the curve, perhaps use numpy differentiate functions to get derivatives you need to calculate the frenet serret frame?