This just a rough sketch to show the general behaviour to answer a question. The details should be refined. Px, Py, Pz, are not really needed, but are there to clarify the spherical coordinates. @MalinC changed the clumsy variables so latitudes is variable instead of angleStep.
Changes I made: Hid the back side of the sphere by inspecting the rotated z parameter. Added auto spin of alpha. Added rainbow color scheme. Update 2014/02/19: Added pen thickness; improved speed. Update 2014/02/20: Changed background and added solid center to sphere.