How to divide an ellipse into equal segments?

This calculates the coordinates of the vertices on the ellipse:

function calculateEllipse(a, b, angle) 
{
    var alpha = angle * (Math.PI / 180) ;
    var sinalpha = Math.sin(alpha);
    var cosalpha = Math.cos(alpha);

    var X = a * cosalpha - b * sinalpha;
    var Y = a * cosalpha + b * sinalpha;
}

But how can I calculate the “angle” to get equal or approximately identical segments of the circle?

+4
source share
2 answers

So, from what Josie said in the comments on the OP, it’s not necessary to divide the ellipse into equal segments (which will require a whole bunch of terrible integrals) in order to build an ellipse from line segments of approximately equal length.

, , OP, , " ". Mathematica, .

, . , . , , - , .

: a = 5, b = 1: enter image description here

, , :

enter image description here

x - , y - , 1 . , , , y = Sqrt(a^2 Sin^2(x) + b^2 Cos^2(x)). , , - - .

:

enter image description here

m = (a-b) / (Pi/2) y c = b. , , A = (a+b)*Pi/4.

, , ( , ) , .

x w, :

(v*m)*w^2 + (m*x+c)*w - A/k == 0

k - , , v - , . x0 = 0 w0, x1 = w0 w1. x2 = w1 .. .., k. k+1 - , , Pi/2.

v , . v = 0.5 10 :

enter image description here

, , . [0, 1], , , k/2.

, , , , . , , .

+1

, , ...

. . X Y. (x, y) = 0 , 1 ,... 90 . , . (x_n, y_n) - = n, , D (x_n, y_n) (x_n + 1, y_n + 1) D = sqrt ((x_n + 1 - x_n) ^ 2 + (y_n + 1 - y_n) ^ 2). 0 90 . , . , 1 ; , 90 .

, x, n , , x. n + 1 , x. , , x.

, , - ; . , .

, . , . , , .

0

All Articles