Sorceress

Untitled

Aug 18th, 2018
194
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. x*x + y*y = r*r
  2. 2*x + 2*y*(dy/dx) = 0
  3. dy = -(x/y)*dx
  4.  
  5.  
  6. x=0; y=100 // radius
  7. dx = 1; //pixel
  8. a = y;
  9.  
  10. while(y > x) {
  11. x += dx; a += x;
  12. if(a > y) {a -= y; y--}
  13. plot (x,y); plot (y,x); // one quadrant. repeat for other quadrants
  14. }
RAW Paste Data