We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I wrote something that would display planets in motion. I wanted the earth to show rotation, my first idea was to have a rectangular map of earth move across it, but I don't know how to do this without it covering the sun and stars also.
This is a simple version without the map, there will be objects behind and in front of the image I want to display.
My next idea would be to use an actual rotating 3d model, or to use an animated sprite. Is there an easy way to achieve this without using those options?
Answers
Perhaps arc()?: http://processing.org/reference/arc_.html
Easy way, not really... If you are not aiming at realism, you can try to mask the image of the Earth with a circular shape, on a separate PGraphic.
In 2D the only way to achieve what you want is simply to change the order you draw the ellipses e.g.
It is actually easier in 3D if you use the Shapes3D library (install through the Tools | Add tool option). Have a look at the Earth example that comes with the library.
Animated 3D: