Calculate Ellipse based on 4 points

  • Thread starter Thread starter HellScream_
  • Start date Start date
  • Tags Tags
    Ellipse Points
Click For Summary
To calculate an ellipse based on four points, two pairs of opposite points on the X/Y axis, you can use the standard ellipse equation. The equation of the ellipse is given by ( (x-x0)/a )^2 + ( (y-y0)/b )^2 = 1, where a and b are the semi-major and semi-minor axes, and (x0, y0) is the center of the ellipse. By substituting each of the four points into this equation, you create a system of equations that can be solved for the unknowns a, b, x0, and y0. This approach allows you to calculate the new X/Y values for the object's movement along the desired elliptical path. Properly solving this system will enable the object to move in an ellipse rather than a circle.
HellScream_
Messages
1
Reaction score
0
I need to move an object based on 100 images rotating. The object needs to move in a path that is forming an ellipse when I'm rotating the image based on my gestures.

I have 4 points, 2 pairs of opposite points on X/Y axis, on the ellipse but how do I calculate the rest of the points so that I can calculate the new X/Y Value of my next/previous point?

Currently I'm just rotating my object in a circle what is a start but not what I want at all...

Is it possible to calculate an ellipse based on 4 opposite points?

Btw - I'm a programmer but I'm not an expert in mathematics, sorry.

rhyj2.png
 
Last edited:
Physics news on Phys.org
The equation of an ellipse is ##\left(\dfrac{(x-x_0)}{a}\right)^2+\left(\dfrac{(y-y_0)}{b}\right)^2=1## which means you get four equations - for each of your points one - and have four unknowns ##a,b,x_0,y_0\,.## You have to solve this system of equations.
 
There are probably loads of proofs of this online, but I do not want to cheat. Here is my attempt: Convexity says that $$f(\lambda a + (1-\lambda)b) \leq \lambda f(a) + (1-\lambda) f(b)$$ $$f(b + \lambda(a-b)) \leq f(b) + \lambda (f(a) - f(b))$$ We know from the intermediate value theorem that there exists a ##c \in (b,a)## such that $$\frac{f(a) - f(b)}{a-b} = f'(c).$$ Hence $$f(b + \lambda(a-b)) \leq f(b) + \lambda (a - b) f'(c))$$ $$\frac{f(b + \lambda(a-b)) - f(b)}{\lambda(a-b)}...

Similar threads

  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
Replies
5
Views
5K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
4
Views
9K