Re: [Dev-C++] Thanks but I found the answer
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: w. y. <yok...@ve...> - 2004-02-10 09:59:31
|
Brian Wallace wrote: > > If anyone is wondering how to draw a circle pixel by pixel, use x=(Radius)*cos(Number increasing from 0-6.26 by small incraments) + xpos of center of circle, y=(radius)*sin(Number increasing from 0-6.26 by small incraments) + ypos > Put that inside a loop where t increases by something like .01 and draw the point inside the loop also. You can use larger increments and just connect the points by lines. Bigger circles need smaller increments to look round though. However, sin and cos are time consuming functions. Try searching for "circle algorithm" in google. |