How to Determine if a Point Lies Inside a Tilted and Translated Ellipse?

  • Context: Graduate 
  • Thread starter Thread starter Sleeker
  • Start date Start date
  • Tags Tags
    Ellipse
Click For Summary
SUMMARY

To determine if a point lies inside a tilted and translated ellipse, the formula is given by:
\(\frac{((x-x_c)\cos\theta + (y-y_c)\sin\theta)^2}{a^2} + \frac{((x-x_c)\sin\theta - (y-y_c)\cos\theta)^2}{b^2} = 1\).
Here, \(x_c\) and \(y_c\) are the coordinates of the ellipse's center, \(a\) is the length of the major axis, \(b\) is the length of the minor axis, and \(\theta\) is the angle of tilt from the x-axis. This formula allows for efficient calculations, particularly useful in astronomical research where multiple evaluations are necessary.

PREREQUISITES
  • Understanding of ellipse geometry and properties
  • Familiarity with trigonometric functions and transformations
  • Basic knowledge of coordinate systems
  • Experience with mathematical modeling in research contexts
NEXT STEPS
  • Research the mathematical derivation of the ellipse equation in rotated coordinates
  • Explore computational geometry techniques for point-in-ellipse tests
  • Learn about optimization techniques for handling large datasets in astronomical research
  • Investigate software tools for geometric calculations, such as MATLAB or Python libraries
USEFUL FOR

Astronomers, mathematicians, and researchers involved in computational geometry or those working on projects requiring the analysis of elliptical shapes in space.

Sleeker
Messages
7
Reaction score
0
I need to find whether or not a point is within an ellipse. The problem is that the ellipse is tilted at an angle and not at the origin. I've tried Googling everywhere and can't find a good equation for what I need. Does anybody know the formula for an ellipse that includes:

1. Coordinates of the ellipse's center
2. Length of major axis (diameter or radius)
3. Length of minor axis (diameter or radius)
4. Angle the ellipse is tilted relative to x or y-axis (doesn't matter which, I can figure it out from there).

I'm doing astronomical research, and I'm trying to locate points within galaxies which are shaped like ellipses. The four things I listed are the things I am given.

Edit: I know I can translate and rotate my ellipse, but I would really like just one formula since I need to do this approximately 2,500 times for my astronomical research.

Another edit: Maybe this?

(\frac{x cos\theta+y sin\theta - x_c}{a})^2 + (\frac{x sin\theta-y cos\theta - y_c}{b})^2 = 1

a = major axis (radial)
b = minor axis (radial)
x_c = x coordinate of center
y_c = y coordinate of center
\theta = Angle of tilt from x-axis

I kind of just mixed and matched formulas until I think I incorporated everything. Is it right?
 
Last edited:
Physics news on Phys.org
It may be simplest to compute a change of coordinates that tranforms to a coordinate system where the ellipse is not tilted. Then apply the change of coordinates to the points in question and solve the problem in the simpler setting.
 
Try this:

\frac{((x-x_c)\cos\theta + (y-y_c)\sin\theta)^2}{a^2}+<br /> \frac{((x-x_c)\sin\theta - (y-y_c)\cos\theta)^2}{b^2}=1
 
Hm, yeah, that makes more sense with incorporating the fact that it's off-center with the formula from this website:

http://www.maa.org/joma/Volume8/Kalman/General.html
 
Last edited by a moderator:

Similar threads

  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 27 ·
Replies
27
Views
6K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K