Determine Center Point based on 2 separate elipses

37 Views Asked by At

First timer here. I've been digging back into my good old maths days but am extremely rusty (beyond belief).

I got a really tricky question that i want to determine formula for so that my mate can use it in a graphics transformation.

Background Context: I have 2 pairs of points:

Pair 1 - $(x_1,y_1), (x_2,y_2)$

Pair 2 - $(x_3,y_3), (x_4,y_4)$

Each pair belongs to a elipse and each pair is a point on the elipses circumference.

Elipse 1 - contains Pair 1

Elipse 2 - contains Pair 2

Both elipses have the same center.

Problem: What would be the formula (set of formulas) I need to be able to determine the center coordinates for both elipses?

My brain fried multiple times while I was trying to figure this out.

My first post so not sure what the correct tags should be here.

1

There are 1 best solutions below

0
On

Unfortunately you don't have enough information to determine a unique center (in fact even if all of the four points were on the same ellipse you wouldn't have enough information to find the center - assuming you can have ellipses in any orientation).

We will take the liberty of assuming an orientation - we take the axes of the ellipses parallel to the $x$ and $y$ axes. The general formula for an ellipse in this case is $\left(\dfrac{x-x_c}{a}\right)^2+\left(\dfrac{y-y_c}{b}\right)^2=1$ where $(x_c,y_c)$ is the coordinate of the center, and $a$ and $b$ are some real coefficients. With the information you are given, we still have six unknown variables only four equations (the unknown variables in the following are $a$, $b$, $f$, $g$, $x_c$, and $y_c$):

$$\left(\frac{x_1-x_c}{a}\right)^2+\left(\frac{y_1-y_c}{b}\right)^2=1$$ $$\left(\frac{x_2-x_c}{a}\right)^2+\left(\frac{y_2-y_c}{b}\right)^2=1$$ $$\left(\frac{x_3-x_c}{f}\right)^2+\left(\frac{y_3-y_c}{g}\right)^2=1$$ $$\left(\frac{x_4-x_c}{f}\right)^2+\left(\frac{y_4-y_c}{g}\right)^2=1$$

There are many solutions to this set of equations, and you will need some additional information in order to restrict to a unique solution. However, if you just need some solution, then you are in luck - you can take $(x_c,y_c)$ to be anything you want!