brain

Posted in homepage on July 4, 2009 by wicked7578private

19 Best Ads

Posted in Extra! on June 21, 2009 by wicked7578private

user testing final

Posted in thesis on June 8, 2009 by wicked7578private

chanel °5 ad with audrey tautou

Posted in Extra! on June 7, 2009 by wicked7578private

special characters for mac

Posted in Extra! on June 7, 2009 by wicked7578private
HTML Name Code HTML Number Code Glyph MacOS Windows Description
option – ] Alt + 0145 left single quote
option – shift – ] Alt + 0146 right single quote
single low-9 quote
option – [ Alt + 0147 left double quote
option - shift - [ Alt + 0148 right double quote
option - shift - w double low-9 quote
option - t Alt + 0134 dagger
option - shift - 7 Alt + 0135 double dagger
option - ; horizontal ellipsis
option - shift - r Alt + 0137 per mill sign
option - shift - 3 Alt + 0139 single left-pointing angle quote
option - shift - 4 Alt + 0155 single right-pointing angle quote
black spade suit
black club suit
black heart suit
black diamond suit
overline, = spacing overscore
leftward arrow
upward arrow
rightward arrow
downward arrow
option - 2 Alt + 0153 trademark sign
double quotation mark
& & & ampersand
< < < less-than sign
> > > greater-than sign
[ [ left square bracket
] ] right square bracket
option – hyphen Alt + 0150 en dash
option – shift -hyphen Alt + 0151 em dash
Alt + 0160 nonbreaking space
¡ ¡ ¡ option – 1 Alt + 0161 inverted exclamation
¢ ¢ ¢ option – 4 Alt + 0162 cent sign
£ £ £ option – 3 Alt + 0163 pound sterling
¤ ¤ ¤ Alt + 0164 general currency sign
¥ ¥ ¥ option – y Alt + 0165 yen sign
¦ or &brkbar; ¦ ¦ Alt + 0166 broken vertical bar
§ § § option – 6 Alt + 0167 section sign
¨ or &die; ¨ ¨ option – shift – u Alt + 0168 umlaut
© © © option – g Alt + 0169 copyright
ª ª ª option – 9 Alt + 0170 feminine ordinal
« « « option – \ Alt + 0171 left angle quote
¬ ¬ ¬ option – l Alt + 0172 not sign
­ ­ ­ Alt + 0173 soft hyphen
® ® ® option – r Alt + 0174 registered trademark
¯ or &hibar; ¯ ¯ Alt + 0175 macron accent
° ° ° option – shift – 8 Alt + 0176 degree sign
± ± ± option – shift – = Alt + 0177 plus or minus
² ² ² Alt + 0178 superscript two
³ ³ ³ Alt + 0179 superscript three
´ ´ ´ option – shift – e Alt + 0180 acute accent
µ µ µ option – m Alt + 0181 micro sign
option – 7 Alt + 0182 paragraph sign
· · · option – shift – 9 Alt + 0183 middle dot
¸ ¸ ¸ option – shift – z Alt + 0184 cedilla
¹ ¹ ¹ Alt + 0185 superscript one
º º º option – 0 Alt + 0186 masculine ordinal
» » » option – shift – \ Alt + 0187 right angle quote
¼ ¼ ¼ Alt + 0188 one-fourth
½ ½ ½ Alt + 0189 one-half
¾ ¾ ¾ Alt + 0190 three-fourths
¿ ¿ ¿ option – shift – ? Alt + 0191 inverted question mark
À À À option – ` A Alt + 0192 uppercase A, grave accent
Á Á Á option – e A Alt + 0193 uppercase A, acute accent
   option – i A Alt + 0194 uppercase A, circumflex accent
à à à option – n A Alt + 0195 uppercase A, tilde
Ä Ä Ä option – u A Alt + 0196 uppercase A, umlaut
Å Å Å option – shift – a Alt + 0197 uppercase A, ring
Æ Æ Æ option – shift – ‘ Alt + 0198 uppercase AE
Ç Ç Ç option – shift – c Alt + 0199 uppercase C, cedilla
È È È option – ` E Alt + 0200 uppercase E, grave accent
É É É option – e E Alt + 0201 uppercase E, acute accent
Ê Ê Ê option – i E Alt + 0202 uppercase E, circumflex accent
Ë Ë Ë option – u E Alt + 0203 uppercase E, umlaut
Ì Ì Ì option – ` I Alt + 0204 uppercase I, grave accent
Í Í Í option – e I Alt + 0205 uppercase I, acute accent
Î Î Î option – i I Alt + 0206 uppercase I, circumflex accent
Ï Ï Ï option – u I Alt + 0207 uppercase I, umlaut
Ð Ð Ð Alt + 0208 uppercase Eth, Icelandic
Ñ Ñ Ñ option – n N Alt + 0209 uppercase N, tilde
Ò Ò Ò option – ` O Alt + 0210 uppercase O, grave accent
Ó Ó Ó option – e O Alt + 0211 uppercase O, acute accent
Ô Ô Ô option – i O Alt + 0212 uppercase O, circumflex accent
Õ Õ Õ option – n O Alt + 0213 uppercase O, tilde
Ö Ö Ö option – u O Alt + 0214 uppercase O, umlaut
× × × Alt + 0215 multiplication sign
Ø Ø Ø option – shift – o Alt + 0216 uppercase O, slash
Ù Ù Ù option – ` U Alt + 0217 uppercase U, grave accent
Ú Ú Ú option – e U Alt + 0218 uppercase U, acute accent
Û Û Û option – i U Alt + 0219 uppercase U, circumflex accent
Ü Ü Ü option – u U Alt + 0220 uppercase U, umlaut
Ý Ý Ý Alt + 0221 uppercase Y, acute accent
Þ Þ Þ Alt + 0222 uppercase THORN, Icelandic
ß ß ß option – s Alt + 0223 lowercase sharps, German
à à à option – ` a Alt + 0224 lowercase a, grave accent
á á á option – e a Alt + 0225 lowercase a, acute accent
â â â option – i a Alt + 0226 lowercase a, circumflex accent
ã ã ã option – n a Alt + 0227 lowercase a, tilde
ä ä ä option – u a Alt + 0228 lowercase a, umlaut
å å å option – a Alt + 0229 lowercase a, ring
æ æ æ option – ‘ Alt + 0230 lowercase ae
ç ç ç option – c Alt + 0231 lowercase c, cedilla
è è è option – ` e Alt + 0232 lowercase e, grave accent
é é é option – e e Alt + 0233 lowercase e, acute accent
ê ê ê option – i e Alt + 0234 lowercase e, circumflex accent
ë ë ë option – u e Alt + 0235 lowercase e, umlaut
ì ì ì option – ` i Alt + 0236 lowercase i, grave accent
í í í option – e i Alt + 0237 lowercase i, acute accent
î î î option – i i Alt + 0238 lowercase i, circumflex accent
ï ï ï option – u i Alt + 0239 lowercase i, umlaut
ð ð ð Alt + 0240 lowercase eth, Icelandic
ñ ñ ñ option – n n Alt + 0241 lowercase n, tilde
ò ò ò option – ` o Alt + 0242 lowercase o, grave accent
ó ó ó option – e o Alt + 0243 lowercase o, acute accent
ô ô ô option – i o Alt + 0244 lowercase o, circumflex accent
õ õ õ option – n o Alt + 0245 lowercase o, tilde
ö ö ö option – u o Alt + 0246 lowercase o, umlaut
÷ ÷ ÷ Alt + 0247 division sign
ø ø ø option – o Alt + 0248 lowercase o, slash
ù ù ù option – ` u Alt + 0249 lowercase u, grave accent
ú ú ú option – e u Alt + 0250 lowercase u, acute accent
û û û option – i u Alt + 0251 lowercase u, circumflex accent
ü ü ü option – u u Alt + 0252 lowercase u, umlaut
ý ý ý Alt + 0253 lowercase y, acute accent
þ þ þ Alt + 0254 lowercase thorn, Icelandic
ÿ ÿ ÿ option – u y Alt + 0255 lowercase y, umlaut

angels & demons

Posted in Extra! on June 5, 2009 by wicked7578private
The Dan Brown phenomenon

Angels & Demons: Bernini’s Rome Roma, the city of Love. But in Angels & Demons, a secret layout of the Italian capital is uncovered, and the artist Bernini identified as the secret mastermind. Truth, or fiction?

Philip Coppens


Whereas the inspiration for Dan Brown’s “The Da Vinci Code” can be clearly tracked down – so much so that the likes of Baigent and Leigh felt they should sue the author – Brown’s “Angels & Demons” is far more original, both in theme and execution.
Whereas Leonardo da Vinci, the Priory of Sion and Opus Dei had been almost done to death both in fiction and non-fiction, no-one had ever used the Italian genius Bernini as a source of esoteric intrigue… perhaps because, if anything, Bernini appeared to be a devout Christian and hence difficult to massage into controversy. Brown, however, would transform this architect in a secret alchemist, who left clues of his secret alliance imprinted on the streets of Rome. But is this fiction, or not?

Brown commentator and author Simon Cox in “Illuminating Angels & Demons” writes that “Brown’s inclusion of the so-called ‘Father of the Baroque’, Gian Lorenzo Bernini, in Angels & Demons was an inspired decision. This remarkable sculptor, painter and architect has left an indelible mark on the face of modern-day Rome. Bernini is everywhere: his spirit is ever-present, and his legacy within the fabric of Roman society remains all-pervasive.” Cox is nevertheless sceptical that Bernini was a member of a secret society.
Gian Lorenzo Bernini (1598-1680) trained as a sculptor, and later became an architect. He was world-famous in both disciplines and within his own lifetime and it is said that when he finally visited Paris, when he walked about the city, its streets crowded with admirers – a quality that few artists ever achieved in their own lifetime, but Bernini did.

Bernini’s presence is visible in many locations across Rome; with a bit of artistic licence, one might argue that Rome as we know it, is Bernini. Chief for Brown’s plot are four statues – “Altars of Science” – which represent the four elements: earth, air, fire and water, which are of course more alchemical than scientific in origin. Water is represented by the Fountain of Four Rivers on the Piazza Navona. Fire is the Ecstasy of St Teresa, a sculpture inside the church of Santa Maria della Vittoria. Air is West Ponente at Saint Peter’s Square, while Earth is Habakkuk and the Angel in the Chigi Chapel of Santa Maria del Popolo.
The four locations are identified as the “Path of Illumination”, a series of clues which an Illuminatus is able to walk, and which will guide him to the secret meeting place of the Illuminati, upon which he will gain admission into the Order. Langdon, however, is not out for membership, but hopes to uncover evidence that will reveal the pressing enigma he needs to resolve. At each of the four locations, Langdon is confronted with a murder, the means of which is linked with the location’s element: the first cardinal is buried and has soil lodged in his throat: Earth; the second has his lungs pierced: Air; the third is engulfed in flames: Fire; the fourth is drowned in a fountain: Water.

One key site is therefore the Chigi Chapel, which is inside Santa Maria del Popolo. The church was erected in 1099 over the burial place of the Roman Emperor Nero, in order to sanctify what was believed to be an evil place – the emperor’s ghost had apparently appeared here numerous times. The Chigi chapel itself was designed by Raphael for Afostino Chigi, a wealthy Italian banker, but two of the sculptures, of Daniel and Habakkuk, are by Bernini. The chapel was to house the tombs of Afostino and his brother Sigismondo. Their tombs are a pyramidal structure and it is likely that this design was copied from earlier Roman tombs. Each tomb has one sculpture on the side. Habakkuk is an angel, appearing in an apocryphal text, linked with Daniel’s imprisonment in the lion’s den.
This provides us with an angel, but, in fact, Bernini seems not to have been that interested in angels, or demons – a fact also shown in the novel. In fact, the all important question is this: whether Bernini was a devout Christian, as the standard line has it, or whether Bernini sided with scientists, could he have sided with those favouring Egypt as the font of all knowledge?

Visit the Pantheon and next to it, in the Piazza della Minerva, is another Bernini statue: that of an elephant with an obelisk on his back. The design is not original to Bernini and is in fact found in the Hypnertomachia Poliphili. This extremely enigmatic book is linked with various occult lore and seeing that Bernini made a drawing from it into a statue begs the question whether this is further evidence of a secret allegiance of Bernini to some occult tradition. Remarkably, however, the statue does not feature in Brown’s book.
Equally, “official history” has gone out of its way to explain this statue, calling it “Bernini’s Chick”. Some interpret the statue as a reference to Pope Alexander VII’s reign and that it illustrates the fact that strength – the elephant – should support wisdom – the obelisk. Others will highlight that the statue, created in 1667, was done by one of Bernini’s students, Ercole Ferrata. They will talk about its smile, and how one needs to move towards the rear end of the animal, to see that its tail is shifted to the left, as it it is defecating, and how the animal’s rear points at the office of Father Domenico Paglia, a Dominican friar, who was one of the main antagonists of Bernini and his artisan friends, as a final salute and last word. Normally, it are the conspiracy theorists that are accused of reading too much into things, but when the official historian has to explain the obvious, namely that Bernini copied this from an occult-ish book, it clearly can stretch its theories as far, if not further, than any conspiracy theory!

Though the elephant goes unmentioned in Angels & Demons, the Pantheon nearby, does get a mention. Inside the Pantheon, Langdon notices a Christian tomb that is out of line with the orientation of the building and he starts a lecture of how Christianity borrowed from the Egyptian religion, particularly on the topic of the sun. Langdon sees the Pantheon as the “first altar of science” and the tomb of Santi, also known as Raphael.
Though a Catholic Church, originally the Pantheon was a temple built to honour the Roman gods. Original built in 27 BC by Marcus Agrippa, it burned down in 110 AD and Hadrian completed the present structure in 125 AD. It was consecrated a Roman church and dedicated as Santa Maria ai Mariti in allusion to bones found there in 609 AD.
The rotunda’s interior is perfect sphere, with a diameter of 43.4 metres, equal to its height. The walls are 6.1 metres thick and support the dome. The oculus in the centre of the ceiling is the only location of lightning. Recent research has shown that the Pantheon is in fact a sundial. When Robert Hannah of the University of Otago visited the Pantheon in 2005, he realised that during the six months of winter, the light of the noon sun traces a path across the inside of the domed roof. During summer, with the sun higher in the sky, the shaft shines onto the lower walls and floor. At the two equinoxes, the sunlight coming in through the hole strikes the junction between the roof and wall, above the Pantheon’s grand northern doorway. A grille above the door allows a sliver of light through to the front courtyard – the only moment in the year that it sees sunlight if its main doors are closed. Hannah thinks that by marking the equinoxes, the Pantheon was intended to elevate emperors who worshipped there into the realm of the gods. The equinoxes, of course, have always been very important for sun worshippers, like the ancient Egyptians. And the obelisk on the back of the elephant next to the Pantheon is of course a pure Egyptian symbol, and specifically linked with the sun cult.

Rome is the religious centre of the Catholic World. But remarkably for a town that claims to be Christian, its piazzas are crowned by Egyptian obelisks. The four rivers of the fountain in the Piazza Navona are the Danube, Ganges, Nile and the Rio de la Plata, each one representing its continent. From the base, there is also a red granite obelisk, 15.8 metres high, topped with a statue of a dove. The obelisk was quarried in Aswan for Emperor Domitian, probably to mark his ascension in 81 AD. It was originally placed in Rome between the temples of Isis and Serapis, then moved to Circus de Massenzio, and then moved here.
Another Egyptian obelisk stands outside the Santa Maria De Popolo. It came from Heliopolis and was erected by Seti I and Ramses II. It rises 23.8 metres high and weighs no less than 235 tonnes. It was moved to Rome in 100 BC and was placed on the Circus Maximus in Rome, where it later toppled, and whereby it was then moved to its present location by Pope Sixtus V in 1589.
The obelisk outside of Maria della Vittoria is thought to have been created by Emperor Hadrian, while the obelisk of the Piazza della Rotunda is part of a pair, erected at the temple of the sun god Ra in Heliopolis by Ramses II. It was brought to Rome and stood at the temple of Isis, was then moved to the Capitoline Hill in the 14th century and then moved again in 1711 by Pope Clement XI.

But it gets better: Bernini is also responsible for creating St Peter’s Square, which is not square at all but which is instead an elliptical plaza in front of St Peter’s, that “stadium” where the Catholic community gathers for the Christian festivals – and other important events, such as papal elections and funerals. 300,000 people easily fit inside. St Peter’s Square was built between 1656 and 1667. It has 284 Doric columns, each 18.3 metres tall. In the middle rise two fountains, one by Bernini himself, the other by Carlo Maderno.
Bernini chose the ellipse apparently to symbolise Copernicus’ discovery that our solar system was based on ellipses – the planetary orbits around the sun. No wonder that Brown therefore worked him into his plot and saw him as a “closest scientist”. But a more interesting possibility arises: great emphasis should be placed on the fact that the middle of the square – marking the position of the sun – is occupied by an Egyptian obelisk, which originates from the city of Heliopolis, the city of the Sun. Such symbolism – despite the addition of a cross on top – is not Christian. And as Robert Bauval has pointed out: the hieroglyph for Heliopolis was actually an obelisk with a cross on top, begging the question whether it is a coincidence or design that this obelisk has a cross on top. Furthermore, the entire layout was constructed at a time when the Vatican itself was still very uneasy about its relationship with science. And it does appear that Brown is correct and that Bernini had chosen sides… though perhaps not as obvious as Brown works it out in his novel.
So, indeed, there is even an obelisk in the very heart of St Peter’s Square, a grandiose 25 metres high and 320 tonnes in weight. This one is not covered with hieroglyphs and as such, its origins are officially unknown, though there are two theories: one, that it dates from the reign of Amenenhat II, and came from Heliopolis; or that it was more modern, and came from Alexandria. Pliny, a contemporary of Caligula, said that it had been made for one Nuncoreus, the son of Sesotris. If so, Sesostris I ruled from 1971 till 1926 BC and he is known to have carried out extensive work in Heliopolis. It is thought that the obelisk was then transferred to Alexandria by Emperor Augustus Caesar and raised there in the Julian Forum. In this scenario, two competing theories have become compatible. From there, it was moved to Rome by Caligula in 37 AD and raised in Caligula Circus, where St Peter was believed to have been martyred in 64 AD, i.e. the site of modern St Peter’s Square.
When raised in its current location, on September 27, 1588, Pope Sixtus V declared: “I exorcise you, creature of stone, in the name of omnipotent God, that you may become and exorcised stone worthy of supporting the Holy Cross, and be freed from any vestige of impurity or shred of paganism and from any assault of spiritual impurity.” He had the formula also carved into the western and eastern side of the obelisk, to make sure, it seems, that everyone realised that though a pagan object this was, it was now meant to be seen as a purely Christian artefact. Some might argue he protested too much and, indeed, if so pagan, why move it to such a select location to begin with?
Interestingly, the hieroglyph for Heliopolis is not only the obelisk with cross, but also a circle or ellipse, divided into eight, the symbol of city. It is a rather remarkable coincidence that Bernini’s design for St Peter’s “Square” has the eight divisions there. Coincidence? Or design? It surely must be the latter, and if so, though a devout Christian he might have been, he was definitely fascinated with ancient Egypt.

Since making an appearance in Brown’s “Angels & Demons”, Bernini has also played a small role in Kathleen McGowan’s “The Book of Love”. McGowan underlines that Pope Urban VIII commissioned Bernini to create a marble tomb for Matilda of Canossa, the main character of her book, when in 1635 her body was moved from the Monastery of San Benedetto Po. She also notes that inside St Peter’s, the baldachino, the bronze centrepiece beneath the dome, is supported by twisted columns that Bernini claimed came from a design drawn by Solomon himself for the first Temple. Finally, she claims that Bernini inherited the design for St Peter’s from Michelangelo. Or how, from hardly a mention, within a decade, Bernini has become part and parcel of various esoteric traditions that might have made Rome into what it is today.

There is, however, one potential mystery about Bernini that none of the novelists have touched upon so far. We know that in 1656, the French painter Nicolas Poussin – who resided in Rome – apparently confided something in Louis Fouquet, who wrote about this matter in a letter to his brother Nicolas Fouquet, the right-hand of the French King Louis XIV. Some time later, Fouquet fell foul of the king – for reasons still not totally explained. The king personally went through Fouquet’s documents, and when a jury found Fouquet not guilty, the king single-handedly changed that verdict and imprisoned Fouquet for the rest of his life, also making sure Fouquet would never receive any visitors. But that is not all. The king had also organised a campaign to lure Poussin to France. In the end, Poussin had to indulge his head of state but as soon as he could, he left France once again for Rome. Noting that in 1665, in the aftermath of Fouquet’s arrest, Bernini was invited by Louis XIV to design the new façade of the Louvre, one can merely wonder whether the French king was inviting key architects and artists for other reasons than those given. The fact that Bernini’s design was never used, might hint at the fact the king was not primarily interested in Bernini the architect, but Bernini the man.
If so, it means there is further mystery to a man who, thanks to novels such as “Angels & Demons”, is slowly beginning to be recognised for his outstanding contributions in decorating Rome, and a man who may have many more hidden depths to him than have so far been identified.

arduino w/ switch function

Posted in thesis on May 1, 2009 by wicked7578private

arduino code

processing code
import FaceDetect.*;
import processing.net.*;
import processing.serial.*;
import processing.video.*;

Client client;
boolean netSendInProgress = false;

FaceDetect fd;
//Capture cam;

int MAX = 100;

int[] x2 = new int[MAX];
int[] y2 = new int[MAX];
int[] r = new int[MAX];
int[][] Faces = new int[MAX][3];
int switchvalue = 0;

PImage b;

String filename = “yourface”; // don’t use .jpg extension
String url = “http://itp.nyu.edu/~js960/thesis/website/uploadjpg.php”;

boolean takingPicture = false;

Capture myCapture;
int a=50; //stepsize x
int c=1; //stepsize y
int x=0;
int xres = 480;
int yres = 360;
int s = second();

Serial[] myPorts = new Serial[4];  // Create a list of objects from Serial class

//rgb value to use for color per each circle
int[] rgbValuesA = new int[3];         // a list to hold data from the serial ports
int[] rgbValuesB = new int[3];
int[] rgbValuesC = new int[3];
int[] rgbValuesD = new int[3];

PFont myFont;     // The display font:
String inString;  // Input string from serial port:
int lf = 10;      // ASCII linefeed

int clearVal=0;

int redVal = 0;
int greenVal = 0;
int blueVal = 0;

void setup() {
size(1280,800);
smooth();
b = loadImage(”logo.jpg”);

myCapture = new Capture(this, xres, yres, 25);
fd = new FaceDetect(this);
fd.start(”haarcascade_frontalface_alt.xml”, xres,yres,25);
stroke(255,200,0);

noFill();

// Make your own font. It’s fun!
myFont = loadFont(”ArialMT-36.vlw”);
textFont(myFont, 18);
// List all the available serial ports:
//println(Serial.list());
// I know that the first port in the serial list on my mac
// is always my  Keyspan adaptor, so I open Serial.list()[0].
// Open whatever port is the one you’re using.
// myPort = new Serial(this, Serial.list()[0], 9600);

// get the ports’ names:
String portOne = Serial.list()[0];
String portTwo = Serial.list()[2];
String portThree = Serial.list()[4];
String portFour = Serial.list()[6];

// open the ports:
myPorts[0] = new Serial(this, portOne, 9600);
myPorts[1] = new Serial(this, portTwo, 9600);
myPorts[2] = new Serial(this, portThree, 9600);
myPorts[3] = new Serial(this, portFour, 9600);

myPorts[0].bufferUntil(lf);
myPorts[1].bufferUntil(lf);
myPorts[2].bufferUntil(lf);
myPorts[3].bufferUntil(lf);

}

void captureEvent(Capture myCapture) {
myCapture.read();
}

/*JPGMakerUploader jpger = new JPGMakerUploader(img,filename,url);
jpger.saveJPG();
jpger.upload();
noLoop();*/

void draw() {
background(255);

image(myCapture, 270, 40);

if (!takingPicture)
{

loadPixels();
filter (GRAY);

//fill(#B69041);
text(”COLOR VALUES”,780,60);
text(”forehead: ‘” + rgbValuesA[0]+”,”+rgbValuesA[1]+”,”+rgbValuesA[2] + “‘”, 780, 90);
text(”left cheek: ‘” + rgbValuesB[0]+”,”+rgbValuesB[1]+”,”+rgbValuesB[2] + “‘”, 780, 120);
text(”right cheek: ‘” + rgbValuesC[0]+”,”+rgbValuesC[1]+”,”+rgbValuesC[2] + “‘”, 780, 150);
text(”nose: ‘” + rgbValuesD[0]+”,”+rgbValuesD[1]+”,”+rgbValuesD[2] + “‘”, 780, 180);

text(”1. Wear a mask in front of you”,780,220);
text(”2. Wait 3 seconds and take off mask”,780,250);
text(”3. Face the monitor and don’t let your face get out of boundary. “,780,280);
text(”4. Click appropriate buttons below”,780,310);

stroke(255);

//face detect
Faces = fd.face(myCapture);
int count = Faces.length;
//    println(count);
if (count>0) {
for (int i = 0;i<count;i++) {
x2[i] = Faces[i][0];
y2[i] = Faces[i][1];
r[i] = Faces[i][2] * 2;

fill(rgbValuesA[0], rgbValuesA[1], rgbValuesA[2]);
ellipse(x2[i]+260, y2[i] – 40, 20, 20);
//left cheeck
fill(rgbValuesB[0], rgbValuesB[1], rgbValuesB[2]);
ellipse(x2[i]+220, y2[i]+60, 20, 20);
//right cheek
fill(rgbValuesC[0], rgbValuesC[1], rgbValuesC[2]);
ellipse(x2[i]+330, y2[i]+50, 20, 20);
//nose
fill(rgbValuesD[0], rgbValuesD[1], rgbValuesD[2]);
ellipse(x2[i]+270, y2[i]+40, 20, 20);
// println(i);
}
}

}
else{
saveFrame(”####_new.jpeg”);
takingPicture = false;
}

//average rgb colors
int avgR = (rgbValuesA[0] + rgbValuesB[0] + rgbValuesC[0]) + rgbValuesD[0] / 4;
int avgG = (rgbValuesA[1] + rgbValuesB[1] + rgbValuesC[1]) + rgbValuesD[0] / 4;
int avgB = (rgbValuesA[2] + rgbValuesB[0] + rgbValuesC[2]) + rgbValuesD[0] / 4;

color avg = color(avgR,avgG,avgB);

fill(avg,100);
ellipse(40,40,40,40);

}

void serialEvent(Serial thisPort) {
// variable to hold the number of the port:
int portNumber = -1;

// iterate over the list of ports opened, and match the
// one that generated this event:
for (int p = 0; p < myPorts.length; p++) {
if (thisPort == myPorts[p]) {
portNumber = p;
println(”portnumber = “+portNumber);
}
}

// read a byte from the port:
inString = (thisPort.readString());
inString = inString.trim();
String[] vals = split(inString, “,”);
// switchvalue = vals[3];  add the switch to each arduino and then uncomment
if(switchvalue == 0){// if the switch is in the 0 position, read and record the color sensor values
switch(portNumber)
{
case 0:
rgbValuesA[0] = int(vals[0]);
rgbValuesA[1] = int(vals[1]);
rgbValuesA[2] = int(vals[2]);
switchvalue = int(vals[3]);
println(”Got ” + rgbValuesA[0] + “,” + rgbValuesA[1] + “,” + rgbValuesA[2] + ” from serial port ” + portNumber);
break;

case 1:
rgbValuesB[0] = int(vals[0]);
rgbValuesB[1] = int(vals[1]);
rgbValuesB[2] = int(vals[2]);
switchvalue = int(vals[3]);
println(”Got ” + rgbValuesB[0] + “,” + rgbValuesB[1] + “,” + rgbValuesB[2] + ” from serial port ” + portNumber);
break;

case 2:
rgbValuesC[0] = int(vals[0]);
rgbValuesC[1] = int(vals[1]);
rgbValuesC[2] = int(vals[2]);
switchvalue = int(vals[3]);
println(”Got ” + rgbValuesC[0] + “,” + rgbValuesC[1] + “,” + rgbValuesC[2] + ” from serial port ” + portNumber);
break;

case 3:
rgbValuesD[0] = int(vals[0]);
rgbValuesD[1] = int(vals[1]);
rgbValuesD[2] = int(vals[2]);
switchvalue = int(vals[3]);
println(”Got ” + rgbValuesD[0] + “,” + rgbValuesD[1] + “,” + rgbValuesD[2] + ” from serial port ” + portNumber);
break;

default:
println(”Unable to determine port number”);
break;
}
}
else {
println(”switch is off”);
switchvalue = int(vals[3]);
}
}
void send2PHP(int portNumber, int[] rgb)
{
if(!netSendInProgress)
{
netSendInProgress = true;

String hostName = “itp.nyu.edu”;
String scriptLocation = “/”;

client = new Client(this, hostName, 80);

client.write(”GET ” + scriptLocation + “?colorSensor=” + portNumber + “&r=” + rgb[0] + “&g=” + rgb[1] + “&b=” + rgb[2] + “HTTP/1.1\n”);
client.write(”HOST: ” + hostName + “\n\n”);

println(”Uploaded”);

client.stop();
netSendInProgress = false;
}
}

void mousePressed() {

takingPicture = true;

}

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

potion

Posted in Interactive Art on April 29, 2009 by wicked7578private

final presentation

Posted in pencil, polymer and pixel on April 28, 2009 by wicked7578private

finally

Posted in thesis on April 26, 2009 by wicked7578private

it fucking worked on mac hardrive today. geeeeeez! colors are read on desktop computer w/ 5 ports. used extra usb port on keyboard for usb cam. geeeeeeeeez! after fucking 2 days! finally.

have to download open cv frameworks from here for face detect library to work.