Hi again,
got distracted by this last night,
here is some VERY messy code to dash a line on an elipse
ummm, there's no comments there either ... but I'll rewrite it with
comments if anyone's interested :)
(the angular segments are also shown for reference)
it's a CPU hog, probably not good at all for anything animated, but
if you're just creating static images ...
http://www.pixelassembly.com/testing/ellispeSegs.swf
http://www.pixelassembly.com/testing/ellispeSegs.fla
cheers,
glenn
On 11/05/2006, at 11:49 AM, pixelassembly wrote:
Hi,
just to clarify,
are you trying to get the "equal sided polygon" into your elipse,
or are you wanting the points "equal distance along the circumfrence"
?
also why are you not getting accurate results when using a large
point set ?
a) you need a crazy level of accuracy ?
b) the maths doesn't quite work ?
with a large point set, are you calculating the cumulative distance
(point
to point around the circumference)
or the direct distance between points (for an equal sided polygon)
sorry, no answers, only questions :)
glenn
----- Original Message -----
From: "Peter Gehring" <[EMAIL PROTECTED]>
To: <flashcoders@chattyfig.figleaf.com>
Sent: Thursday, May 11, 2006 4:31 AM
Subject: [Flashcoders] Equidistant points on an ellipse!
I'm really hoping someone can help...
I need to plot points at an equal distance along the circumfrence
of an
Ellipse.
As it turns out, I'm pretty bad at geometry, which doesn't help.
I can plot the ellipse, but because I'm using sine/cos and
incrementing with
theta the points are crunched towards the outside of the major radius.
I've tried a bunch of different approaches- recording lots (5000)
of points,
then stepping through each to compare actual distance but I'm not
getting
nearly accurate results this way.
I've looked at drawing dotted/dashed curves from drawing api/custom
classes
but no luck.
If I could affect theta at the same rate the ellipse is plotted I
think I'd
be ok, but I can't quite grasp it.
I've read all sorts of impossiblilites about this,and a lot of
people having
miserable experience with this sort of thing (one guy spent 8 years
trying
to fit an equal-sided polygon in to an ellipse).
But- at the end of the day I can go to the Flash IDE and draw an
ellipse and
stroke it with an equally spaced dotted line! I just need to do this
dynamically and record the points...
Any thoughts?
Thanks much,
Peter
[sorry if this is a duplicate]
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com