Dist2D area?
in
Programming Questions
•
1 year ago
Hi, does anybody know how can I reduce or change the area while using Dist() ?
I'm familiar with tuts from fun programming, but I'm new here...
- void setup(){
frameRate (10);
size (1000, 700);
background (0);
rectMode (CENTER);
}
void draw(){
for (int x = 25; x <= 1000; x +=50) {
for (int y = 25; y <= 700; y +=50) {
float d = dist (x, y, mouseX, mouseY);
rect (x, y, 50, 50);
fill (255-d, 0, 0);
}
}
}
1