Skip to content

Instantly share code, notes, and snippets.

@fiskurgit
Created May 5, 2016 15:51
Show Gist options
  • Select an option

  • Save fiskurgit/5471caec047086e99f92829fe26abeb8 to your computer and use it in GitHub Desktop.

Select an option

Save fiskurgit/5471caec047086e99f92829fe26abeb8 to your computer and use it in GitHub Desktop.
int radius = 200;
float lastX = 0;
float lastY = 0;
void setup(){
size(600, 600);
noLoop();
noSmooth();
}
void draw(){
background(0);
stroke(255);
translate(width/2, height/2);
for(float angle = 0 ; angle < 125.7 ; angle += 0.1 ){
float x = radius * sin(angle);
float y = radius * cos(angle) * sin(angle * 0.95);
line(lastX, lastY, x, y);
lastX = x;
lastY = y;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment