flight404 / eyeo2012 Goto Github PK
View Code? Open in Web Editor NEWProjects I created for my talk at the Eyeo Festival.
Projects I created for my talk at the Eyeo Festival.
The i386 architecture is deprecated. You should update your ARCHS build setting to remove the i386 architecture. (in target 'Annihilation')
Please help ;
Changing the line
writeImage( getHomeDirectory() + "BubbleChamber/" + toString( mNumSaveFrames ) + ".png", copyWindowSurface() );
in the Bubble Chamber app to
writeImage( toString(getHomeDirectory()) + "BubbleChamber/" + toString( mNumSaveFrames ) + ".png", copyWindowSurface() );
fixes the compiling error.
Just noting here in case anyone wonders why that project doesn't work straight outta github.
I tried that shader in shaderfrog here. Some thing looks wired about it. I also tried to use it in processing. here is what it looks like .
black cube is the light position.
one thing that seems wrong is when cube goes behind the sphere the red blob does not go back. I think its because in code mvpMatrix of cam is passed to shader but I am not getting it how to access mvpMatrix of camera in processing. it must be that problem that is causing the anomaily.
Hey robert please don't mind I am just trying to understand the shader. :) your work always amaze me and I love it just trying to understand how you create those visuals. I know its hard for you to explain the code but I would appreciate if some one might do that. Just learning shaders.
PShader lantern;
void setup() {
size(700 , 600, P3D);
noStroke();
fill(204);
lantern = loadShader("frag.glsl", "vert.glsl");
float z =(height/2.0) / tan(PI*30.0 / 180.0); //default camera pos for processing
//println(z);
lantern.set("eyePos",width/2.0, height/2.0, z); //default camera pos for processing
lantern.set("roomDim",7000.0,7000.0,7000.0);
lantern.set("mainPower",05.99);
}
float t=0;float r=173;// ticker and radius of sphere
void draw() {
float dirY = 0;
float dirX = r*sin(t*2*PI);
float dirZ = r*cos(t*2*PI);
lantern.set("lightPos",-dirX,-dirY,dirZ,0); //setting light pos for the shader
shader(lantern);
background(0);
t+=0.01;
translate(width/2, height/2,0); //moiving to center of screen
//fill(255);
//directionalLight(20, 204, 204, -dirX, -dirY, dirZ); // setting directional ,not need for this shader
for(int i=0;i<1;i++){ //for if you wanted to create multiple spheres
fill(120,100,80);
pushMatrix();
translate(0, 0, 0); // translate multiple spheres to different positions : set the random values or some calculated locations(x= rad*sin(theta), y= rad*cos(theta))
sphere(170); //main sphere with shader
//box(900,900,0);
popMatrix();
}
resetShader();
pushMatrix();
translate(-dirX, -dirY, dirZ);
fill(255,0,0);
box(10,10,10); //virtual light box , just to see where the light is.
popMatrix();
}````
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.