This code use matplotlib.animation
to generate animation of a planet orbiting a star, and also contains scenarios of methods of detecting exoplanets, like transit and radial velocity method. You can use arbitrary pictures of star and planet to generate an animation. See this video for a demo.