Self Portrait with Simple Interactions

For this project I wanted an icon that represent me rather than a detailed drawing of myself. I was inspired by a cool project I found online:https://www.openprocessing.org/sketch/7639#

I hope that I can use this on the personal website that I am going to design for Communications Lab in the end of the semester. I have a few simple interactions: hair disappears, ear enlarges and glasses to sunglasses when hovered upon, and nose changes randomly when clicked on. Below is the code I used:

boolean hair = true;
//boolean sunGlasses = false;
int x1 = 290; //varialbes to change the mouth shape
int x2 = 325;
int counter = 0; //how many times nose is clicked
int earRadius1 = 30;
int earRadius2 = 50;

void setup(){
size(600,550);
rectMode(CENTER);
}

void draw(){

background(135,206,250);

//ear
if((mouseX>120 && mouseX<145)||(mouseX>420 && mouseX<445) &&(mouseY>220 &&mouseY<320)){
earRadius1 = 60;
earRadius2 = 100;
} else{
earRadius1 = 30;
earRadius2 = 50;
}
noStroke();
fill(241,194,125);
ellipse(170, 270, earRadius2, earRadius2);
ellipse(430, 270,earRadius2, earRadius2);
fill(255, 170, 150);
ellipse(170, 270, earRadius1, earRadius1);
ellipse(430, 270, earRadius1, earRadius1);

//face
noStroke();
fill(241,194,125);
rect(300, 255, 260,290,60);

//hair

if(mouseX>180 && mouseX<440 && mouseY>80 && mouseY<115){

hair = false;

}else{
hair = true;
}

if(hair){

stroke(9,8,6);
strokeWeight(10);
line(180, 115, 200, 80);
line(200, 115, 220, 80);
line(220, 115, 240, 80);
line(240, 115, 260, 80);
line(260, 115, 280, 80);
line(280, 115, 300, 80);
line(300, 115, 320, 80);
line(320, 115, 340, 80);
line(340, 115, 360, 80);
line(360, 115, 380, 80);
line(380, 115, 400, 80);
line(400, 115, 420, 80);
line(420, 115, 440, 80);

}

//eyes
noStroke();
fill(255);
ellipse(240, 210, 40, 40);
ellipse(360, 210, 40, 40);
fill(139,69,19);
ellipse(240, 210, 15, 15);
ellipse(360, 210, 15, 15);

//glasses

if(mouseX>170 && mouseX<430 && mouseY>170 && mouseY<250){
fill(125,56,78);
}else{
noFill();
}
strokeWeight(10);
stroke(0,0,0);
ellipse(240,210,80,80);
ellipse(360,210,80,80);
line(280,210,320,210);
line(200,210, 170,185);
line(400,210, 430,185);

//nose

stroke(50,205,50);
noFill();
bezier(x1, 280, 305, 295, x2, 275, 310, 260);

if(mouseX>290 && mouseX<325 && mouseY>260&& mouseY<295){
stroke(200,0,0);
line(330,290,450,310);
line(330,290,335,305);
line(330,290,340,280);
}

//mouth

if(hair){
strokeWeight(11);
stroke(205, 115, 115);
bezier(250, 310, 250, 370, 350, 370, 350, 310);

}else{
stroke(205, 115, 115);
bezier(350, 370, 350, 310, 250, 310, 250, 370);
}

}

void mouseClicked(){
if(mouseX>290 && mouseX<325 && mouseY>260&& mouseY<295){
x1 = int(random(0,600));
x2 = int(random(0,600));
counter++;
}
if(counter%3==0){
x1= 290;
x2 =325;
}
}

// inspired by: https://www.openprocessing.org/sketch/7639#

Self-Portrait

For my self-portrait, I wanted something simple, something that kind of looks like/resembles my Bitmoji character.

The first difference that I wanted to change from my Bitmoji character was the hair length though. Because my hair had grown out, I wanted my self-portrait to resemble this change and so had longer hair. I tried to keep everything relatively similar to my Bitmoji but decided for my portrait to only be just below shoulder length. The result was this:

Okay – very different portraits of me but similar vibes perhaps?

I then decided to incorporate something fancy that we experimented in class and thought that hey! I should change the colour of the shirt that I’m wearing to make the portrait more Harry Potter-esque and to show other people that I do change and wash my clothes. I used the mousereleased function that would change the colour of the shirt to a random colour every time the mouse is released. It’s random because we all need a bit of colour in our lives. Changes in shirt colour could be seen here:

Here is the code that I used:

int r,g,b;

void setup() {
size(600, 600);
smooth();
}

void draw() {
background(192, 195, 242);

fill(r,g,b);

//hair
noStroke();
fill(92, 73, 47);
ellipse(300, 220, 336, 300);
rect(132, 220, 336, 500);

//head
noStroke();
fill(255, 225, 190);
ellipse(300, 300, 275, 375);

//hair fringe part
noStroke();
fill(92, 73, 47);
arc(300, 180, 300, 180, PI, TWO_PI);
arc(255, 175, 225, 120, 0, HALF_PI+QUARTER_PI+THIRD_PI);

//ears
noStroke();
fill(255, 225, 190);
ellipse(160, 300, 35, 55);
ellipse(440, 300, 35, 55);
// earrings
noStroke();
fill(0);
ellipse(158, 320, 9, 9);
ellipse(442, 320, 9, 9);

//brows
noFill();
strokeWeight(5);
stroke(150, 105, 60);
arc(235, 270, 80, 35, PI, QUARTER_PI+HALF_PI+PI);
arc(365, 270, 80, 35, QUARTER_PI+PI, TWO_PI);

//eyes
stroke(0);
strokeWeight(0.5);
fill(255);
ellipse(240, 300, 65, 50);
ellipse(360, 300, 65, 50);
noStroke();
fill(100, 78, 49);
ellipse(240, 300, 33, 43);
ellipse(360, 300, 33, 43);
noStroke();
fill(0);
ellipse(240, 300, 17, 17);
ellipse(360, 300, 17, 17);

//nose
noFill();
stroke(211, 154, 100, 100);
strokeWeight(3);
arc(300, 350, 29, 30, 0, PI);
line(312, 323, 314, 347);
line(288, 323, 285, 347);

//mouth
noFill();
strokeWeight(5);
stroke(255, 170, 150);
arc(300, 400, 75, 45, 0, PI);

//neck
noStroke();
fill(255, 225, 190);
rect(240, 445, 120, 155);

//shirt
noStroke();
//fill(236, 169, 216);
fill (r,g,b);
arc(300, 600, 420, 200, PI, TWO_PI);
fill(255, 225, 190);
ellipse(300, 500, 120, 140);

}
void mouseReleased (){
if ((mouseX > 100 && mouseX < 500) &&
mouseY > 500) {
r=int(random(255));
g=int(random(255));
b=int(random(255));
}
fill(153);

}

One thing I had to mess around with was the ordering of the different body parts to make sure that one is on top of the other or under another. As well, I had to mess around with the x and y variables to make sure that the face is proportionate. The thing I got most frustrated with though was working with the arc function. The degrees radian part took so much trial and error that I was on the verge of giving up multiple times and wanted to go with a straight line instead – good thing I didn’t though.

Lev Manovich Response

I will admit, I find this almost painful to read. The author is extraordinarily dramatic about points that seems far less relevant to me. Begging with his short history of new media, I find that the relationship between the development of computers and new media is far more mundane than he makes out. It seems to me that it is simply one instance of the development of computing, which is a fundamentally universal function, enveloping another discipline. New media was certainly revolutionized, and at the time it was a significant breakthrough for computing, but no task a computer performs should be surprising in type, the only surprise is when the developers figure out the software to achieve some particular degree- this is the nature of a universal process.

I also find that the distinction between new and old media he makes in the very first principle is misleading. Specifically, what is new about new media is not that it can be described mathematically, but that the media was created with this knowledge in mind. Photography and sculpture are far from continuous, but this knowledge is not relevant from the majority of people who use it. However, I have experience with a realm of photography where light levels are so low that the image is considered in terms of individual photon counts: astronomy.

What I am basically getting at is that I strongly disagree with the implication made that new media is fundamentally new- it is our understanding of media that is new, the tools and processes differ only superficially. (I could go on, this response has only responded to the first couple pages, but I think I have made my point)

Self-Portrait

So when I started this assignment, I was definetely going for a badly animated weird-looking version of myself: this is my disclaimer.

I basically just used a combination of very simple shapes and lines in a specific order to create a face. I struggled the most with the arc, because it took me so long to figure out the numbers. In the beginning, I think trying to estimate the coordinate points and figure out what goes where in regards to numbers was the most challenging. But after a base is set up and parameters are set, it makes things easier. This is how my project ended up looking with my code:

 

Casey Reas’ Eyeo talk Response

While this talk contained a large number of very interesting random based artworks, I felt that it lacked a point. While it was stated that different balances of randomness and control explore different concepts, there was little analysis of this point. I would like to do this analysis myself, but the reason it is so difficult is because fundamentally what was described is a tool, and the primary purpose of of the talk seems to be to emphasize what the randomness itself brings to art, even when done with simple graphics. I personally felt that the most interesting and aesthetic pieces were where the algorithms were the most sophisticated, as the results had a geometric appearance at each static moment but moved very organically. However, as I mentioned this juxtaposition was under-analyzed, and mostly this was just a series of very cool images and some hint of the underlying algorithms, at least to me.

Making Interactive Art: Set the Stage, Then Shut Up and Listen – Response

As someone who doesn’t like to read the manual and jumps straight into pressing all the different buttons on a new gadget that I buy, it was really interesting for me to read how the author says that in designing an interactive artwork, one would give the audience the basic context, then get out of their way. This made me realise that my interaction with any device was probably planned to guide based on this idea.

Physical Computing’s Greatest Hits and Misses – Response

Throughout this course, I had assumed that I have to produce something original – original being something that never existed. This made me stress so much at the planning stage, leaving no cognitive resources for the actual building and programming stage. From this reading, I have learnt that just because something has been done before, doesn’t mean it isn’t original and I will try to incorporate this into my future projects by adding a new component to something that may have been created before to create a new story.

Motors: Human Movement Project

  1. My plan for the project was to create a spinning ballerina. I tried to wire up two DC motors to the Arduino board, but only one would work successfully. Adham helped me figure out that the Arduino probably doesn’t have enough energy to power two DC motors, so he let me borrow his motor shield.
  2. The motor shield was able to successfully power two DC motors. It was really easy and straightforward to work with it.
  3. When I used plain paper and stuck them on the DC motor, they would be too flimsy and easily fly off. Instead, I pasted an A4 image of a ballerina on the back and front side of the tissue-box cardboard material as opposed to normal cardboard, which was too thick. I used electrical tape so the cardboard wouldn’t fly off as the DC motors are quite powerful. I lowered down the speed from 20 to 80, as a speed of 150-180 appeared quite unnatural for a spinning ballerina and was too fast for the material to stay on properly.

Sometimes, the motors wouldn’t be in sync so the lower and upper part of the ballerina can appear unnatural. Also, the gap of motors between the ballerina’s upper and lower body again appears unnatural, but I couldn’t think of any other alternative to solve this issue. Lastly, if I had more time, I would have liked to create a strong holder for the spinning ballerina, so I don’t have to use my hand to hold it together (which appears unprofessional and can create unreliable outcomes).

Stupid Pet Trick & Assignment 4

For my stupid pet trick, I started with the idea that I like to bully my brother by repeating an action that creates an annoying sound. So I decided to make something that you can put on the door to create continuous knocking sound until the person has to come to the door to find out what is happening.

When the door is closed, the person with the controller can push the button to start the knocking and use the potentiometer to control the speed of the knock. When the person inside the room finds the sound annoying and opens the door to see who is outside, the knocking stops.

Here is the code I used for the stupid pet trick:

#include ;

int angle = 0;
Servo myServo;
int button = 3;
bool onOff = false;
bool prevButtonState = LOW;
int knob = A0;

void setup() {
pinMode(button, INPUT);
myServo.attach(9);
Serial.begin(9600);
}

void loop() {
bool currButtonState = digitalRead(button);
int knobState = analogRead(knob);
int knockSpeed = map(knobState, 0, 1023, 0, 350);

if (currButtonState == HIGH && prevButtonState == LOW) {
onOff = !onOff;
}

if (onOff) {
for(angle = 0; angle < 90; angle ++);
myServo.write(angle);
delay(analogRead(knockSpeed));
for(angle = 90; angle >0; angle –);
myServo.write(angle);
delay(analogRead(knockSpeed));
} else {
myServo.write(LOW);
}

prevButtonState = currButtonState;
}

Developing on my stupid pet trick, I created a small scale demonstration of the device in action. In doing so, I made the device work more automatically by getting rid of the button and the potentiometer, so now, the knocking continues when the door is closed until the door opens.

Here is the code I used for Assignment 4:

#include ;

Servo fistServo;
int button = 3;
bool onOff = false;
bool prevButtonState = LOW;
int knockRate = 500;
bool knockOn = false;
unsigned long currentMillis = 0;
int knockDirection = 0;
int nextKnockTime;

void setup() {
pinMode (button, INPUT);
fistServo.attach(5);
Serial.begin(9600);
fistServo.write(30);
}

void loop() {
bool currButtonState = digitalRead(button);
Serial.println(currButtonState);

bool prevOnOff = onOff;
onOff = currButtonState;
if (onOff)
currentMillis = millis();

if (currentMillis > nextKnockTime) {
knockOn = true;
nextKnockTime = currentMillis + knockRate;
}

if (onOff) {
if (knockOn) {
if (knockDirection == 0)
fistServo.write(30);
else if (knockDirection == 1)
fistServo.write(0);
knockOn = false;
knockDirection = 1 – knockDirection;
}
}
}

Physical Computing’s Greatest Hits and Misses Response

Taking an already existing idea and building onto it is great. Just take a look at the world’s most valuable tech company, Apple. Apple has been lagging behind in terms of groundbreaking innovation in recent years (despite their wild claims repeated 100x during their keynotes). Yet, their devices are still selling well enough to keep them atop that list. Why buy Apple’s products when you can just as easily spend your money on something that’s actually fresh and new? For many of us, the answer is simple: Apple’s products are designed and manufactured to such a high level of reliability that we would rather be a few months/years late to a technology than have it now and have it break in a couple of days. Apple knows this and they are not afraid to keep taking existing ideas, perfecting it, and spice it up with a cool minimalistic, Apple design.