Based on the information shared by Jozi in the original poster's comments, the challenge at hand is not how to divide an ellipse into equal segments (which would involve complicated integrals), but rather to create an ellipse using line segments of approximately equal length.
Several methods are available for achieving this, with the concentric circle approach known as 'the draftman's method' being particularly suitable for the task. An interactive demonstration of this method can be found here, which requires installation of the Mathematica player.
However, it's worth noting that approaches like these may only produce roughly equal segment lengths when dealing with low eccentricities. Extreme eccentricities introduce greater complexity. One simple solution involves linearly approximating the length of a line segment within each quadrant and then precisely determining the positions of the endpoints in that quadrant.
Visualizing an ellipse quadrant with parameters a = 5, b = 1
:
A plot showcasing the arc length corresponding to an infinitesimal angle change is shown below:
The x axis represents angles in radians, while the y axis displays arc lengths resulting from a 1 radian angle change. The formula used here, derived from equations in the linked Wikipedia article, is
y = Sqrt(a^2 Sin^2(x) + b^2 Cos^2(x))
. Crucially, the integral of this function - the area under the curve - equals the total length of the arc in the entire quadrant.
An approximation using a straight line is depicted here:
This line has a gradient of m = (a-b) / (Pi/2)
and intersects the y axis at c = b
. By geometry analysis, we find the area under the red curve to be A = (a+b)*Pi/4
.
By leveraging this understanding and associating area under the curve with the total curve length, constructing an elliptical approximation boils down to finding a midpoint-rule quadrature of the red line such that each rectangle has equal area.
Translating this concept into an equation, representing a rectangle's position in a quadrature with its left-hand boundary x
and width w
, leads us to:
(v*m)*w^2 + (m*x+c)*w - A/k == 0
In this equation, k
denotes the number of parts used to approximate the quadrant, and v
signifies a weighting function. Through iterative processes involving setting values like x0 = 0
and solving for subsequent boundaries, the quadrature construction progresses until reaching the final boundary point Pi/2
.
The weighting function v
dictates where rectangles intersect the red line. A constant value of 0.5
corresponds to midpoint crossings, generating 10 points as seen below:
Varying v
within the range [0, 1]
k/2