Notes about Pure Data

Pure Data is a data-flow programming language.

It has three types of operations:

  • Inputs (sources of data)
  • Filters ( change the way the data flows)
  • Outputs (where the data goes)

Some things you should know

Route: route messages according to the first element

Unpack: split a message into atoms

TUIOClient: Outputs a list of TUIO messages, these messages need to be unpack

Flipbook script for Unity

//an array to hold frames
var flipbookFrames : Object [];

// currentFrame keeps track of what frame you are on
var currentFrame=0;

// FPS
var flipbookRate=24.0;

// use this for frame timer
var frameStartTime;

//built-in function
function Start ()
{
// load everything in the folder Assets/Resources/flipbook into Texture2D objects
flipbookFrames = Resources.LoadAll(“flipbook”,Texture2D);
//built-in property sets the texture for material
renderer.material.mainTexture=flipbookFrames[currentFrame];
frameStartTime=Time.time;

}
function Update () {

// check if enough time has passed to flip to next frame
if (Time.time >= frameStartTime + (1/flipbookRate))
{
// loop the image array
currentFrame++;
if (currentFrame>=flipbookFrames.length)
{
currentFrame=0;
}

// set the texture
renderer.material.mainTexture=flipbookFrames[currentFrame];

// reset frame timer
frameStartTime=Time.time;
}
}

Order of Presentations

Please upload your research essay onto LMS by Thursday March 22 if you haven’t done so already.

Thursday March 22.

Cody, Kelly, Anthony and Mary

Monday March 26.

Beth, Matthew, Adam and Colin

Thursday March 29

Grace, Alex, Varun, Tif and Bron

Monday April 2

Andrew, India, Victor and James

Processing Code for Kinect

import SimpleOpenNI.*;

SimpleOpenNI  context;

void setup()
{
  context = new SimpleOpenNI(this);
   
  // enable depthMap generation 
  context.enableDepth();
  
  // enable camera image generation
  context.enableRGB();
 
  background(200,0,0);
  size(context.depthWidth() + context.rgbWidth() + 10, context.rgbHeight()); 
}

void draw()
{
  // update the cam
  context.update();
  
  // draw depthImageMap
  image(context.depthImage(),0,0);
  
  // draw camera
  image(context.rgbImage(),context.depthWidth() + 10,0);
}