Skip to content

Commit

Permalink
Monday Class End
Browse files Browse the repository at this point in the history
  • Loading branch information
federicoburch committed Apr 15, 2013
1 parent 2b46fe0 commit f6030e2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
21 changes: 11 additions & 10 deletions processing/FireDance/FireDance.pde
Expand Up @@ -17,7 +17,7 @@ float seekY = 200;
int wiiPort = 9010;
int cameraSensorPort = 9020;
boolean hasWeight;
int numFramesTilGenerate = 100;
int numFramesTilGenerate = 20;

//These are the variables that the communication code writes to. Don't do anything but read from them
//or bad things (sychronization errors) will happen.
Expand All @@ -32,21 +32,22 @@ Movie movie;

PImage img;
PImage imgMask;
int w = 640;
int h = 360;
int w = 400;
int h = 600;
PGraphics maskme;
PGraphics movieImage;
PGraphics syphonImage;
PShader blur;

SyphonServer server;

int windowWidth = 0;
int windowHeight = 0;

void setup() {

//size(1920,1080,P3D);
int windowWidth = displayWidth;
int windowHeight = displayHeight;
windowWidth = displayWidth;
windowHeight = displayHeight;
windowWidth = w;
windowHeight = h;
size(windowWidth, windowHeight, P3D);
Expand Down Expand Up @@ -127,8 +128,8 @@ void gotCameraSensorData()
index +=1;
}
println("X:"+x+" "+"Y:"+y);
float scale_x = float(displayWidth)/float(windowSize);
float scale_y = float(displayHeight)/float(windowSize);
float scale_x = float(windowWidth)/float(windowSize);
float scale_y = float(windowHeight)/float(windowSize);
//winner_x = (.5+x)*scale_x;
//winner_y = (.5+y)*scale_y;
seekX = (.5+x)*scale_x;
Expand All @@ -149,8 +150,8 @@ void visualizeWeights()
if (windowSize > 0)
{
println("lets draw...");
float scale_x = float(displayWidth)/float(windowSize);
float scale_y = float(displayHeight)/float(windowSize);
float scale_x = float(windowWidth)/float(windowSize);
float scale_y = float(windowHeight)/float(windowSize);
int index = 0;
for (Float val:crowdSquares)
{
Expand Down
13 changes: 7 additions & 6 deletions processing/FireDance/Fireball.pde
Expand Up @@ -83,8 +83,8 @@ class Fireball {

PVector locForIJ(float x,float y)
{
float scale_x = float(displayWidth)/float(windowSize);
float scale_y = float(displayHeight)/float(windowSize);
float scale_x = float(windowWidth)/float(windowSize);
float scale_y = float(windowHeight)/float(windowSize);
float s_x = (.5+x)*scale_x;
float s_y = (.5+y)*scale_y;
return new PVector(s_x,s_y);
Expand Down Expand Up @@ -233,13 +233,14 @@ class Fireball {
}

void display(PGraphics graphics) {
graphics.noStroke();
graphics.fill(c);
graphics.stroke(0);
//graphics.noStroke();
//graphics.fill(0);

graphics.pushMatrix();
// image(img, location.x, location.y);
graphics.stroke(255);
graphics.fill(255);
graphics.ellipse(location.x,location.y,life,life);
graphics.ellipse(location.x,location.y,life*1.5,life*1.5);

//blend(img, 0, 0, 40, 40, 67, 0, 40, 40, ADD);
//translate(location.x, location.y);
Expand Down
Binary file added processing/FireDance/data/bubbles.mov
Binary file not shown.

0 comments on commit f6030e2

Please sign in to comment.