2

I'm required to move my virtual camera from Point A in 3D space to Point B in an elliptical orbit. So far, I have:

  • Calculated the projected lines from the center of each camera position (i.e. extended the front vector infinitely).
  • Used this to calculate the minimum distance between these 2 projected lines which will act as the center for my ellipse.
  • Visualized the 3D skewed plane in which I need to perform the movement.

But now I am stuck! I'm (obviously) not a mathematician so I'm having a hard time getting my head around what I need to do next.

I have 2 points on this elliptical arc (although I have no idea where they are on the circumference, and so have no idea what the major and minor axis limits are; a and b in conventional notation I believe?) Currently, the movement between these 2 points is linear so I can use that as a starting base in case that is any sort of help? Could someone please guide me in the right direction?

Sonoman
  • 3,379
  • 9
  • 45
  • 61
  • 1
    If you don't need an actual elliptical movement, but just a "curvy" movement, it would be simpler to use splines. – toto2 Nov 21 '11 at 16:19

2 Answers2

1

Although 2D, this example that uses the parametric form in canonical position may offer some insight.

Community
  • 1
  • 1
trashgod
  • 203,806
  • 29
  • 246
  • 1,045
  • Thanks for the response. That certainly does help but I still have the problem of not knowing `a` and `b` e.g. my two arbitrary points may not be the major and minor axes. They may just be 20 degrees apart for example and neither may lie on the major and/or minor axis. Is there any way to calculate the major and minor axis given a center point and 2 perimeter points? – Sonoman Nov 22 '11 at 08:29
  • 1
    [An ellipse in the plane has five degrees of freedom](http://en.wikipedia.org/wiki/Ellipse#Degrees_of_freedom); two is not enough. Since you know the center, maybe the [polar form relative to center](http://en.wikipedia.org/wiki/Ellipse#Polar_form_relative_to_center) would be useful. Aren't _a_ and _b_ arbitrary for "an elliptical orbit?" – trashgod Nov 22 '11 at 15:55
  • Thanks for the clarification. That confirms the conclusion I came to. Without making a lot of assumptions, it isn't possible to do. I was under the impression that `a` and `b` were the magnitude of the semi-major and semi-minor axes? Or am I way out of whack? If so, the polar form would be exactly what I need! – Sonoman Nov 23 '11 at 08:27
  • Yes; I've also seen _a_ called the major radius and _b_ called the minor radius. – trashgod Nov 23 '11 at 17:51
0

As I understand you want to calculate the point of the ellipse. You can use the ellipse equation: http://en.wikipedia.org/wiki/Ellipse or if you do not have the center, height, width of the ellipse, then you can assign spline on the give points: http://en.wikipedia.org/wiki/Spline_%28mathematics%29

HamoriZ
  • 2,370
  • 18
  • 38