Message: 2 Date: Wed, 28 Jan 2004 23:36:28 -0800 (PST) From: Alejandro Tejada <[EMAIL PROTECTED]> Subject: Points in a circular area To: [EMAIL PROTECTED] Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=us-ascii
Hi Developers,
I'm working with geometric stuff now, and before reinvent the wheel, i feel compeled to ask:
Do you have a function that returns all the points or coordinates within an arc of a circle?
Notice for a rectangular area this is fairly easy, but an area with the shape of an slice is another thing. Imagine how to get all the points within a larger version of this arc shape >.
Ideas or suggestions are welcome!
Thanks in advance.
al
Al,
I presume you mean all integer coordinates within the arc. And the arc is a slice of pie?
This is crude, but possibly viable.
A little Turtle Graphics (with radial coordinates) might help--of course :-)
If the arc is a piece of pie: Use polar coordinates. Set the origin at the apex of the arc. Test for all x-y integer coordinates within a square of side R (radius of the arc) for their radial coordinates. Accept those for which r is less than R and theta is between the arc angles.
Is this clear without a figure?
Jim
_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution