Generate Points Around a Circle’s Circumference

This movie requires Flash Player 10

Place Points Around Circle Classes (379)

This is a simple Class, yet comes in handy for many projects. I’ve added a few extra parameters beyond only placing x amount of points around the circumference of a circle. This is a static Class and returns an array of points around a circle.Below are the parameters and explanations of what each parameter defines.

centerx: The center x position of the circle to place the points around.
centery: The center y position of the circle to place the points around.
radi: The radius of the circle to distribute the points around.
total: The total amount of point to distribute around the circle.
startangle: [Optional] The starting angle of the first point. This is based on the 0-360 range.
arc: [Optional] The length of distribution around the circle to evenly distribute the points. This is based on 0-360.
dir: [Optional] This determines the direction that the points will distribute around the circle.
evenDist: [Optional] If set to true, AND if you’re arc angle is less than 360, this will evently distribute the points around the circle. If set to true, the points are visually arranged in this manner POINT-SPACE-POINT-SPACE-POINT, if set to false, an extra space will be added after the last point: POINT-SPACE-POINT-SPACE-POINT-SPACE

To create the SWF above, download the Classes and set the Doc Class as the Document Class of your FLA.

This entry was posted in AS3, Flash and tagged , , , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

4 Comments

  1. Posted July 8, 2010 at 3:29 pm | Permalink

    Thank you

    Just saved me some time. Works like a charm.

  2. Posted March 11, 2010 at 4:06 pm | Permalink

    You’re very welcome, also thanks for the back link on your blog!

  3. Posted March 11, 2010 at 3:51 pm | Permalink

    Thanks for this mate.

    I was looking for a simple formula but this goes beyond the call of duty.

    A good share.

  4. Posted December 22, 2009 at 10:13 am | Permalink

    This is a test comment – testing cache.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>