Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x*x + y*y = r*r
- 2*x + 2*y*(dy/dx) = 0
- dy = -(x/y)*dx
- x=0; y=100 // radius
- dx = 1; //pixel
- a = y;
- while(y > x) {
- x += dx; a += x;
- if(a > y) {a -= y; y--}
- plot (x,y); plot (y,x); // one quadrant. repeat for other quadrants
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement