xxxxxxxxxx
void setup(){
size (500,500);
background(255);
ellipseMode(RADIUS);
}
void draw() {
float angle = (TWO_PI * millis()/6000);
float radius = 20 * abs(sin(frameCount));
float tempX = (mouseX + radius * sin(angle));
float tempY = (mouseY + radius * cos(angle));
if(mousePressed){
stroke(0);
line(mouseX, mouseY, tempX, tempY);
noStroke();
fill(100,18);
ellipse(mouseX, mouseY,10+random(10), 10 +random(10));
}
if(keyPressed == true && key =='s') {
saveFrame("yourName.jpg");
}
if(keyPressed ==true && key=='r') {
background(255);
}
}