Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
kww1192
kww1192'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
Object instances with for loop
[3 Replies]
26-Feb-2013 02:48 PM
Forum:
Programming Questions
Hi guys, been trying to get my for loop working, I'm quite new to this so apologies if my code seems dumb!
If you want to see what I'm trying to duplicate then remove my for loop. Nearly been pulling my hair out on this.. any heads up?
void setup(){
size(480,120);
smooth();
}
void draw(){
background(#6B8E23);
for(int i=0; i>3; i++) {
owl(110, 110);
owl(240, 110);
}
}
void owl(int x, int y){
pushMatrix();
translate(x, y);
stroke(#8B4513);
strokeWeight(70);
fill(128);
line(0, -35, 0, -65);
noStroke();
fill (#FFE4C4);
ellipse(-17.5, -65, 35, 35); //right eye dome
ellipse(17.5, -65, 35, 35); //left eye dome
arc(0, -65, 70, 70, 0, PI); //chin
fill(0);
ellipse(-14, -65, 8, 8); //left eye
ellipse(14, -65, 8 ,8);
fill(#800000);
quad(0, -58, 4, -51, 0, -44, -4, -51);
popMatrix();
}
«Prev
Next »
Moderate user : kww1192
Forum