Drawing a Sphere

24 thoughts
last posted Jan. 16, 2014, 4:27 p.m.

3 earlier thoughts

0

Drawing lines of latitude is fairly easy.

If cx and cy are the center of the sphere and r is the radius...

The center of the ellipse for a given latitude is:

(cx, cy + r * Math.sin(latitude) * Math.cos(alpha))

the major radius is:

r * Math.cos(latitude)

and the minor radius is:

r * Math.cos(latitude) * Math.sin(alpha)

20 later thoughts