let phi = theta = 0 while (phi < 3.14) { phi += 0.02 theta += 0.79 let x = 100 * cos(theta) * sin(phi) let y = 100 * sin(theta) * sin(phi) let z = 100 * cos(phi) curveVertex(x, y, z) }
radius
maximum angle
phi step
theta step