Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

circle

Status
Not open for further replies.

dhara77

Technical User
May 23, 2002
11
0
0
IN
how do u create a circle without using ellipse function.i want a radius to that circle.
 
make one quadrant...

for (theta = 0; theta <= PI/2; theta+= delta)
{
x = radius * Cos(theta);
y = radius * Sin(theta); [ or y = sqrt(rr - x * x) ]
... the other quadrants are -x,y x,-y -x,-y
}
abing734@yahoo.com
 
Or make half a quadrant and mirror across the line x=y
ie. xmirror = y ymirror = x
So only 1/8 of the points on a circle need trig/floating point calculation, the other 7/8 are reflections.
abing734@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top