#http://xuxzmail.blog.163.com/blog/static/25131916200976114621705/
#Toroidal spiral

vertices = 1000

t = from 0 to (2*PI)

r = 5
n = 20

x = (r+sin(20*t))*cos(t)
y = (r+sin(20*t))*sin(t)
z = cos(n*t)

r = 10;
x = x*r
y = y*r
z = z*r