1000 lines

This was an edit of my hallway/10 lines. I was hoping to use the camera function in this one, but was unsuccessful in getting it to work.

 



float winX;
float lineCol, backgroundCol;
float startPoint;
float winSpeed;
void setup() {
size(700, 700, P3D);
winX= width/7;
lineCol=0;
backgroundCol=255;
startPoint=-2500;
}
void draw() {
noStroke();
background(backgroundCol);
if (winSpeed > 5300){
winSpeed=startPoint;
}
winSpeed=winSpeed+20;
for (int h=1; h < 125 ;h++)
{
moveZ(winX-(h*2), height/2, startPoint+h*2, winSpeed+sqrt(h)); 
}
if (pmouseX < mouseX && winSpeed > 3000 && winSpeed < 3400 ){
strokeWeight(sqrt(winSpeed/100));
if( backgroundCol == 255 )
while (backgroundCol > 0 )
{backgroundCol= backgroundCol-10;
}
if( backgroundCol == 0 )
while (backgroundCol < 255 )
{backgroundCol= backgroundCol+10;
}
if( lineCol == 255 )
while (lineCol > 0 )
{lineCol= lineCol-10;
}
if( lineCol == 0 )
while (lineCol < 255 )
{lineCol= lineCol+10;
}
}
}
void moveZ(float x, float y, float z, float speed) {
z = z + speed;
drawDoors(x*2, y, z);//left door
drawDoors(x*5, y, z+50);//rightdoor
}
void drawDoors(float x, float y, float z) {
float speed=10;
float side = 103;
stroke(lineCol);
strokeWeight(winSpeed); 
line(x, y+100, z+50, x, y+100, z-50);
line(x, y+side, z-50, x, y-side, z-50);
line(x, y-100, z-50, x, y-100, z+50);
line(x, y-side, z+50, x, y+side, z+50);
// beginCamera();
// camera(x,y,z+speed,x,y,z+speed, 0, 1, 0);
// endCamera();
}

Comments are closed.