Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // a simple circle drawn by rotating dots around a constant radius
- stroke(0,60);
- noFill();
- // ellipse(width/2, height/2, radius*2, radius *2);
- float x, y;
- float lastX = -999;
- float lastY = -999;
- size(500,500);
- background(255);
- strokeWeight(3);
- float radius = 100;
- smooth();
- for (float ang = 0; ang <=360 ; ang += 5) {
- float rad = radians(ang); // this converts degrees into radians
- x = width/2 + (radius * cos(rad));
- y = height/2 + (radius * sin(rad));
- point(x,y);
- }
Add Comment
Please, Sign In to add comment