Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

n equally spaced points around the ellipse's perimeter

144 views
Skip to first unread message

Laurent Lucas

unread,
Sep 12, 2004, 8:35:22 PM9/12/04
to
Hello

My problem is to generate n equally spaced points (in terms of Euclidean distance) around the perimeter of the ellipse eg, whose canonical equation is x/a^2+y/b^2 = 1.

How to write a program code that implements this distribution?

Is there some known Matlab code or something?

Thanks in advance

Laurent

Stan Brown

unread,
Sep 12, 2004, 11:36:02 PM9/12/04
to
"Laurent Lucas" <Lauren...@free.fr> wrote in sci.math:

>My problem is to generate n equally spaced points (in terms of Euclidean distance) around the perimeter of the ellipse eg, whose canonical equation is x/a^2+y/b^2 = 1.

When you say "Euclidean distance", are you measuring along the arc
of the ellipse or along a chord?

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com
"You want an intelligent conversation? Do what I do: talk to
yourself. It's the only way." -- /Torch Song Trilogy/

anon...@mathforum.org

unread,
Sep 13, 2004, 8:12:39 AM9/13/04
to
>"Laurent Lucas" <Lauren...@free.fr> wrote in sci.math:
>> My problem is to generate n equally spaced points (in terms of
>> Euclidean distance) around the perimeter of the ellipse eg, whose
>> canonical equation is x/a^2+y/b^2 = 1.

> When you say "Euclidean distance", are you measuring along the arc
> of the ellipse or along a chord?

In the first place, the issue was about the chord but, I realize that both cases are worth considering.

Narasimham G.L.

unread,
Sep 13, 2004, 9:17:28 AM9/13/04
to
Lauren...@free.fr (Laurent Lucas) wrote in message news:<200409122120...@proapp.mathforum.org>...

> My problem is to generate n equally spaced points (in terms of Euclidean distance) around the perimeter of the ellipse eg, whose canonical equation is x/a^2+y/b^2 = 1. How to write a program code that implements this distribution?

First find perimeter length in terms of elliptic integrals, then use
intrinsic differential equation of an ellipse.I posted its general
definition (my view) about a month ago.

David W. Cantrell

unread,
Sep 13, 2004, 9:39:46 AM9/13/04
to
anon...@mathforum.org wrote:
> >"Laurent Lucas" <Lauren...@free.fr> wrote in sci.math:
> >> My problem is to generate n equally spaced points (in terms of
> >> Euclidean distance) around the perimeter of the ellipse eg, whose
> >> canonical equation is x/a^2+y/b^2 = 1.

Laurent intended (x/a)^2 + (y/b)^2 = 1, I must suppose.

> > When you say "Euclidean distance", are you measuring along the arc
> > of the ellipse or along a chord?
>
> In the first place, the issue was about the chord

That's not clear. Stan's question was a necessary one. We need to have an
answer from Laurent himself.

> but, I realize that both cases are worth considering.

Laurent:
Is one of the points desired always going to be an end of a major or minor
axis of the ellipse? If not, do we then begin by considering an arbitrary
point on the ellipse?
Since I don't have Matlab: Does it implement the incomplete elliptic
integral of the second kind? How about its inverse (with respect to the
amplitude)?

David Cantrell

Herman Rubin

unread,
Sep 13, 2004, 11:54:05 AM9/13/04
to
In article <200409130553...@proapp.mathforum.org>,

It seems that the chord is the harder one. Distances along
the arc are given by elliptic integrals, and since we know
the perimeter, an elliptic integral, we know how much to
make each distance.

For the chord, we do not know how to choose the common
distance; I would suggest using Newton's method on the
final distance, given the initial point.

--
This address is for information only. I do not claim that these views
are those of the Statistics Department or of Purdue University.
Herman Rubin, Department of Statistics, Purdue University
hru...@stat.purdue.edu Phone: (765)494-6054 FAX: (765)494-0558

Robert Israel

unread,
Sep 13, 2004, 2:40:37 PM9/13/04
to
In article <ci4fqt$1k...@odds.stat.purdue.edu>,

Herman Rubin <hru...@odds.stat.purdue.edu> wrote:
>In article <200409130553...@proapp.mathforum.org>,
> <anon...@mathforum.org> wrote:
>>>"Laurent Lucas" <Lauren...@free.fr> wrote in sci.math:
>>>> My problem is to generate n equally spaced points (in terms of
>>>> Euclidean distance) around the perimeter of the ellipse eg, whose
>>>> canonical equation is x/a^2+y/b^2 = 1.

... should be (x/a)^2 + (y/b)^2 = 1

>>> When you say "Euclidean distance", are you measuring along the arc
>>> of the ellipse or along a chord?

>>In the first place, the issue was about the chord but, I realize that
>both cases are worth considering.

>It seems that the chord is the harder one. Distances along
>the arc are given by elliptic integrals, and since we know
>the perimeter, an elliptic integral, we know how much to
>make each distance.

>For the chord, we do not know how to choose the common
>distance; I would suggest using Newton's method on the
>final distance, given the initial point.

Suppose initial point (x_0, y_0) on the ellipse is given.
You want to solve the system of 2n-1 equations in 2n-1 unknowns

x_i^2/a^2 + y_i^2/b^2 = 1 (for i=1..n-1)
(x_i - x_{i+1})^2 + (y_i - y_{i+1})^2 = r^2
(for i = 0 to n-1, with subscript n identified with 0)

If n is even, the number of equations and unknowns can be cut down
to n-1 by symmetry: x_{i+n/2} = -x_i, y_{i+n/2} = -y_i. And if, say,
y_0 = 0, it can be cut down even more by the symmetry
x_{n-i}=x_i, y_{n-i} = -y_i.

In principle, an exact solution can be obtained using Groebner basis
methods, but will probably involve a polynomial of rather high degree
with large coefficients. For example, with n=3, a=1, b=2, x_0 = 3/5,
y_0 =8/5, Maple tells me

10480640625 r^6 - 66754080000 r^4 + 117170176000 r^2 - 110578630656 = 0

Newton's or other approximate methods would be a more practical choice
for large n.

Robert Israel isr...@math.ubc.ca
Department of Mathematics http://www.math.ubc.ca/~israel
University of British Columbia
Vancouver, BC, Canada V6T 1Z2

David W. Cantrell

unread,
Sep 14, 2004, 11:44:13 AM9/14/04
to
hru...@odds.stat.purdue.edu (Herman Rubin) wrote:
> In article <200409130553...@proapp.mathforum.org>,
> <anon...@mathforum.org> wrote:
> >>"Laurent Lucas" <Lauren...@free.fr> wrote in sci.math:
> >>> My problem is to generate n equally spaced points (in terms of
> >>> Euclidean distance) around the perimeter of the ellipse eg, whose
> >>> canonical equation is x/a^2+y/b^2 = 1.
>
> >> When you say "Euclidean distance", are you measuring along the arc
> >> of the ellipse or along a chord?
>
> >In the first place, the issue was about the chord but, I realize that
> >both cases are worth considering.

I regret that Laurent has left us without clarification thus far.

> It seems that the chord is the harder one.

But at least it's "simply" algebraic.

> Distances along
> the arc are given by elliptic integrals, and since we know
> the perimeter, an elliptic integral, we know how much to
> make each distance.

That's the easy part, it seems to me. (And of course, in addition to using
an elliptic integral, there are many excellent and simple perimeter
approximations available.) Next, if our initial point is not an endpoint of
the major or minor axis, we must determine the arc length to it from, say,
an end of the minor axis of the ellipse. Of course, this can be done using
an incomplete elliptic integral of the second kind. Finally, we must
determine the desired other (n-1) points on the ellipse. But it seems that
in order to do that (and please correct me if I'm wrong), we must, for each
point, invert an incomplete elliptic integral of the second kind. I doubt
that such an inverse is implemented in Matlab. Perhaps a recent thread from
sci.math.research, "Inverting elliptic integrals"

<http://groups.google.com/groups?threadm=20040729184504.261%24XX%40newsreader.com>

might be of help in this regard. Richard Mathar and I (separately) gave a
series for that inverse.

[BTW, I had intended to give a link to that thread at the MathForum's
archive. But, unless I overlooked it somehow, it's not archived there! I
wonder how many threads fail to be archived by the MathForum.]

Regards,
David W. Cantrell

0 new messages