# How to procedurally model a non-linear screw? / non linear modifier

I am trying to achieve a non linear (gradually) screw procedurally, by this I mean the distance between each turn of the screw get smaller and smaller, this result should be obtain with modifier in a procedurally way, to get control over distance between the loop/size of the loop. Basically it would be similar as an antelope horn (as we get closer to the head, the distance between the horn "twisted ring" get smaller):

Here is my setup: I started from a two vertices edge

Then I add this bunch of modifier: screw - solidify - subdivision - lattice.
This gave me a spring...

...and by deforming the lattice I get this shape. And here is the big question : the distance between the "ring" decrease but only because the height of the ring decrease (this also cause the angle of each ring to change). How can I gradually decrease this distance without changing the height of the ring (I still want the radius of the first one to be bigger than the radius of the last one)?

By applying the modifier and scale/move the top vertices with proportional editing I get something like that: But I am looking for a solution without applying that much modifier, to keep more control.

this question can be extended to other modifier: how to use the array modifier in a non linear way ? By this I mean the distance between each instance is multiplied by 1.3 for exemple, meaning there is more and more distance between object as in this picture:

• Hello :). Since you already have a good result, are you asking how to achieve this procedurally? And in which parameters do you want to keep more control? Commented Mar 6, 2021 at 13:31
• @JachymMichal If procedurally means modifier based, yes that's it. I want to keep control of the distance between the loop and the size of the loop. And most of all, changing those parameter as if done with proportional editing. Commented Mar 6, 2021 at 13:35
• what about geometry nodes or animation nodes? i think both can do this Commented Apr 27, 2021 at 14:49

You can get increasing distances in the array by choosing "Object offset" with an object that is scaled.

This will heavily stretch the object, so I'd recommend building the thickness of the thread with a solidify modifier later in the stack

The only mesh there is here is a single quad, the rest is modifier stack

The quad is a section of ring and has one side at origin height and the other side at the same height as the empty driving the array. I recommend parenting the empty to the object to adjust both at the same time.

The empty is rotated by the same angle as is the section of ring

With this setup, scaling the object z will increase the overall pitch of the coil, scaling the empty z will increase the effect of the stretch.

I've also shrunk the empty in xy to get the coil to close in on itself

with this node group you can control the distance of an array of objects:

RESULT:

https://youtu.be/2QJ8b9MexNY