float maxDistance;
void setup(){
size(400,400);
noStroke();
smooth();
fill(0,200);
maxDistance = dist(0,0,width,height);
}
void draw(){
background(204);
for(int i =0; i <= width; i += 15){
for(int j = 0; j <= height; j += 15){
float mouseDist = dist(mouseX,mouseY,i,j);
float diameter = (mouseDist/maxDistance)*66.0;
ellipse(i,j,diameter,diameter);
}
}
}
コメント
コメントを投稿