Quote: "My point is, that I need to define these points without creating and moving objects, so using only sine and cosine and other maths. And the positions should be stored in a file or in a dimension.
Is that possible? Because it sure overcomes my limits of maths..."
It sure is possible! Check out the pictures springs I made using triangles and altering a few parameters. I thought you were trying to build your spring from objects but building it from points isn't much different. The math is really the same. The difference is in making your own faces (triangles). The attached picture shows springs that use the same math we've been using in this thread. The difference is, I made faces based on the original calculated positions from this:
rem circle math with an increasing y
inc ang#,anginc#
x#=radius*cos(ang#)
inc y#,htinc
z#=radius*sin(ang#)
It's best to use memblocks for flexibility and speed, but just like you created those functions for building shapes (pyramids and so forth) you can use the native triangles - the process is exactly the same except if you use a memblock, you'll have to calculate UV.
Anyway, the idea is this: you find the x,y and z position of the main point that the rest of the vertices will be placed in relation to (we'll call this the node - I kinda like that now).
For this example will just build two triangles (and end up with a four sided polygon) at each node. That means we need 3 points for each triangle.
The spring should have a certain face height. That will be the top to bottom of the polygon. The face width is the distance from one node to the next. So triangle 1 could look like
x1#=vert#(v,0)
y1#=vert#(v,1)-faceheight# : rem start at the bottom
z1#=vert#(v,2)
x2#=vert#(v,0)
y2#=vert#(v,1)
z3#=vert#(v,2)
x3#=vert#(v+1,0)
y3#=vert#(v+1,1)
z3#=vert#(v+1,2)
I'll leave triangle 2 up to you. Remember it will form a parallelogram. When these triangles are all drawn, you will have your spring using the same math (except for a little bit of addition and subtraction for the points) you already know.
Now, taking this basic premise to the next level, you could build a torrus as the spring shape similarly starting from the node. The math is bit more complex but the principal is the same. An easier shape might be a cube.
If you look back into the DBC Challenges, I have some explanation on making a fish mesh. The idea is to make a grid and bend it towards -z. Then mirror that grid on the opposite side to create a hollow body. That same method could be applied here again using the node as a starting point.
Because you are finding the nodes first, they will be arranged in a general spring shape. As you build edges and faces and connect them relative to the nodes, you will create the spring in solid form.
Enjoy your day.