The projection used here is proper 3D and the coordinates are calculated with the similar triangle method: eye to screen to object. Plenty of tutorials on the matter, but in short:
if (x, y, z) is the 3D coordinate, where z axis is pointing into the screen, projecting to 2D coordinate (u, v) I do as follows:
u = x*d/(z + z0)
v = y*d/(z + z0)
then you must select d and z0 to whatever looks right. In my programs I've used d = 700 and z0 = 2500
The easiest way to do 3D is parallel projection:
u = x + d*z
v = y + d*z
where, again, pick d to something that looks right. Here, I usually use d = 0.7
I used my hyperboloid animation from a while ago as a reference to draw the spiral here, using similar values for projection.
These methods are easy enough for simple wireframe type drawings but things get a lot more complicated when you want hidden lines, objects behind camera, complex rotation, etc. In that case the easiest thing is to just learn OpenGL.