Skip to content

Instantly share code, notes, and snippets.

@memish
Created January 3, 2019 20:49
Show Gist options
  • Save memish/defb9ccba83d5338bcc0b1a497c6e2b8 to your computer and use it in GitHub Desktop.
Save memish/defb9ccba83d5338bcc0b1a497c6e2b8 to your computer and use it in GitHub Desktop.
int x = 0;
int y = 0;
int side = 10;
boolean start = false;
void setup(){
frameRate(10);
size(600,400);
}
void draw(){
if(start==true){
// background(255);
stroke(255,0,0);
noFill();
ellipse(x,y,side,side);
line(x,y,side,side);
stroke(random(0,255),random(0,255),random(0,255));
line(x+15,y+15,side+10,side-10);
line(x+15,y+15,side-10,side+10);
side += 5;
x++;
y++;
}//end of if
}//end of draw
void mousePressed(){
x=mouseX;
y=mouseY;
side = 10;
start=true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment