Height of Line Segment on an Ellipsis

656 Views Asked by At

I'm trying to find the equation for getting the height of the black line I show in the image below. The end point of the black line is the intersection point between the width of the square below and the ellipse itself. I know the value of the width and the height of the ellipse, and the width of the square. I need to know the value of the height of the line I show below.

Also, the square is always centered below the ellipse.

My ellipse can be either vertical or horizontal, how would that affect the result?

Thank you very much.

Figure

2

There are 2 best solutions below

0
On BEST ANSWER

First off, let's parameterize a given ellipse in the following way:

For an ellipse whose major and minor axes are oriented in the same direction as the coordinate axes with side-to-side width $2a$ across; up-and-down height $2b$ high, and centered at the point $(h,k)$, we have

$$x(t) = a \cos(t) + h \\ y(t) = b \sin(t) + k \\ \qquad \qquad \text{where } 0 \leq t < 2\pi. \\ $$

Since we want to find the height of a given point on the lower edge of the curve, let's just assume that we have the ellipse translated to the center point $(0,b)$. Now we have the system $x(t) = a\cos(t)$ and $y(t) = b\sin(t)+b$ and without loss of generality we're interested in finding the height of a given $x$-coordinate along the region where $\frac{3\pi}{2} \leq t < 2\pi$. However, this corresponds to just the $x$-values in the range of $0 \leq x(t) \leq a$. So as long as we know the $x$-coordinate of the rectangle below (which will just be half of its total width), we can solve for the corresponding value of $t$ and plug that back in for $y$.

That is, if the rectangle below has width $2u$, then we have the right-hand side of its extension into the ellipse given as $x(t) = u = a \cos(t)$. This implies that $$t = \arccos(u/a).$$ Now we just plug this into the expression for the height with $y(t)$:

$$y(t) = b(\sin(t)+1) = b(\sin(\arccos(u/a))+1).$$

A word of caution: since we know that the value of $t$ corresponds to an angle terminating in Quadrant IV, we know that cosines will have positive sign while sines have negative sines. So we can automatically take care of this parity (taking reference angles appropriately) by expressing the height in the lower part of the ellipse as

$$\large y = b[1-\sin(2\pi-\arccos(u/a))].$$

As some test cases, when the width of the rectangle is zero ($u=0$), we get $$y = b[1-\sin(2\pi-\arccos(0/a)] \\ = b[1-\sin(2\pi-\arccos(0)] \\ = b[1-\sin(2\pi-3\pi/2)] \\ = b[1-\sin(\pi/2)] \\ = b[1-1] \\ = b[0] \\ = 0.$$ which seems right.

When the width of the rectangle is the entire width of the ellipse's horizontal distance (usually the major axis), we have $u=a$ so the corresponding height should be $b$:

$$y = b[1-\sin(2\pi-\arccos(a/a))] \\ = b[1-\sin(2\pi-\arccos(1))] \\ = b[1-\sin(2\pi-0)] \\ = b[1-\sin(2\pi)] \\ = b[1-0] \\ = b[1] \\ = b.$$

0
On

Let's suppose that the width of the ellipse is $2w$ and the width of the rectangle is $2u$. Let's also suppose that the height of the ellipse is $2h$. Then if we scale the horizontal axis by a factor of $h/w$, the ellipse becomes a circle of radius $h$ and the rectangle half-width becomes $uh/w$ instead of $u$.

So you're asking for the distance from the tangent to the bottom of that circle -- that's at $y = -h$ -- to the point above the right-hand side of the rectangle, which is at $x = uh/w$. Well, the points on the circle (assuming we center it at the origin) satisfy $$ x^2 + y^2 = h^2 $$ so we have \begin{align} (uh/w)^2 + y^2 &= h^2 \\ \frac{u^2h^2}{w^2} + y^2 &= h^2 \\ y^2 &= h^2 - \frac{u^2h^2}{w^2} \\ y^2 &= h^2( 1 - \frac{u^2}{w^2} )\\ y &= -h \sqrt{ 1 - \frac{u^2}{w^2}}, \end{align} where in the last step I've chosen the negative square root because we want the lower value of $y$.

The difference between this and the $y$-value at the bottom, namely $y = -h$, is \begin{align} -h \sqrt{ 1 - \frac{u^2}{w^2}} - (-h) &= h\left(1 - \sqrt{1 - \frac{u^2}{w^2}}\right) \end{align}

When $u = 0$, i.e., when the rectangle is just a very thin vertical line, this gives \begin{align} h\left(1 - \sqrt{1 - \frac{u^2}{w^2}}\right) &= h\left(1 - \sqrt{1 - \frac{0^2}{w^2}}\right)\\ &= h\left(1 - \sqrt{1}\right)\\ &= h\left(0\right)\\ &= 0, \end{align} which looks right, and when $u = w$ (so that the square is the same width as the ellipse), it gives \begin{align} h\left(1 - \sqrt{1 - \frac{u^2}{w^2}}\right) &= h\left(1 - \sqrt{1 - \frac{w^2}{w^2}}\right)\\ &= h\left(1 - \sqrt{0}\right)\\ &= h\left(1\right)\\ &= h, \end{align} which also looks right. So I'm fairly confident that I didn't mess up the algebra. :)