Twist
Rotates a shape about an in-plane axis and projects the result back to 2D, so the outline crosses itself.
Category: Shape Ops Menu path: Shape Ops > Twist
Ports
| Port | Type | Direction | Description |
|---|---|---|---|
shape_in | shape | input | Shape to twist |
out | shape | output | Twisted shape |
Parameters
| Param | Type | Default | Description |
|---|---|---|---|
angle | scalar | 180 | How far the far end is rotated relative to the near end, in degrees. This is how much twist is in the shape. |
rotation | scalar | 0 | Turns the whole ribbon about the twist axis. This is the one to animate for a loop — sweeping it 0 → 360 returns exactly to the start without ever retracing. |
axis | enum | Vertical | The axis the shape rotates about, not the one that moves. Vertical spins around a vertical line, so the shape narrows horizontally; Horizontal is the same thing on its side. |
center | scalar | 0 | Offset of the axis line, across the direction that scales. Points on the axis never move, so offsetting it twists the shape around one edge instead of its middle. A scalar rather than a point because the axis is a line — it has no position along its own length. |
Expose Channels
When enabled (E button on node header), adds input ports that override params via edge connections:
| Port | Type | Overrides |
|---|---|---|
angle_in | scalar | angle |
rotation_in | scalar | rotation |
How It Works
Picture a paper ribbon pinned at one end and turned at the other. A point partway along has rotated by a share of the full angle, and seen flat-on its distance from the axis shrinks by the cosine of how far it has turned.
Twist does exactly that. Each vertex gets a position t from 0 at one end of the shape to 1 at the other, measured along the twist axis across the shape's own extent, and its distance from the centre line is multiplied by cos(angle × t).
Everything interesting follows from that cosine going negative past 90°:
| Angle | What you get |
|---|---|
| 0° | Unchanged |
| 90° | The far end collapses onto the axis — a teardrop |
| 180° | The far end is fully mirrored: the outline crosses once, so an ellipse becomes a figure eight |
| 360° | A full turn — two crossings, three lobes |
t is normalised over the shape's own bounding extent, so the ends are always the ends whatever size the shape is or wherever it sits. A shape with no extent along the twist axis (a horizontal line twisted about the vertical) has nothing to twist and passes through unchanged.
Bezier handles are twisted at their own position along the axis rather than inheriting their anchor's factor — see the note in ShapeDeform for why that distinction matters.
Point IDs, attributes and path topology are all preserved; only positions change.
Angle vs Rotation, and how to loop
angle is how much twist the shape has. rotation is where that twisted shape is in its spin. They do different jobs, and the difference matters the moment you animate:
- Animating angle 0 → 180 → 0 winds the twist in and back out. It looks like it reverses because it does — it is the same motion played backwards.
- Animating rotation 0 → 360 keeps turning the same way and lands exactly where it started. Nothing retraces.
Watch the crossing to see why: as rotation increases it travels along the shape, slides off one end, and reappears at the other. That is a ribbon continuing to turn, not unwinding.
A seamless ellipse → figure eight → ellipse cycle: set angle to about 90 and keyframe rotation 0 → 360 over the loop. The shape passes through a near-ellipse, crosses into an eight, opens back out, and arrives back at the start. Raise angle toward 180 to stay closer to an eight throughout; lower it to stay closer to an ellipse.
One honest limitation: this cycle never hits a mathematically perfect ellipse. A perfect ellipse needs the scale factor to be exactly 1 everywhere, which happens at a single setting (angle 0, rotation 0), and any loop passing through a single point has to arrive and leave the same way — which is the reversal you were trying to avoid. At angle 60–90 the open state is within a few percent of an ellipse and reads as one.
With angle at 0, rotation on its own is just the whole shape turning edge-on and back — the flat spin, with no twist in it.
Usage Examples
Basic: an ellipse into a figure eight
Ellipse → Twist (angle: 180) → DrawShape → Output. Keyframe angle from 0 to 180 and the shape winds into an eight. The crossing enters from one end and travels to the middle as the angle grows — that is what a real twist does, not a pinch that appears in place.
Twisting around an edge
Set center to one side of the shape (for a 964-wide ellipse, 482) so that edge is pinned and the rest sweeps around it.
Driven twist
Toggle E and wire a Time node through a Math (multiply) into rotation_in for a spin that never stops and never needs keyframes. Driving angle_in instead from an Oscillate winds and unwinds — useful when you want the breathing rather than the turn.
Tips
- Resample first for smooth results. An Ellipse is four bezier segments;
ResampleShape(count 120+, type bezier) gives the curve enough vertices to bend cleanly. A Rectangle's four corners will twist into four straight chords. - Angles above 360° keep going — each additional half-turn adds another crossing.
- Twist changes the shape's bounding box (it narrows), and the bounds follow automatically.
- For a twist that responds to position rather than running end-to-end, use ShapeDeform in Scale mode with a field.
Related Nodes
- ShapeDeform — field-driven deformation; its Scale mode is the general form of what Twist does with one angle
- ResampleShape — add vertices before twisting
- ShapeMorph — interpolate between two drawn shapes instead of deriving one from the other
- DrawShape — rasterize the twisted shape