351
edits
No edit summary |
No edit summary |
||
Line 12: | Line 12: | ||
[[File:patchtunnel1.jpg|200px]] [[File:patchtunnel2.jpg|200px]] | [[File:patchtunnel1.jpg|200px]] [[File:patchtunnel2.jpg|200px]] | ||
<source lang="java"> | |||
float x; | |||
float y; | |||
void setup () { | |||
size(1600,900); | |||
smooth(); | |||
background(255); | |||
frameRate(2000); | |||
} | |||
void draw () { | |||
if(mousePressed) { | |||
x = random(100, 110); | |||
y = random(100, 110); | |||
noFill(); | |||
stroke(0, 50); | |||
color(50,20,80); | |||
ellipse(mouseX,mouseY,x,y); | |||
x = constrain(x,140,width); | |||
y = constrain(y,100,height); | |||
}else{ | |||
point(width/2,40); | |||
} | |||
} | |||
</source> |
edits