Curve frame and curvature?

What does curve frame mean?curve-frame-question.gh (9.7 KB)
I can’t seem to get the curvature thing to work on a spiral.spiral.ghx (85.8 KB)

It is the Frenet or “TNB” frame of the curve, where the frame’s X axis points in the curve’s tangent direction, Y axis in the normal direction of curvature, and Z axis perpendicular to X and Y.

See this animation from Wikipedia: https://en.wikipedia.org/wiki/Frenet–Serret_formulas

In your files you are creating curves by interpolating points with degree = 1, that gives you a polyline with sharply changing tangent and undefined curvature at each ‘kink’. Just change the degree to 2 or higher and it will work :slight_smile:
image

Many thanks for the correction for the curvature. That works fine now. Thanks for the link. I have been studying this some for a particular problem. I have been trying to figure out how much twist to put into a flat bar of steel ( 3/8" x 2") to make it lay “flat” as it ascends a spiral stair well. The radius of curvature gives me the edge bend, but then the flat section of the bar lies at an angle wrt the z axis. I think maybe that the binormal vector contains the angular information I need for the twist but not sure yet. The thing I’m making is really a helicoid, very much like a slinky. Is there any GH processing that I could do to the output of the curve frame to pull out the angle of the B with respect to the z axis?

Hmm… I’m not entirely clear what you mean about the twisting bar- maybe an illustration or model would help.

Deconstruct Plane + Vector angle?
image

Thanks for the idea. I’ll try that a bit later. It has been difficult for me to explain to folks what It is I need to calculate. Here is a portion of a pretty sketch done in Rhino which is easy to do. It shows the handrail that was made from a helix and a rectangle using the sweep1 rail and roadlike top option. You can kind of see the twist in the hand rail.


I am making this hand rail in a blacksmith shop. I have built a form to simulate the column it goes around

the next picture shows a cardboard template that is cut to the radius of curvature. When it is laid against the form it is at an angle to the horizontal reference posts sticking out. I need to know this angle to know how much twist to put in.

the next pic shows me holding the template down and you can see the same kind of twist here as in the Rhino sketch.

I can measure the angle and I can tweak the handrail into position but I want to be able to calculate the twist. This would be necessary also if I were using a machine to roll the handrail. This is a case where I’m trying to use Rhino and GH as a tool to help me understand and calculate what is happening. I think I understand, but the calculation of that twist eludes me. I’ve got a fair amount of math background, but the spirals and helicoids are things I haven’t done much with until now. Got a book on differential geometry on the way.
Joe

Looks interesting! I don’t know much about the black-smithing process, do you mean that the bar gets twisted axially into a sort of fusili-pasta shaped thing before being wrapped around the larger diameter form?
Does it get rolled into a flat circle shape first and then elongated vertically or do both actions happen at the same time?

I think what you’re looking for may correspond to the integral of the torsion of the curve along its entire length… although of course there’ll be all sorts of real-world complications compared to an idealized curve with zero thickness :sweat_smile:

Edit: Here’s an idea, you could try comparing the Perpendicular Frame (zero-twisting) component with the Curve Frame at the beginning and end of the curve, and see how much they diverge from each other.
I believe that should theoretically give you the total amount of twist, or at least provide an approximate starting point where you can tack on whatever necessary correction factors :slight_smile: See the attached: spiral.ghx (160.2 KB)

Can’t thank you enough for your help. I think we are getting close. I have edited the GH file you sent and put in real world numbers. The multiplier in Z gives the total pitch, X is the column radius, and the railing makes one complete revolution. The angles come out very close to what I can measure at 45 and 90 degrees, and my measurements are not super precise.
spiral14-5.ghx (148.9 KB)
The next step is to try using these and see how it turns out. I’ll get around to that this week. A person can do this spiral in several ways in the shop. I’ve learned that I can twist the bar first and then put in edge curve. That can get unwieldy pretty quick if the piece is very big. What I usually do is put in the edge bend then go back and add the twist. For purely sculptural pieces, accuracy doesn’t matter so much. For a stairway, you’ve got to be dead on. If I were using a machine to roll the bar into a spiral, I would have to have numbers to set the degree of twist.
I basically understand the curve frame now. What about that perpendicular frame? How is it calculated in GH?
Joe

I couldn’t find much information about that - I’m pretty sure it corresponds to the RhinoCommon method Curve.PerpendicularFrameAt(t) but the documentation does not go into detail about how it is calculated. (But really, it’s minimal-torsion property of the frames which one is interested in, I don’t think the underlying maths is crucial)

If you Google “curve rotation-minimizing frames” you’ll find several different algorithms on how such frames are calculated. I’d be interested too to know which one Rhino uses under the hood, maybe someone from McNeel can shed some light on that? :slight_smile: