View allAll Photos Tagged Output
This one is using some tricks and optimisations found by a new friend of mine who is really really good at realtime graphics....
so a big big thanks to Inigo Iquilez (iq / rgba) for this!
The main optimisation is about the creation of the boxes in opengl... with all the tricks together the frame rate change from 15fps for 1800 cubes to 35 fps for 4500 cubes! (and that on my old crappy computer)
I'll post something on my website as soon as possible for all the boxes junkies that lives around here.
Little try with sunflow rendering.
import noc.*;
import hipstersinc.sunflow.*;
import hipstersinc.sunflow.shader.*;
import hipstersinc.*;
void setup() {
size(800, 600, "hipstersinc.P5Sunflow");
noStroke();
}
void draw() {
setupCamera();
setupScene();
background(255);
translate(width/2, height/2, 0);
rotateX(QUARTER_PI);
rotateZ(QUARTER_PI);
fill(255);
Vector3D pos = new Vector3D(0,0,0);
Vector3D rot = new Vector3D(0,0,0);
float scl = 25.5;
float boxSize = 560;
// translate(boxSize, boxSize);
for(int i=0; i<300; i++) {
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);
add = new Vector3D(random(-1,1),random(-1,1),random(-1,1));
add.mult(.2);
rot.add(add);
popMatrix();
}
saveFrame("output-####.png");
//noLoop();
//redraw();
}
void mousePressed(){
redraw();
}
void setupCamera() {
P5Sunflow sunflow = (P5Sunflow) g;
sunflow.camera.setType(SunflowCamera.PINHOLE);
//sunflow.camera.setType(SunflowCamera.SPHERICAL);
//sunflow.camera.setType(SunflowCamera.FISHEYE);
/*sunflow.camera.setType(SunflowCamera.THINLENS);
sunflow.camera.setFocalDistance(450);
sunflow.camera.setLensRadius(12f);
sunflow.scene.setAaSamples(12);*/
}
void setupScene() {
P5Sunflow sunflow = (P5Sunflow) g;
/* sunflow.scene.setAaMin(0);
sunflow.scene.setAaMax(0);
sunflow.scene.setAaSamples(0);
sunflow.scene.setFilter(null);*/
sunflow.scene.setGlobalIllumination(false);
}
Built with Processing.
I tend to leave output position to last.. The control layout often changes at the last minute.. jack and MIDI out
Built with processing!
After reading the last post of Marius Watz, I could not rersist to try Mesh library!
24V 40 Amp Hour Portable Solar Generator System
This Portable solar power system turns sunlight into electricity that can be used or stored away for future use.
There are 6 - 72w folding portable solar panels and the system can handle 400w of solar input at any given time. There is a 24v Cigarette lighter output that able to supply a constant 15 amps / 400w of power.
There is a 15 Amp AC Battery Charger that will quickly recharge a dead battery to full in 3 hours.
More info www.PortableSolarPower.Biz