#http://www.mathcurve.com/courbes2d/folioide/folioide.shtml
vertices = 12000
t = from (-20*PI) to (20*PI)

e = rand2(0.1, 10)
a = 10 / e
i = rand_int2(2, 10)
j = rand_int2(1, 10)
n = i/j
p = a*(e*cos(n*t) + sign(t)*e*sqrt(1 - pow(cos(n*t), 2)))
x = p*cos(t)
z = p*sin(t)

r = array_max(p)

y = sqrt(r*r - x*x - z*z)
