Need help making a variable tween curve


I’m new here so I hope this is the correct location to post this.
I’m looking to create a tween curve between a control point curve and its offset curve that gravitates to either line at different points along the curve. Specifically I’d like the tween to sit closer to the outer edge during bends. See image for what I’m referring to.
With it being tied to a control point curve the location and direction of the bends may change which means it has to work dynamically.

I’ve uploaded a file, but it’s as barebones as a tween can get as I’m stuck trying to work this out.

Tween (10.7 KB)

In regular Rhino this can be done using FlowAlongSrf

Loft a temporary surface between the curves. Use the Rebuild curves option,
Plane to create a temporary rectangular surface
Create a line or curve on the rectangular surface as desired
FlowAlongSrf the line or curve onto the lofted surface

BTW, in Rhino a “control point curve” is simply a “curve” or a “NURBS curve”. All curves in Rhino have control points.

Tween (12.2 KB)


I tried this but I couldn’t quite get this to work. Regardless I probably would prefer a gh solution as I’d like to dynamically make changes to it. (unless I’m overseeing some Rhino capabilities here, which is likely)

This seems like a good way to do it manually. But would it at all be possible to achieve something like this and have it automatically update when completely changing the parent curve without having to manually change the tangency again for each bend?

I don’t understand what you mean? You can change the parent curve all you like without touching anything else.

Yes you can. But what I’m interested in is that the tween curve will always sit closer to the outer curve during a bend (as shown in the drawing).

Consider the following example:
Halfway through the parent curve it bends to the left. I set the tween such that it sits closer to the right edge at that point (the outer edge of the curve).
Now the moment you change that bend to i.e. a bend to the right, the tween will now still sit closest to the right edge even though that is now the inner edge of the bend.

I would like the tween to always gravitate towards the outer edge during any bend, regardless if I update the parent line with more, less or different bends.

I hope this makes it a bit more clear what I’m trying to achieve. Thanks for the help so far!

Have a look at the attachment…

Tween (16.8 KB)


I get the picture but don’t have an algorithm for it, sorry. I tried.

First, I created a “test bench” (yellow group) where two arbitrary points can be moved left or right to create a curve.

Then I tried using Curvature (teal group) to align the graphed points to one curve or the other. It sort of works sometimes but not always. With too many points (slider in blue group), the tween curve switches too suddenly from one to the other.

Using the curvature vector length (‘VLen’ panel) might be useful in smoothing the transition but I haven’t figured out how.

Tween (29.6 KB)

This version has one significant difference (the lines between the curves) and another less significant (flipped lines instead of ‘1 - t’). The results are similar. It works well when all the curvature vectors point the same direction, not so well for “S” curves where they don’t.

Tween variable_2021Feb17c
Tween (31.5 KB)


All of these solutions have been extremely helpful!

I’m surprised to see something that seemed fairly simple in my head turn out to require such complex solutions.

While I don’t fully understand all of the components used yet as a newer user myself, it’s been interesting and informative trying to dissect the solutions.

Funny how that happens, eh?
That’s what bothers me when people say “I know this is simple but… (I can’t figure it out)”.

1 Like

Well. My work is done here :sweat_smile:. FWIW I wouldn’t really call this a tween. Tweens don’t rely on division points. I would probably consider this a blend.

What work? Do you have a tool that switches affinity of the tween curve from one guide curve to the other depending on which one is “the outer curve”? Break it out, brah, let’s see it.

1 Like

Haha it was sarcasm. Meaning I didn’t do anything, you guys solved it :grinning: