I'm trying to figure out how I can draw a set of points (/ set pixels) that form a circle without using library functions.
Now getting the coordinates (x, y) of the points given by the radius is simple.
for (x=-r; x <r; x=x+0.1) {
y = sqrt(r*r - x*x);
draw(x,y, 0, 0);
}
But as soon as I get points, how you draw a circle is what confuses me. I can use the graphics library, but I want to understand how you can do this without using the graphics library
void draw(float x, float y, float center_x, float center_y) {
}
Can someone share links or links or explain how this works?
source
share