Simon Geilfus
landscape_2x3_04
Built with Processing
import noc.*;
import hipstersinc.sunflow.*;
import hipstersinc.sunflow.shader.*;
import hipstersinc.*;
void setup() {
size(600, 900, "hipstersinc.P5Sunflow");
noStroke();
}
void draw() {
setupCamera();
background(255);
translate(width/2, 50, 0);
rotateX(QUARTER_PI);
rotateZ(QUARTER_PI);
fill(255);
float scl = 30;
int time = minute();
for(int j =0; j<3; j++){
Vector3D pos = new Vector3D(random(-500,500),random(-1000,300),-1000);
Vector3D rot = new Vector3D(0,0,0);
for(int i=0; i<3000; i++) {
float boxSize = 386+random(200);
pushMatrix();
translate(pos.x,pos.y,pos.z);
rotateX(rot.x);
rotateY(rot.y);
rotateZ(rot.z);
scale(random(.1),random(.4),random(.1));
box(boxSize);
Vector3D add = new Vector3D(random(-1,1),random(-1,1),random(-1,1));
add.mult(scl);
pos.add(add);
pos.z = constrain(pos.z,-800,-1400);
add = new Vector3D(random(-1,1),random(-1,1),random(-1,1));
add.mult(.05);
rot.add(add);
popMatrix();
}
}
saveFrame(int(minute()-time)+"minutesRendering.png");
saveFrame(int(minute()-time)+"minutesRendering.tif");
}
void setupCamera() {
P5Sunflow sunflow = (P5Sunflow) g;
//sunflow.camera.setType(SunflowCamera.PINHOLE);
sunflow.camera.setType(SunflowCamera.THINLENS);
sunflow.camera.setFocalDistance(450);
sunflow.camera.setLensRadius(12f);
sunflow.scene.setAaSamples(12);
}
landscape_2x3_04
Built with Processing
import noc.*;
import hipstersinc.sunflow.*;
import hipstersinc.sunflow.shader.*;
import hipstersinc.*;
void setup() {
size(600, 900, "hipstersinc.P5Sunflow");
noStroke();
}
void draw() {
setupCamera();
background(255);
translate(width/2, 50, 0);
rotateX(QUARTER_PI);
rotateZ(QUARTER_PI);
fill(255);
float scl = 30;
int time = minute();
for(int j =0; j<3; j++){
Vector3D pos = new Vector3D(random(-500,500),random(-1000,300),-1000);
Vector3D rot = new Vector3D(0,0,0);
for(int i=0; i<3000; i++) {
float boxSize = 386+random(200);
pushMatrix();
translate(pos.x,pos.y,pos.z);
rotateX(rot.x);
rotateY(rot.y);
rotateZ(rot.z);
scale(random(.1),random(.4),random(.1));
box(boxSize);
Vector3D add = new Vector3D(random(-1,1),random(-1,1),random(-1,1));
add.mult(scl);
pos.add(add);
pos.z = constrain(pos.z,-800,-1400);
add = new Vector3D(random(-1,1),random(-1,1),random(-1,1));
add.mult(.05);
rot.add(add);
popMatrix();
}
}
saveFrame(int(minute()-time)+"minutesRendering.png");
saveFrame(int(minute()-time)+"minutesRendering.tif");
}
void setupCamera() {
P5Sunflow sunflow = (P5Sunflow) g;
//sunflow.camera.setType(SunflowCamera.PINHOLE);
sunflow.camera.setType(SunflowCamera.THINLENS);
sunflow.camera.setFocalDistance(450);
sunflow.camera.setLensRadius(12f);
sunflow.scene.setAaSamples(12);
}