VBGamer |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RE: Circle Formula Rag on a Stick (4 replies, 0 views) (2000-Aug-29) The easiest and faster ways would be to use the api calls like the method .Circle
or the DirectDraw thing .DrawCircle
The actual formula for a circle is this:
x ^ 2 + y ^ 2 = r ^ 2
this will draw a circle of radius r around (0, 0), then to move the circle, just make the formula
(x - Xpos) ^ 2 + (y - Ypos) ^ 2 = r ^ 2
I think
Then just cycle through the possible values for x and y, and if they satisfy the equation then draw a dot there.
This will probably be slow, unless you do a fair bit of optimisation.
Yeah
hth
|