Created
June 8, 2018 23:02
-
-
Save trych/d5c94431582a789116cbee8d928a0811 to your computer and use it in GitHub Desktop.
A dotted circle in Processing. Note that the dotted line is only faked by drawing lines in the background color on top.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size(512, 512); | |
background(255); | |
strokeWeight(20); | |
translate(width / 2, height / 2); | |
ellipse(0, 0, 400, 400); | |
stroke(255); | |
for(int i = 0; i < 360; i += 360 / 20) { | |
rotate(radians(360 / 20)); | |
line(0, 0, 210, 0); | |
} |
Author
trych
commented
Jun 8, 2018
int dx=0;
size(512, 512);
background(255);
strokeWeight(20);
translate(width / 2, height / 2);
ellipse(0, 0, 400, 400);
stroke(255);
for(int i = 0; i < 9; i += 1)
{
line (-dx, -400+dx, dx, 400+dx);
rotate (radians(20));
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment