Hey
I have an animation of two objects rotating in different circles at different speeds. I then have two possible directions in which to travel to and from each object (red & green line represent this).
What I am stuck with is how I work out which path is the correct path to travel on. To explain what is going on in the animation see this image:
In the above image the red path is the correct path, going from inner to outer orbit the travel direction on the red path is clockwise, given that the green path is bowing into a smaller orbit, it is not the correct path to take.
In the below image the objects are in different locations! In this situation the green path is correct going from inner to outer orbit the travel direction on the green path is anti-clockwise, given that the red path is bowing into a smaller orbit, it is not the correct path to take.
My animation is here showing the paths calculated at the same time to show two possible choices at any given time: http://jsfiddle.net/Kz32b/
How can I work out which line is best between red and green. When the set of rules are the path must not go below the smallest orbit.