Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
gamap4n
gamap4n's Profile
1
Posts
1
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
For loop question
[2 Replies]
08-Sep-2011 07:58 PM
Forum:
Programming Questions
Hello there!
I'm a beginner in programming/processing and I've just started to work with embed for loop.
I wonder why this piece of code doesn't generate three horizontal lines of three ellipses, as the test operator is ''<='' :
size(480, 120);
background(255);
smooth();
noStroke();
for (int y = 0; y <= 40; y += 40) {
for (int x = 0; x <= 40; x += 40) {
fill(140);
ellipse(x, y, 40, 40);
}
}
Sorry if the answer is obvious but I can't figure out how it works right now...
Thanks for your help!
«Prev
Next »
Moderate user : gamap4n
Forum