vertices = D1:100 D2:100

u = from 0 to (PI) D1
v = from 0 to (2*PI) D2

a = 10
b = rand2(0, 4*a)
e = b/a;

p = a*sqrt(cos(2*u) + sqrt(e^4 - sin(2*u)^2))

x = p*cos(u)
n = p*sin(u)

y = n*cos(v)
z = n*sin(v)