Screw Modifier with varying Offset

I have a long spring modelled using a circle and screw modifier. But I do not want every iteration of the spring to be evenly placed. I want to be able to control where the iterations are dense and where sparse. How could this be easily done?

I don't know how to achieve this with the screw modifier, but this can be done with a modified helix curve and a circle as bevel object.

Method 1: Lattice

For this methods you will have to create a helix screw curve. This can be either done by creating a mesh with a single vertex, using the screw modifier and converting the mesh to a curve, or by using the included add-on Add Curve: Extra Objects which allows you to add a helix spiral by selecting Add > Curve > Profiles > Helix (3D).

Now add a Lattice object and (in object mode) place it so that it surrounds the spring. In the Data tab of the Properties area set a sufficient number of subdivisions.

Add the Lattice modifier to the helix curve and make sure to turn on Apply on splines' points.

With the Lattice selected, go into edit mode and move the vertices to create the desired spacing.

Method 2: Calculate control points' position

Another approach would be to move the curve's control points to the final position, with either a script or with some add-on. The add-on Animation Nodes provides an interface to enter custom interpolation curves which makes it very convenient to change certain parameters of the spring. But of course it's also possible to use a more simple for loop instead.

The following Animation Nodes node setup will allow you to modify both the spring's spacing as well as the radius:

Link to .blend file with the node tree

• I like the second method very much! But as someone, who has never used Animation Nodes, I find the flow a bit difficult to understand. Especially because I cannot properly ascertain the connection between the three subtrees. A tiny bit of explanation would be deeply appreciated! Mar 11 '17 at 19:54
• @SubhamoySengupta The three subtrees are “connected” through the Invoke Subprogam nodes. This is equivalent to defining some function in Python, e.g. def screw(resolution, turns, …) and calling this function somewhere else in the code. I've also added additional annotations to the node tree. If there's still something unclear, whether it may be with AN's workflow or this particular tree, please say so. Mar 11 '17 at 22:16