Finding points on an irregular ellipse

317 Views Asked by At

I am a programmer but my geometry and trig are pretty rusty. The application is for deviation of a circle in topography, such as a slope on the side of a hill.

"ellipse" may be the wrong name for this shape, but the radii ratios are -a = .66, a = 1.33, -b and b both= .87, so the center point for major axis is offset so this may not technically be an ellipse.

I will be evaluating each point inside the shape with a granularity of 1, and radii ratios applied to a size which may be 3 to 80. So, if 50 is the size, -a = 33.3, etc and I will evaluate for 1 to 33.

Cartesian coordinates are used. so for a given point x,y, (1) I need to find distance (d1) from the center point, and (2) on the same angle find the distance (d2) to the edge so that I can determine a co-efficient d1/d2. This co-efficient will be applied to a curve for the given size which will then give me a value for d1.

Up to this point, this process has been done for a circle on a flat plane (z=0), but as z becomes a slope (2:1 for these radii), the circle is deviated by gravity. So a circle was pretty easy, just applying pythagorean to the test point using x and y.

My first thought is to determine a quadrant deviation based on a/b,etc for the angle of the point, reverse out the deviation for the point and apply to a circle, and then apply that d1 to the size curve. However, because the curve of the edge in a quadrant is not an arc referenced to the center point, I'm not sure this would be accurate.

Thanks for reading and any insights, sorry for ignorance of math language.