Guest User

Untitled

a guest
Jan 23rd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. // a simple circle drawn by rotating dots around a constant radius
  2.  
  3. stroke(0,60);
  4. noFill();
  5. // ellipse(width/2, height/2, radius*2, radius *2);
  6.  
  7. float x, y;
  8. float lastX = -999;
  9. float lastY = -999;
  10.  
  11. size(500,500);
  12. background(255);
  13. strokeWeight(3);
  14. float radius = 100;
  15. smooth();
  16.  
  17. for (float ang = 0; ang <=360 ; ang += 5) {
  18. float rad = radians(ang); // this converts degrees into radians
  19. x = width/2 + (radius * cos(rad));
  20. y = height/2 + (radius * sin(rad));
  21. point(x,y);
  22. }
Add Comment
Please, Sign In to add comment