# Thread: Equidistant points along a QGraphicsEllipseItem

1. Intermediate user
Join Date
Feb 2006
Location
US
Posts
173
Thanks
16
Thanked 5 Times in 5 Posts
Qt products
Platforms

## Equidistant points along a QGraphicsEllipseItem

Hello,

Is there anything in Qt that would enable me to calculate equidistant points around an instance of QGraphicsEllipseItem?
I thought the QGraphicsEllipseItem implementation might shed some light on the problem.

Please forgive if this is more of a math / computational geometry forum question (e.g. answer being to use elliptic integrals).
Nonetheless, many thanks for suggestions that come to mind.

Thanks,
Ben

2. Guru
Join Date
Mar 2009
Location
Brisbane, Australia
Posts
7,734
Thanks
13
Thanked 1,610 Times in 1,537 Posts
Qt products
Platforms
Wiki edits
17

## Re: Equidistant points along a QGraphicsEllipseItem

Equal distance along the circumference, equal subtended angles at the centre, or even equal angles at a focus of the ellipse?

3. Intermediate user
Join Date
Feb 2006
Location
US
Posts
173
Thanks
16
Thanked 5 Times in 5 Posts
Qt products
Platforms

## Re: Equidistant points along a QGraphicsEllipseItem

Equidistant points along the circumference of the ellipse ... not equal angles. Near equidistant points would even suffice.
This is not a trivial computation for an ellipse, so I was hoping Qt provided some solution since they obviously render the ellipse properly.

4. Guru
Join Date
Mar 2009
Location
Brisbane, Australia
Posts
7,734
Thanks
13
Thanked 1,610 Times in 1,537 Posts
Qt products
Platforms
Wiki edits
17

## Re: Equidistant points along a QGraphicsEllipseItem

Unfortunately, drawing an ellipse using a Bresenham-style algorithm is much easier than computing the circumference. The Qt arc functions all work on the central angle if memory serves.

For a near circular ellipse equal angles would be a close approximation. There may be some method using equally spaced points on an auxiliary circle and then mapping them back to the ellipse but I cannot point to it. Something like that happens in the Vincenty methods for working with an ellipsoidal world: the geometry is mapped to an auxiliary sphere, maths done with spherical geometry, and an iterative method used to return to the ellipsoid. You would need the equivalent of the last step.

5. Intermediate user
Join Date
Feb 2006
Location
US
Posts
173
Thanks
16
Thanked 5 Times in 5 Posts
Qt products
Platforms

## Re: Equidistant points along a QGraphicsEllipseItem

Thanks much for the feedback. Elliptic calculations aren't generally closed form.
When I get the elliptic integral solution working I'll post the example here if any are interested.