mac online apple blackjack http://www.euro-online.org

Current code Examples

Code Examples

Osceleton Part of sketch Code

//import libraries so communication can happen with Kinect as well as be able to handle

//movie files

import processing.opengl.*;

import oscP5.*;

import netP5.*;

PFont f;

OscP5 oscP5;

int userCount=6; //kinect max 7

float X;

float Y;

float Z;

float xmap;

float ymap;

float zmap;

float maxZ = 100.0;

//make an array of users

User [] myUsers = new User[userCount];//make array of users to hold a string 0-6

int closestUser=1000;

void setup() {

size(screen.width, screen.height);

f= loadFont(“Serif-48.vlw”);

//load font for de-bugging

oscP5 = new OscP5(this, “127.0.0.1”, 7110);

//check each user in turn, first user 0 then user 1 etc

for (int i=0;i<myUsers.length;i++) {

myUsers[i]= new User(0, 0, 0);

}

frameRate(30);

}

void oscEvent(OscMessage msg) {

//println(“msg results “+msg.checkAddrPattern(“/user/”+str(1))  );

//closestZ = maxZ;//resetting Z

for ( int i=1; i <= userCount; i++ ) {

if (msg.checkAddrPattern(“/user/”+str(i))) {

//i must be out as if not it will bugger up message)

//need to create variable of maximum users

X = (msg.get(0).floatValue());

Y= (msg.get(1).floatValue());

Z = (msg.get(2).floatValue());

xmap = map(X, 0, 1, 0, width);

ymap = map(Y, 0, 1, 0, height);

zmap = map(Z, 0, 3.5, 0, maxZ);

myUsers[i-1].update(xmap, ymap, zmap);

//beneath not needed but kept in case

/* if ( zmap > 0.0  && zmap < closestZ ) {//using greater than zero as when kinect loses user it prints 0.0

// if( i != closestUser ) { println(“Found new user ” + i ); }

closestUser = i;//will update with loop

closestZ = zmap;//closestUser z mapped to 100 for ease

myUsers[i-1].update(xmap, ymap, zmap);

*/

}

}

}

void draw() {

background(0);

textFont(f);

returnClosestUser();

int yPos = 50;

for (int i=0;i<myUsers.length;i++) {

if (i == closestUser) {//-1 because an array so User 1 is actually 0

fill (125);

}

else {

fill(255);

}

//print zvalues to screen

//text(i + ” = ” + myUsers[i].z, 10, yPos);

text(i+” “+myUsers[i].isAlive,10,yPos);

yPos += 50;

myUsers[i].drawUserEllipse();

}

yPos += 50;

text(“closest User is “+closestUser, 10, yPos);

}

//a function which checks which user is closest and returns the index of that user eg.

//which number in the array of users they are

void returnClosestUser() {

//int indexOfClosestUser=100;

//go throught the list of users

//int localClosestUser=100;

float closestZ=1000;

for (int i=0;i<myUsers.length;i++) {

//check their zpos against the current closestZ

//if it’s less than this but isn’t 0 then…

if (myUsers[i].z<closestZ&&myUsers[i].z!=0) {

println(“got closest Users which is now ” + i);

//make this the new closest z

closestZ=myUsers[i].z;

//and this is the index of the new closest user

closestUser=i;

}

}

}

User Class Code

class User {

float x, y, z;

//previous values of x,y,z – we will use these to see if this person has moved since last

//frame or not

float px, py, pz;

int timer;

boolean isClosestUser;

boolean isAlive;

User (float lx, float ly, float lz) {

px=x=lx;

py=y=ly;

pz=z=lz;

isAlive=false;

timer=0;

}

void update(float lx, float ly, float lz) {

x=lx;

y=ly;

z=lz;

//if nothing has changed since the last frame

if (px==x&&py==y&&pz==z) {

timer++;

}

//if we are moving we are also alive

else{

timer=0;

isAlive=true;

}

//how many frames someone needs to stay still for before we consider them dead

int timeOutThreshold=60;

if (timer>=timeOutThreshold) {

isAlive=false;

timer=0;

}

px=x;

py=y;

pz=z;

}

void drawUserEllipse() {

ellipse(x, y, z, z);

//println(“values of user data are : “+x+” “+y);

}

}

Pimage Code for Video Transitions

//getting invalid memory error or set a breakpoint in malloc_error_break to debug

import processing.video.*;

Movie movieBottom;

Movie movieMiddle;

Movie movieTop;

PImage TopAlpha ;

PImage MiddleAlpha;

int transparencyTop;

int transparencyMiddle;

float playheadBottom;

float playheadTop;

float playheadMiddle;

void setup() {

size(1024, 576, P3D);

TopAlpha = createImage(width, height, ARGB);

MiddleAlpha = createImage(width, height, ARGB);

movieTop = new Movie(this, “Close1-MAgicTest PhotoGood.mov”);

movieMiddle = new Movie(this, “trimmedTest-MAgicTest PhotoGood.mov”);

movieBottom = new Movie(this, “DMTimeLapse2-MAgicTest PhotoGood-MAgicTest PhotoGood.mov”);

movieBottom.play();

movieTop.play();

movieMiddle.play();

}

void draw() {

println (mouseY);

background(0);

if(mouseY<101){

image (movieTop, 0, 0);

playheadTop = map(mouseX, 0, width, 0, movieTop.duration());

movieTop.jump(playheadTop);

println (“playingTop”);

}

else if ((mouseY<170)&&(mouseY>100)) {//next zone <(height/3) && <(height/3)*2

println(“blending”);

transparencyTop = (int) map(mouseY, 170, 100, 0.0, 255.0);

movieTop.loadPixels();

TopAlpha.loadPixels();

int x=0;

int y=0;

for (int i = 0; i < TopAlpha.pixels.length; i++) {

color myColor = movieTop.get(x, y);

TopAlpha.pixels[i]= color(myColor, transparencyTop);

x++;

if (x>=width) {

x=0;

y++;

}

}

updatePixels();

image (movieMiddle, 0, 0);

image(TopAlpha, 0, 0);

playheadMiddle = map(mouseX, 0, width, 0, movieMiddle.duration());

playheadTop = map(mouseX, 0, width, 0, movieTop.duration());

movieMiddle.jump(playheadMiddle);

movieTop.jump(playheadTop);

}

else if ((mouseY>150)&& (mouseY<251)){

image (movieMiddle, 0, 0);

playheadMiddle = map(mouseX, 0, width, 0, movieMiddle.duration());

movieMiddle.jump(playheadMiddle);

println(“playingMiddle”);

}

else if ((mouseY > 250 ) && (mouseY<385)) {

println(“blending2”);

transparencyMiddle = (int) map(mouseY, 385, 250, 0.0, 255.0);

movieMiddle.loadPixels();

MiddleAlpha.loadPixels();

int x=0;

int y=0;

for (int i = 0; i < MiddleAlpha.pixels.length; i++) {

color myColor = movieMiddle.get(x, y);

MiddleAlpha.pixels[i]= color(myColor, transparencyMiddle);

x++;

if (x>=width) {

x=0;

y++;

}

}

updatePixels();

image (movieBottom, 0, 0);

image(MiddleAlpha, 0, 0);

playheadBottom = map(mouseX, 0, width, 0, movieBottom.duration());

playheadMiddle = map(mouseX, 0, width, 0, movieMiddle.duration());

movieBottom.jump(playheadBottom);

movieMiddle.jump(playheadMiddle);

}

else if (mouseY >384) {

println (“playing bottom”);

image (movieBottom, 0, 0);

playheadBottom = map(mouseX, 0, width, 0, movieBottom.duration());

movieBottom.jump(playheadBottom);

}

}

/*still working on this to develop states according to z so that the system knows what to do and will save it getting confused/ memory leaks. Also still developing the if esle and true false statements to allow the system to access video library in correct order*/

User Studies 3

These user studies took place at Northumberland College between the 24/07/12 and  26/07/12 with a collection of art practitioners and lecturers. The group had a demographic range between 26 – 59, both male and female. Each user practices in the arts within different sectors, painting, printing, fashion, sculpture, photography and performance. Each user was allowed to enter the set up alone as well as later join the other users within the set up space.

The version of M and M used allowed the viewer to move and transition between 2 videos, each allowing a closer look at a lone figure on the seaside cliffs.

 

The version of the sketch did have issues including crashes and bug reports. I was on hand however to restart this when these occurred. This was obviously influential on the Users experiences as the system wasn’t as dependable as I had hoped.

 

User 1- As well as producing a severe discomfort at the later stages of her initial (lone) interaction ,she also articulated that she thought it affected her ideas and relationship about technologies, these thoughts occurred after reflection. She enjoyed the experience more so of being a passive onlooker than the main user (closest). After a discussion about the project with myself she thought that the integration of further video fields that one could move in and out of would greatly improve the longevity and curiosity of her interaction with the piece.

User 2- This user was the “bravest” and youngest out of the group and explored the space confidently. They enjoyed the “reactive nature” of the video and thought that it was fun. This user is a bit of gamer and made connections between that process and the one that they had experienced.

Wanted to be able to explore a bit more and likened it to a vr type aesthetic.

User 3 – A painter by trade, they found it quite a meditative experience, allowing them to time to slowly progress through the footage at a rate they wanted to proceed. Brought up their previous notions of the coast and the Winslow Homer and his fascination with it.

User 4 –

Magic and Merger Testing Video Transitions

YouTube Preview Image

 

Testing out new code using else if statements. Transitions working but loosing some quality… also got a memory leak as sketch crashes after max 10 minutes, but you get an idea of how if approaching the screen the videos will move between each other blending using the alpha of a PImage. If you closely at the sketch you can read mouse Y values as well as what state the sketch is in.

Install design ongoing

Playing around with Sketch Up to see what install may look like. Including integration of screen, projector, kinect, computer and speakers. Measurements for 4 x 5m space.

Invisible artworks

Recently an exhibition at the Hayward Gallery in London has attempted to address a similar theme of the viewer’s investment when in a gallery by exhibiting a show of invisible artworks. The viewer is invited to explore empty spaces and blank canvases, to conjure up their own interpretations of the titles. Art critic Jones describes the viewers journey as “the human mind filling blanks with images and ideas” (Jones, 2012).

http://www.guardian.co.uk/artanddesign/2012/jun/10/invisible-art-about-unseen-review

http://ticketing.southbankcentre.co.uk/find/festivals-series/invisible-art-about-the-unseen-1957-2012