This is a simplified version of [url=http://www.phy.ntnu.edu.tw/ntnujava/index.php?topic=9]Kepler motion[/url] written with EJS.
The question is why I can draw the trajectory when you change the initial condition with you mouse.
(You can drag the red arrow to change the initial position and magnitude of velocity(vy).
How to determine the trajectory? Do you know?