I want to do the mileometer calculation with on a mouse.
Hello. English is cramped because it is not good.
I'm sorry.
Please explain Japanese can be spoken in Japanese.
It is a situation that is shining at random now though I want to make the dot that shines reacting on the mouse extend like the ripple.
I want to calculate the distance with a present mouse cursor.
It shines frequently, it shines few when it is far, and I want to make it to feeling of disregard when it is further if the position of the cursor is near.
Such tentative present ↓ ..feeling it..
---------------------------------
void setup() {
size(800, 800);
colorMode(RGB);
background(20,1,55);
noStroke();
smooth();
frameRate(16);
}
void draw() {
int box_height =20;
int box_width = 20;
int base_color = 100;
int y_color = 100;
for(int i=0;i<50;i++){
for(int j=0;j<50;j++){
int e = int(random(5));
switch(e){
case 2:
float r_color = random(8,y_color);
fill(base_color + r_color,10,40);
ellipse(j*box_width, i*box_height, box_width, box_height);
break;
}
}
}
}