Find location of a point on an oval shape

436 Views Asked by At

I have an oval shape (let's assume the center is (0,0)), and I have two laser pointers (at known locations) pointing to the two different objects (marked as X). One object is on the perimeter, the other somewhere inside the oval area.

I have two questions:

  1. With a sinlge laser pointer, given the angle of pointing and its (x,y) location, can we calculate the location of the object?
  2. Now with two laser pointers, their angle of poining and locations, can we calculate the location of the object?

Please assume whatever variables needed, like the equation for the oval geometry. I just want to see what are minimum information needed to localize an object on the area or perimeter.

enter image description here

2

There are 2 best solutions below

1
On BEST ANSWER

Cassini Oval

We assume that, after reading @achille hui’s comment, you have realized that we need two laser pointers to locate an object, which is not on the perimeter of the oval (we call it Case 1). Furthermore, that comment emphasizes that we need only one laser pointer to pinpoint an object on the perimeter of the oval, which we call Case 2. The answer given below takes its cue from the aforementioned comment.

Here are the equations for the Case 1, i.e. spotting an object at an arbitrary position using two laser guns, locations of which are known. We use the extended sketch shown in $\mathrm{Fig.\space 1}$ to derive the following equations. Coordinates of the guns at the top (i.e. $A$) and bottom (i.e. $B$) are assumed as $\left(x_A, y_A\right)$ and $\left(x_B, y_B\right)$ respectively. Furthermore, for brevity, let $AD=m$ and $BD=n$. $$s=x_A-x_B \quad \mathrm{and}\quad h=y_A-y_B$$ $$m\sin\left(\alpha\right)-n\sin\left(\beta\right)=s=\left(x_A-x_B\right)$$ $$m\cos\left(\alpha\right)+n\cos\left(\beta\right)=h=\left(y_A-y_B\right)$$

When we solved these two simultaneous equations, we get $$n=\frac{\left(y_A-y_B\right) \sin\left(\alpha\right)-\left(x_A-x_B \right) \cos\left(\alpha\right)}{\sin\left(\alpha\right) \cos\left(\beta\right)+ \cos\left(\alpha\right)\sin\left(\beta\right)}=\frac{\left(y_A-y_B\right) \sin\left(\alpha\right)-\left(x_A-x_B \right) \cos\left(\alpha\right)}{ \sin\left(\alpha+\beta\right)}.$$

Let the coordinates of the object $D$ equal $\left(x_D, y_D\right)$, Then we have $$x_D=x_B-n\sin\left(\beta\right) = x_B-\frac{\left(y_A-y_B\right) \sin\left(\alpha\right)-\left(x_A-x_B \right) \cos\left(\alpha\right)}{ \sin\left(\alpha+\beta\right)} \sin\left(\beta\right)$$ $$y_D=y_B+n\cos\left(\beta\right)=y_B+\frac{\left(y_A-y_B\right) \sin\left(\alpha\right)-\left(x_A-x_B \right) \cos\left(\alpha\right)}{ \sin\left(\alpha+\beta\right)}\cos\left(\beta\right)$$

Now we illustrate the Case 2. There are several types of ovals. As far as we know, only Cassini oval can be described by a single equation. To describe other types of ovals, we usually need two or more equations. For instance, the ovals called Moss’ egg and Thom’s egg need four equations each. Only Cassini’s curves with $a\gt \sqrt{2}c \gt 0$ (see $\mathrm{Fig.\space 3}$) and ellipses resemble the figure given in your sketch. Equations similar to ones given for Case 1 can be developed for the case of ellipse without much ado. However, deriving equations for Cassini oval takes some doing. To make matters worse, solving the equations is not possible without resorting to numerical methods.

The equation of Cassini oval (see $\mathrm{Fig.\space 3}$) with $a\gt \sqrt{2}c$ in polar coordinates is $$r^2=c^2 \cos\left(2\phi\right)+\sqrt{a^4-c^4\sin^2\left(2\phi\right)} \quad \mathrm{where}\quad a\gt \sqrt{2}c \gt 0. \tag{1}$$

Now, please pay our attention to $\mathrm{Fig.\space 2}$. $$\tan\left(\alpha\right)=\frac{CE+OF}{AF+OE}=\frac{x_A-\left(\sqrt{ c^2 \cos \left(2\phi\right)+\sqrt{a^4-c^4\sin^2\left(2\phi\right)}}\right)\cos\left(\phi\right)}{y_A-\left(\sqrt{ c^2 \cos\left(2\phi\right)+\sqrt{a^4-c^4\sin^2\left(2\phi\right)}}\right)\sin\left(\phi\right)} \tag{2}$$

Once we determine the value of $\phi$ by solving equation (2), we can find the value of $r$ using equation (1). Then, the Cartesian coordinates of the object at $C$ follows from $$ x_C=CE=r\sin\left(\phi\right)\quad \mathrm{and}\quad y_C=OE=r\cos\left(\phi\right).$$

We also give here, for your reference, the set of equations needed to locate an object lying on the perimeter of an ellipse. The equation that describes the ellipse, whose semimajor axis and semiminor axis are $a$ and $b$ respectively can be express in parametric form as $$x=a\cos\left(t\right)\quad \mathrm{and}\quad y=b\sin\left(t\right). \tag{3}$$

The equation equivalent to (1) is $$\tan\left(\alpha\right)=\frac{x_A+ a\cos\left(t\right)}{y_A+ b\sin\left(t\right)}.$$

From this we can obtain the following quadratic equation in $\sin\left(t\right)$, which, unlike equation (2), can be solved straightforward. $$\left(a^2+b^2\tan^2 \left(\alpha\right)\right) \sin^2 \left(t\right)+2b\left(y_A\tan\left(\alpha\right)-x_A\right)\tan \left(\alpha\right)\sin\left(t\right)+\left(y_A\tan\left(\alpha\right)-x_A\right)^2-a^2=0$$

Once we solved this equation to determine $t$, we can use it in (3) to calculate the coordinates of $C$.

1
On

Knowing the equation of the oval, one laser intersects it from inside at a single point.

Two lasers intersect at a single point (independently of the oval).