학생작품 예제 - mouse position, mousePressed
//The fireworks burst in the black sky
void setup() {
size( 800,800);
background(0);
smooth();
} //size,color setup
void draw() {
smooth();
stroke(255,165,0);
line(mouseX,mouseY,220,220);
stroke(220,020,060);
line(mouseX,mouseY,450,450);
stroke(255,160,122);
line(mouseX,mouseY,220,650);
stroke(255,182,193);
line(mouseX,mouseY,700,100);
}//There are three of the color of lines and locate.
void mousePressed() {
stroke(255);
fill(240,230,140);
ellipse(mouseX,mouseY,50,50);
fill(#F7F25A);
ellipse(mouseX,mouseY,30,30);
}
//Two by superimposing the color and locate a circle.
댓글 없음:
댓글 쓰기