Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
sameness
sameness's Profile
1
Posts
2
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Dist2D area?
[3 Replies]
21-Aug-2012 07:40 PM
Forum:
Programming Questions
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);
}
}
}
«Prev
Next »
Moderate user : sameness
Forum