Archive

Monthly Archives: February 2012

Randomly came across this lil bit of code on the processing forums. Definitely something I want to mess with.

byte[] data=loadBytes("fire.jpg");
for(int i=0;i<100;i++) // 100 changes
{
int loc=(int)random(128,data.length);
data[loc]=(byte)random(255);
}
saveBytes("editedfire.jpg",data);

Update on my user expectation project.. using profile face detection to follow heads and display text referencing Ťhę Īmortał Gołdęn Łïon. Using profile face detection so, in theory, every time the person interacting with the work tries to look at the text, it will disappear. It’s a conspiracy.

ANTARCTICA PYRAMID: THERE TWO TYPE OF PEOPLE: THEY WHO SEE SIGNS: THEY WHO ARE LUCKY:

 

Things to do:

Smooth opencv data values for less stutter.
Text Manipulation? Make text more interesting.

Project really big so people can walk by.
ANTARCTICA PYRAMIDS

Been working on my user expectation project. Attempting to use face detection to do something.

So I’ve been working on my line drawing sketch, now it’s organized via functions.

 


float rndm;

void setup() {
rndm = random(255);

size (500,500);
background(255);
smooth();
frameRate(30);

}

void draw() {

lineparameters();
clicks();

}

void lineparameters() {

fill(0);
line(250,250,mouseX,mouseY);

}

void clicks() {
if(keyPressed && (key==CODED)) {
if(keyCode == SHIFT) {
background(255);

}
}
}

void mousePressed() {

stroke(0);
fill(0);
line(mouseX,mouseY,0,0);
line(mouseX,mouseY,500,500);
line(mouseX,mouseY,0,500);
line(mouseX,mouseY,500,0);

}

One of the original “hacks” of the PDP-1 in 1964, with a downloadable reproduction.

Munching Squares


foo, lat /load the 18-bit AC from the Test Word
add v /add the contents of memory location v to the AC
dac v /deposit the contents of the AC into v
rcl 9s /Rotate the combined AC-IO 9 bits to the left
xor v /exclusive-or the contents of v into the AC
dpy-i 300 /plot point at x = high ten bits of AC, y = high ten bits of IO
jmp foo

Learned how to get video to play in processing.. messing around.

 

 


 

 

 

 

 

 

import processing.video.*;
Movie mov;

void setup()
{ size(480,250,P2D);
frameRate(1);
mov = new Movie(this, "capnjazz.mp4");
mov.loop();
mov.play();
}

void movieEvent(Movie m)
{ m.read();
}

void draw() {
image(mov,0,0);

PFont font;
font = loadFont("HelveticaNeueLT-ThinItalic-20.vlw");
textFont(font);
fill(255);
stroke(255);
String s = "fire is motion. work is repetition.";
text(s, 60, 125,400,200);

if(mousePressed) {
mov.pause();
} else {
mov.play();
}
}

Reamde sketch now successfully switches from readme to reamde depending on mousePressed.