# How to customize the shape of spiral node in geometry node?

The spiral curve node in geometry node is the shape of circle by default, how can I change the shape of the spiral by using my curve outline?

Like this picture below, it's using rectangle outline.

curve.blend

Here's another take on it:

This GN modifier takes any provided 2D curve, and converts it to a parametric spring. (The curve can be closed, but must not be filled.. that changes it to a mesh, which doesn't work, here)

• It cracks the curve open. (We only need the points, it doesn't need to be cyclic).
• It generates a straight-line curve, with incoming * turns points.
• Position is transferred to the line from the incoming template, by Index mod(number of points in template) resulting in the line winding round and round the template, in the flat.
• Finally, the points of the wound line are offset in Z by a provided multiple of their Spline Parameter.

You could generate the spring-shape inside the group, instead, or replace the circular wire-profile with some other curve cross-section, if you wanted.

Here's the Blend (Blender 3.1b, but could work in 3.0, by replacing the DomainSize node with an Attribute Statistic node, to make the point-count.. as here )

• WOW!!!It's really solved my problem, please let me call you The Spring Master, thank you again!
– Ben
Commented Mar 3, 2022 at 20:49
• man, that's fabulous! and i love that it works for all curves! Commented Mar 4, 2022 at 3:39
• @Chris Thanks! But.. doooh.. I just realized I could get rid of quite a few nodes by deforming a ready-made spiral, the way ben suggested, instead of starting from a line. Never mind.. leave it. :) Commented Mar 4, 2022 at 7:12

Sorry, but my mathematics isn't the best so i have this dirty solution which works - but i am sure Robin can make it better ;)

What a basically do is making a rounded rectangle shape, turn that into a curve and give that curve enough count and with that count i just stretch the points on z. "Normally" with a clean mathematics you could calculate all these points.

So here is my node setup:

and this is my result:

• Thank you very much! I would like to ask an additional question, because I already have a closed section of the curve, how should I correctly replace the first half of your nodes, I can't try it out right now. I have uploaded the curve segment file.
– Ben
Commented Mar 3, 2022 at 19:41
• Phew! That's quite a sweat! What's your version? Have I 'cheated' by using a later one? Commented Mar 3, 2022 at 20:18
• No, I am always using the latest alpha 🤗 Commented Mar 3, 2022 at 20:26
• You can fillet a curve-rectangle in 3.1+, to round its corners, but I have to say, i've found it a bit janky. I did cheat by outsourcing the shape :) Commented Mar 3, 2022 at 20:33
• @RobinBetts Thank you for giving me an easier way!
– Ben
Commented Mar 3, 2022 at 20:50