Followers 0

# If l want to draw a circle.How to do it?

## 4 posts in this topic

l need draw many point for a circle,or have some simple ways?
0

##### Share on other sites
[i]Everything [/i]you draw on a computer (other than a single point) ends up as many points.

Search for "Bresenham circle" for a discrete approach; alternatively, you can tessellate (or subdivide) your circle into line segments that approximate the circle and draw those with a line algorithm.
0

##### Share on other sites
Or you can draw a quad and decide whether each pixel should be on or off based on an equation
which will give you scalable resolution for only 4 verts ...
1

##### Share on other sites
Every point on a circle can be calculated by:

Where, theta is all values between 0 and 2PI, and radius is greater than zero.

So, to draw a circle, you can could either plot a bunch of pixels to the screen at the X,Y coordinates as you loop through every value of theta...
or you could draw line segments between each of the X/Y value pairs for all values of theta.
1

##### Share on other sites
you might want to search this site I have found quite a few threads that might help.
0

## Create an account

Register a new account

Followers 0

• 11
• 12
• 21
• 11
• 28