Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
loulouluzynski
loulouluzynski'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
beginnig
[4 Replies]
04-Nov-2010 07:25 AM
Forum:
Programming Questions
i have problem with this example of code, im on beginig of my way with processing...
the problem is about the condition i make
float lineX = 0;
float lineY = 0;
float lineH = 100;
float lineW = 50;
float lineStroke = 255;
float backgroundColor = 255;
float change = 0.5;
int w = int(random(1,4));
void setup (){
size (200,200);
smooth();
}
void draw(){
background(backgroundColor) ;
stroke(lineStroke) ;
line(lineX,lineY,w,lineH);
line(lineX,lineY,lineW,lineH*2);
line(lineX,lineY+w,lineW,lineH*4);
line(lineX,lineY,lineW,lineH*6);
lineX= lineX +1;
lineY= lineY +1;
lineW= lineW - change;
lineH= lineH + change;
lineStroke = w + 1 ;
if ( lineX >= 200) {
lineX < 200;
}
}
so i wish that line is swimming till it is x=200 and then coming back to 0 position,
possible is im wrong and dont undrestend the way conditionals working.....but wish to understand
thanks for patience
lou
«Prev
Next »
Moderate user : loulouluzynski
Forum