Thread parametric

This is supposed to be beginning of the screw and nut. Actually, it wasn´t so easy to realize functioning of the OPENSCAD and especially imagination of rotating polyhedrons. Right now we can just create teeth profile with polyhedron or other elementary forms in openscad and when we mend it rotate we have a thread.....
It is true, that my ten-core i7 intel has to process it (Krivky.scad) in cgal for 2 minutes smaller version and 17:41 minutes longer version.....
Following the post of Philipp Klostermann, I have started to analyze different approach. It is not so easy to imagine steps of computation with let statement so, this takes some time to modify initial post of Philipp Klostermann.in order to transform it into the equation of a helicoid.
So the result could be seen in "screw_extrude_EaVF.scad" file. This is a file of P. Klostermann streamlined to my needs. And if you want som I have find a library for threads downloadable on the http://dkprojects.net/openscad-threads/.