Orbiting Planets And Moons
May 4, 2014I'm trying to make a code that has several orbiting images, a moon orbiting the earth, and then a smaller moon orbiting the moon. Getting the main moon orbiting the earth wasn't too difficult, it just requires rotating the moon image around the center of the earth. However, how to get the smaller moon rotating around the big one. How to do this? The images I'm using are attached.
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.Toolkit;
import javax.swing.JFrame;
[Code] .....
Moon.jpgoie_transparent.jpgRocket.jpgGalaxy2.jpg