/* built with Studio Sketchpad:
* https://sketchpad.cc
*
* observe the evolution of this sketch:
* https://studio.sketchpad.cc/sp/pad/view/ro.mp81fAGjzGN/rev.293
*
* authors:
* alexsmith540
* license (unless otherwise specified):
* creative commons attribution-share alike 3.0 license.
* https://creativecommons.org/licenses/by-sa/3.0/
*/
//I got inspired at LACMA by some crosshatching the other day and though how cool it might be to start doing riffraffery with crosshatching...
float p;
float inp;
float ellr = 100;
float fooninja;
void setup() { // this is run once.
// set the background color
background(255);
fooninja = 3;
// canvas size (Variable aren't evaluated. Integers only, please.)
size(400,400);
inp = 0;
// smooth edges
smooth();
// limit the number of frames per second
frameRate(30);
// set the width of the line.
strokeWeight(1);
}
void draw() { // this is run repeatedly.
inp+= 0.1;
p=sin(inp)*5.0;
background(255);
translate(width/2,height/2);
beginShape();
noFill();
curveTightness(p);
for(int i=0;i<360;i+=fooninja){
float x = sin(i)*ellr;
float y = cos(i)*ellr;
curveVertex(x,y);
}
endShape();
}
void mouseDragged(){
fooninja = map(mouseY,0,height,2,3);
}