4

I would like to divide an ellipse into $N$ parts such that these $N$ parts have the same arc length.

So given let's say $a$ and $b$ the semi-axis of an ellipse centered on $(0,0)$ and a positive integer $N$ , the solution should give $N$ angles $A_1 .. A_N$, with let's say $A_0=0$ such that the lines passing by $(0,0)$ and with these slopes will cut the ellipse, "revealing" arcs of the ellipse with equal length. So that the sum of these length obviously equals the perimeter of the ellipse.

In other words I have a pie in shape of ellipse, cut in $N$ slices, such that each "side" of these slices are equals and I need the "angle" of the slices.

I hope that my description is clear enough and that it has a possible simple solution too !

Thanks by advances you mathematicians ! (A programmer)

ps : approximations are most welcome

Gaurav
  • 405
Fluxine
  • 115
  • 2
    It is hard to calculate the perimeter of an ellipse in a purely analytic way. We do not even have a formula for the perimeter of an ellipse (that is not the circle). Since you are a programmer, I would advise you to do numerical integration instead. – Calvin Lin Mar 06 '14 at 10:03
  • Thanks you for you answer Calvin. I will do so. I understand this is not feasible but I'm still watching for some "reasonable" perhaps funny approximation anyway. – Fluxine Mar 06 '14 at 10:44
  • Length of arc is given by $ \int \sqrt{{dx}^2+{dy}^2}$. Maybe converting it to polar co-ordinates and then proceeding can make things better. – Gaurav Mar 06 '14 at 11:05
  • @ Gaurav -- no it can't. What Calvin said is correct -- nothing helps except numerical methods. – bubba Mar 06 '14 at 12:32
  • Duplicate of Calculating equidistant points around an ellipse arc but I can't mark as duplicate since that one doesn't have an upvoted or accepted answer yet. – MvG Jan 28 '15 at 16:58

1 Answers1

1

The simplest (and crudest) solution is to just take the endpoints of the "pie segments" to be the points $x = \cos\theta_i$, $y = \sin\theta_i$, where $i = 0, 1, \ldots, N$ and $\theta_i = \tfrac{2\pi i}{N}$.

The arclengths of the pieces won't be very close to equal length, but maybe it would be good enough for your purposes. Only you can decide.

To do a bit better (with much more effort) proceed as follows.

Construct a simple approximation of that gives angle $\theta$ as a function of arclength. This function is monotone increasing, and pretty smooth, so it shouldn't be too hard to approximate. You can just calculate a few specific values of this function, and fit it with a polynomial, for example. To calculate the sample values, replace the ellipse with a polyline that has a few hundred line segments, and use that for your computations. If the answers are not accurate enough, use a more dense polyline or a higher degree polynomial approximation, or both.

Edit (after a bit more thought)

I guess if you don't want to bother constructing the polynomial approximation, you can just do all the computations with the ellipse-shaped polyline. Make a polyline with a few hundred segments. Add up the segment lengths to get total length, $L$. Let $s = L/N$. Walk along the polyline adding up accumulated arclengths until your arclength total reaches $s$ (you may be in the middle of a polyline segment, but no matter). Then restart your walk and continue until arclength reaches $2s$. And so on.

bubba
  • 44,617