Drawing Evenly Distributed Points on an Ellipse in Flash AS3

I recently had a request from a friend on how to draw evenly distributed points on an ellipse in Flash. So I did some research and basically found that all articles/posts/whatever talk about the same thing. See here as an example.

Goal

Find a way to evenly distribute points on an ellipse using Flash AS3.

Step 1: Grab Some Classes

Step 2: Learn About Elliptical Integrals of the Second Kind

I’m not going to go into the math detail in this tutorial as I’m sure most people viewing this would rather have code then piles of calculus. If you are interested in the math behind the functionality here, please check out this site.

Step 3: Code the “important” Do/While Loop

Basically, the code below is all you need to get things up and running. Notice though that I’m using Simpson’s Rule to calculate the integral. Please checkout the classes above to integrate this.