Self Portrait – Using Processing

The task was to: create a self-portrait. The fact that I have spent my break actually painting a self-portrait is just funny because, in comparison to that, this small animated version of me is as good as it gets with my skills at processing. I used basic shapes and then a text that changes when you click it just to add some element of interactivity to the portrait. I also added an easel and a pallet at the right because it felt like there had to be something “about me” rather than just an animated version of me.

This was the full version of what I made at the end.

boolean textHasBeenClicked = false;

int count = 1;
void setup(){
  size(1000,1000);
  background(255, 200, 200);
}
 
void draw(){
  background(255, 200, 200);
  fill(101,67,33);
  ellipse(225,270,250,400);
  fill(255,205,148); //color of big ellipse
  ellipse(225,200,175,200); //big ellipse\
  noStroke();
  fill(101,67,33);
  rect(165, 100, 120, 40, 7);
  fill(25.1,50.1,100.2);
  rect(116,300,200,300,7);
  fill(255);//white iris
  ellipse(200, 175, 30, 20);//eye
  ellipse(250, 175, 30, 20);//eye
  fill(0); //color of small ellipses
  ellipse(200, 175, 20, 20);//small ellipses
  ellipse(250, 175, 20, 20);//small ellipses
  fill(255,0,0);
  arc(227, 241, 75, 50, 0, 3.14); //smile
  fill(0);
  triangle(228, 209, 221, 217, 237, 217);
  fill(181,101,29);
  ellipse(700,150,200,200);
  fill(255,0,0);
  ellipse(700,100,20,20);
  fill(0,255,0);
  ellipse(650,120,20,20);
  fill(0,0,255);
  ellipse(700,150,20,20);
  fill(250,218,94);
  ellipse(750,100,20,20);
  fill(255, 200, 200);
  ellipse(740,181,50,50);
  fill(255);
  rect(578,263,200,250);
  stroke(0);
  line(631, 606, 677, 516);
  line(677,516,717,606);

  fill(0);
      if (textHasBeenClicked) {
        // display text 2
        text("I waste my time listening to music and painting <3" , 400,300);
      
    }
    else  {
        // display text 1
        text("Hello, I am Dhabia, click on the text please" , 400,300);
        
    }
  frameRate(12);
  println(mouseX + " : " + mouseY);
  
}
 
void keyPressed(){

}
 
void mouseClicked(){
textHasBeenClicked = ! textHasBeenClicked;
}

An artist I felt particularly inspired by while researching is https://www.sergioalbiac.com, as he uses code to make art.

Self Portrait

This week’s assignment was to create a self-portrait in Processing. It felt a little counterintuitive to draw using lines of code, especially regarding time. Why should I draw a shape for like 5 minutes coding the exact position of vertices, while I can open Illustrator and have the same shape done it a matter of seconds? The answer came when I wanted to add some cool effects. And that got me very excited for all the possibilities that opened with this initial exercise.

For this assignment, I mostly I used the beginShape() endShape() function but to get some practice, I experimented with triangles, rectangles, ellipses and all sorts of shapes. Definitely the hardest one to crack were arcs and its angles – though they are very simple, I had to revisit high school trigonometry for that which opened some painful memories. I also googled a lot and the game-changing hack was to track your mouse cursor using “print” so you know the exact coordinates. Cannot even say how much time this has saved me. Also smooth() function is very great as it makes the corners look less robotic and more finessed!

Overall I created a very simplified version of me with some pastel colours and lazy triangular pseudo shadows to add some structure. And when you put your cursor to my necklace my hair (and eyebrows) go crazy. Yay.

And the code:

//setting up the colors I'm going to use
color backgroundColorA= color(170, 196, 171);
color backgroundColorB= color(115, 144, 130);
color faceColor = color(225, 199, 186);
color lipsColor = color(214, 171, 154);
color shirtColorLight = color(207, 213, 213);
color shirtColorDark = color(180, 181, 181);
color necklaceColorLight = color(211, 181, 123);
color necklaceColorDark = color(211, 168, 85);

//colors for shadows
color shirtShadowColor = color(227, 234, 235);
color cheeksColor = color(226, 169, 175, 50);

//color integers for some cool effects later on
int hairColor;
int hairShadowColor;

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

void draw () {
  background(backgroundColorB);
  noStroke();
  ellipseMode(CENTER);
  fill(backgroundColorA);
  ellipse(width/2, width/2, 450, 450);


  if (mouseX>240 && mouseX<260 && mouseY>370 && mouseY < 390) {
    hairColor = color(random(255), random(255), random(255));
    hairShadowColor = color(random(255), random(255), random(255));
  } else {
    hairColor = color(102, 94, 91);
    hairShadowColor = color(80, 75, 70);
  }


  //hair in the back
  fill(hairColor);
  rect(175, 240, 150, 150);


  //head and neck
  fill(faceColor);
  rect(160, 100, 180, 150, 10);
  rect(230, 240, 40, 40, 10);

  //shirt collar
  fill(shirtColorDark);
  rect(215, 294, 70, 5, 10);
  fill(shirtColorLight);
  rect(210, 275, 80, 20, 10);

  //shirt body
  fill(shirtColorLight);
  beginShape();
  vertex(215, 299);
  vertex(90, 320);
  vertex(90, 400);
  vertex(410, 400);
  vertex(410, 320);
  vertex(285, 299);
  endShape(CLOSE);

  //arms
  ellipseMode(CENTER);
  ellipse(90, 360, 20, 80);
  ellipse(410, 360, 20, 80);

  //shirt shadow
  fill(shirtShadowColor);
  triangle(380, 327, 409, 362, 397, 336);
  triangle(98, 369, 153, 388, 103, 380);
  triangle(261, 282, 279, 287, 276, 280);

  //necklace
  stroke(necklaceColorLight);
  strokeWeight(2);
  line(215, 299, 250, 370);
  line(285, 299, 250, 370);

  noStroke();
  fill(necklaceColorLight);
  ellipseMode(CORNER);
  ellipse(240, 370, 20, 20);

  fill(necklaceColorDark);
  ellipse(245, 370, 10, 10);


  //hair
  ellipseMode(CENTER);
  noStroke();
  fill(hairColor);

  //letf shape of hair
  beginShape();
  vertex(158, 108);
  vertex(128, 168);
  vertex(135, 258);
  vertex(125, 331);
  vertex(141, 367);
  vertex(176, 372);
  vertex(194, 315);
  vertex(181, 231);
  vertex(193, 167);
  vertex(204, 133);
  vertex(265, 110);
  endShape(CLOSE);

  //top of the head
  arc(323, 110, 100, 70, -PI, 0);
  arc(218, 110, 120, 70, -PI, 0);
  rect(251, 100, 40, 10);

  //right shape of hair
  fill(hairColor);
  beginShape();
  vertex(323, 102);
  vertex(313, 183);
  vertex(305, 281);
  vertex(315, 371);
  vertex(369, 328);
  vertex(386, 242);
  vertex(373, 109);
  endShape(CLOSE);

  beginShape();
  vertex(303, 104);
  vertex(322, 141);
  vertex(331, 97);
  endShape(CLOSE);

  //hair shadow
  fill(hairShadowColor);
  triangle(311, 255, 320, 344, 322, 286);
  triangle(168, 139, 167, 171, 154, 193);
  triangle(324, 84, 356, 104, 345, 90);
  triangle(173, 254, 187, 312, 170, 283);
  triangle(368, 147, 376, 229, 365, 183);
 


  //eyes
  stroke(lipsColor);
  strokeWeight(5);
  arc(220, 170, 20, 5, -PI, 0);
  arc(280, 170, 20, 5, -PI, 0);

  //lips
  stroke(lipsColor);
  strokeWeight(5);
  noFill();
  arc(250, 215, 30, 20, 0, radians(180));

  //chin
  strokeWeight(1);
  line(240, 250, 260, 250);

  //eyebrows
  stroke(hairColor);
  strokeWeight(3);
  noFill();
  beginShape();
  vertex(270, 150);
  vertex(280, 148);
  vertex(295, 150);
  endShape();

  beginShape();
  vertex(230, 150);
  vertex(220, 148);
  vertex(205, 150);
  endShape();

  //chubby cheeks
  fill(cheeksColor);
  noStroke();
  ellipseMode(CORNER);
  ellipse(190, 188, 30, 40);
  ellipse(282, 188, 30, 40);

  //cursor tracker
  print(mouseX);
  print(" ");
  println(mouseY);
  
  saveFrame("me_####.png");
}

 

Response to “Her Code Got Humans on the Moon”

I can’t even imagine what it must have felt like to be a woman working in IT in 1960s. Great amount of prejudice, underrepresentation, pushback, judgement or any other form of sexism are still extremely  pressing issues nowadays not only in IT and STEM fields but in any working environment in general. And although the article only subtly touches the gender related struggles of Hamilton’s experience and mostly advocates for retrospective recognition of her great achievements, it still strikes me of how far we have come and how far we still have to go regarding this matter.

After finishing the article, I felt a strong sense of admiration for Hamilton. Her story is very similar to thousands of other women who had to get out of the rigid boxes that society put them in. It captures the struggles they, equally qualified employees, had to go through while their male colleagues did not. And how much less space they had for creating any mistakes. Let’s say Hamilton was male. Would they have still considered the code she wanted to add as unnecessary?

What is more, Hamilton achieved a breakthrough in a field that did not even exist at the time – she succeeded in it before they managed to declare it a male dominated industry that she would have no place in. And the fact that her, and probably many other women helped set foundations to software as we know it today, puts the whole “IT is a man’s world” argument into question.

Self-Portrait

For this project, I made a self-portrait using processing. I decided to create a fairly basic human-looking face and incorporated a few features that I thought were very characteristic of me. This includes my really big eyebrows, along with my hair which frequently changes.

When any key is pressed, the hair changes between three different states: a top hat, a mohawk, and bald. I added more interaction by allowing the user to control which direction my mohawk was going in through the use of the mouse. Lastly, my pupils follow the mouse as well when the user moves it around.

I found it difficult to use the arc tool at first, but I was able to get it to do what I wanted more or less, though I still cannot say that I mastered it.

Here is the code I used for the project:

boolean hair1 = true;
boolean hair2 = false;
boolean hair3 = false;

int state = 0;

void setup() {
  size(400, 500); 
  rectMode(CENTER);  
  background(131, 206, 210);
}


void draw() {
  background(131, 206, 210);
  //create my white t-shirt
  fill(255, 255, 255);
  noStroke();
  beginShape();
  vertex(0, 500);
  vertex(160, 421);
  vertex(241, 421);
  vertex(400, 500);
  endShape(CLOSE);
  //hair 1 back of head
  if (hair1) {
    fill(0, 0, 0);
    strokeWeight(10);
    ellipse(200, 140, 80, 80);
  }
  //neck
  fill(224, 192, 134);
  noStroke();
  rect(200, 370, 80, 105);
  //ears 
  strokeWeight(14);
  fill(242, 160, 147);
  stroke(234, 192, 134);
  ellipse(100, 220, 40, 40);
  ellipse(300, 220, 40, 40);

  // face 
  noStroke();
  fill(234, 192, 134);
  ellipse(200, 250, 200, 250);

  //mouth
  strokeWeight(10);
  stroke(205, 115, 115);
  arc(200, 290, 60, 60, 0, PI);  // upper half of circle
  //more of hair 1 (on top of hair)
  if (hair1) {
    fill(0, 0, 0);
    noStroke();
    strokeWeight(20);
    arc(200, 145, 125, 50, 0, PI, OPEN);
    ellipse(200, 140, 105, 30);
  }
  //eyes
  noStroke();
  fill(255, 255, 255);
  ellipse(155, 220, 35, 35);
  ellipse(240, 220, 35, 35);

  //pupil
  strokeWeight(7);
  stroke(0, 0, 0);
  fill(139, 69, 19);
  ellipse(constrain(mouseX, 152, 158), constrain(mouseY, 217, 223), 8, 8);
  ellipse(constrain(mouseX, 237, 243), constrain(mouseY, 217, 223), 8, 8);

  //eyebrows
  strokeCap(ROUND);  
  strokeWeight(14);
  fill(0, 0, 0);
  line(125, 190, 178, 190);
  line(215, 190, 268, 190);

  strokeWeight(6);
//assign states of hair to change
  if (state == 0) {
    hair1 = true; 
    hair3 = false;
  } 

  if (state == 1) {
    hair1 = false; 
    hair3 = false;
  }  
  if (state == 2) {
    hair3 = true; 
    hair1 = false;
  }    
  if (hair3) {
    strokeWeight(20);
    line(160, 140, constrain(mouseX, 70, 210), constrain(mouseY, 60, 80));
    line(175, 140, constrain(mouseX, 90, 230), constrain(mouseY, 60, 80));
    line(190, 140, constrain(mouseX, 110, 250), constrain(mouseY, 60, 80));
    line(205, 140, constrain(mouseX, 130, 270), constrain(mouseY, 60, 80));
    line(220, 140, constrain(mouseX, 150, 290), constrain(mouseY, 60, 80));
  }
}

void keyPressed() {
    state += 1;
    if (state == 3) {
      state = 0;
    }
  }

 

 

Self Portrait

For this “self portrait”, I mainly just tried to add face features and use the right colors for them, but I wasn’t able to actually draw it the way it actually looks since that was a hard. The one additional aspect I added was that the eyes sort of blinks after a few seconds. This was achieved by modulating the frameCount and whenever the value is between 0 and 50, the eyes will not show, therefore, creating the visual effect of blinking. This project just involved a lot of trial and error for placing shapes and it was a great learning experience. I think the arcs are still a bit confusing but after remembering middle school math, I think I’ve gotten the hang of it.

void setup() {
  size(460, 500);
  frameRate(30);
}

void draw() {
  noStroke();
  background(104, 193, 200);
  fill(0);
  rectMode(CENTER);
  rect(width/2, height/2 + 30, 270, 300);
  
  //shirt
  fill(17, 103, 168);
  ellipse(width/2, height/2 + 285, 280, 300);
  
  //face and neck
  fill(239, 198, 107);
  ellipse(width/2, height/2 - 30, 250, 300);
  rect(width/2, height/2 + 130, 50, 50);
  arc(width/2, height/2 + 140, 90, 50, 0, PI);
  
  //eyes
  if (frameCount % 50 > 0 && frameCount % 50 < 50) {
    noStroke();
    fill(255);
    ellipse(width/2 - 55, height/2 - 50, 50, 20);
    ellipse(width/2 + 55, height/2 - 50, 50, 20);
    fill(102, 82, 34);
    ellipse(width/2 - 55, height/2 - 50, 20, 20);
    ellipse(width/2 + 55, height/2 - 50, 20, 20);
  } else {
    noFill();
    arc(width/2 - 55, height/2 - 70, 50, 10, 0, PI);
    arc(width/2 + 55, height/2 - 70, 50, 10, 0, PI);
  }
  
  //nose, arm line
  stroke(0);
  line(width/2, height/2, width/2, height/2 - 35);
  line(width/2 + 80, height/2 + 250, width/2 + 80, height/2 + 180);
  line(width/2 - 80, height/2 + 250, width/2 - 80, height/2 + 180);
  
  //eyebrow
  noFill();
  arc(width/2 - 55, height/2 - 70, 50, 10, PI, TWO_PI);
  arc(width/2 + 55, height/2 - 70, 50, 10, PI, TWO_PI);
  
  //mouth
  fill(0);
  arc(width/2, height/2 + 40, 100, 70, 0, PI);
  arc(width/2, height/2 -100, 270, 230, PI, TWO_PI);
  fill(229, 87, 87);
  arc(width/2, height/2 + 59, 80, 30, 0, PI);
}

Response to Norman’s “Emotion & Design: Attractive things work better”

I must admit that prior to reading Norman’s chapter, I was thinking of attractiveness of design as a bonus – something that makes some people feel more comfortable using it, but never as something that has direct biological ties. That beautiful design is perceived to be easier to use (almost like a placebo effect – which is still a valuable one) rather than to actually be easier to use. Therefore, to me, it was quite eye-opening to read Norman’s scientific reasoning (communicated in a very simple and approachable way) on why, from evolutionary perspective, making people feel good and relaxed or stressed and tense has an effect on how they use and experience the product. And in result, how it shapes the usability of the product itself.

Yet it all sounded a way too good, a way too simple and I got very skeptical. As if there was a general pattern based on the way all of our brains are wired to follow when designing. Then Norman saved it a little and added crucial points about how some of these mechanisms are “predispositions rather than full-pledges systems” and “one person’s acceptance is another one’s rejection.” And though the points on visceral, behavioural, reflective experience introduce a new, more strategic and thoughtful way of designing not only the product but the experience with it as well, the conclusion is left very open.

To me, it raised many more questions: if there is a clash, is it the fault of the product or of the individual using it? Where is the line and what is the extent to which the designer is supposed to predict one’s affect and adjust the final product to it? Is it even possible to do it? And while Norman’s chapter offered really great points and fresh perspective for consideration, it feels like another extra kilo was added to the burden that designers carry. Norman introduced more factors (though very crucial ones) to consider, which make a designer’s job even more impossible than it was before because humans are diverse and confusing.

Little Portrait

So, first of all, I am obsessed with processing. Second, here is my portrait for the class. I was interested in capitalizing on something distinct about my portrait. I decided to focus on my glasses and vest. I ended up mapping my mouse movement to a range of colours on my glasses, and then a series of colours in the background upon a mouse click. I’m excited to see what else I can do with this platform.

int r, g, b, vestColor, vestColor2;
int br, bg, bb;
int[] backgroundColor ={ color(237,234,212), color(65,175,175), color(107,79,138)};
int whichBG = 0;

  void setup () {

  size (600, 600);

  r = color (215);
  g = color (245);
  b = color (255);

  br = 237;
  bg = 234;
  bb = 212;




  vestColor = color (100);
  vestColor2 = color (65);
}

void draw() {
    background (backgroundColor[whichBG]);
//you need to reference the backgroundColor, because it is an array. so Always put in brackets for which value you are calling.
//generally you call color 1 by saying backgroud (backGroundColor[0]). but this time we want to call the color based on the click
//this is why we place the modulus in mousePressed, so that everytime you click, the modulus adds one. And when referenced by the array, is calls the right number.


  //   NECK
  strokeWeight (0);
  fill (163, 117, 67);
  rect (280, 300, 20, 150);

  fill (137, 99, 61);
  rect (300, 300, 20, 150);

  //   HEAD
  //   pt. 1
  strokeWeight (0);
  fill (188, 133, 63);
  rect (200, 160, 100, 170);
  triangle(200, 330, 300, 370, 300, 330);
  //   pt. 2
  fill (163, 117, 67);
  rect (300, 160, 100, 170);
  triangle(400, 330, 300, 370, 300, 330);

  //   EARS
  strokeWeight (0);
  fill (163, 117, 67);
  rect (190, 260, 10, 33);
  fill (137, 99, 61);
  rect (400, 260, 10, 33);

  // EARINGS
  strokeWeight (0);
  fill (80);
  rect (189, 280, 5, 10);
  rect (189, 270, 5, 7);
  fill (0);
  rect (406, 280, 5, 10);
  rect (406, 270, 5, 7);


  //   GLASSES

  //Scale the mouse Y value from 0 to 600 to a range between 215 and 105 
  //If the mouse moves down, the color changes
  float cRed = map(mouseY, 0, width, 215, 105);
  float cRed2L = map(mouseX, 0, width, 245, 100);
  float cRed2R = map(mouseX, 0, width, 100, 245);


  fill (cRed, cRed2L, 255);
  stroke (10);
  strokeWeight (10);
  ellipse (250, 250, 80, 80);

  fill (cRed, cRed2R, 255);
  ellipse (350, 250, 80, 80);
  stroke (10);
  line (310, 250, 290, 250);

  //   HAIR
  //   top
  strokeWeight (0);
  fill (0);
  beginShape ();
  vertex (200, 180);
  vertex (200, 130);
  vertex (320, 100);
  vertex (400, 100);
  vertex (400, 160);
  vertex (400, 180);
  vertex (380, 160);
  vertex (220, 160);
  endShape (CLOSE);
  //   sides
  rect (190, 130, 10, 130);
  rect (400, 100, 10, 160);

  //   SHIRT
  //   side I
  noStroke();
  fill (255);
  beginShape ();
  vertex (280, 400);
  vertex (300, 420);
  vertex (300, 520);
  vertex (190, 520);
  vertex (190, 420);
  endShape (CLOSE);
  //   side II
  fill (220);
  beginShape ();
  vertex (320, 400);
  vertex (300, 420);
  vertex (300, 520);
  vertex (410, 520);
  vertex (410, 420);
  endShape (CLOSE);



  //   VEST
  fill (vestColor);
  beginShape ();
  vertex (270, 397);
  vertex (270, 520);
  vertex (200, 520);
  vertex (200, 410);
  endShape (CLOSE);

  fill (vestColor2);
  beginShape ();
  vertex (330, 397);
  vertex (330, 520);
  vertex (400, 520);
  vertex (400, 410);
  endShape (CLOSE);

  if (mousePressed) {
    vestColor = 50;
    vestColor2 =0;
  } else {
    vestColor=100; 
    vestColor2=65;
  }


  //   BEARD
  //   partI
  fill (30, 200);
  beginShape ();
  vertex (200, 300);
  vertex (250, 340);
  vertex (300, 340);
  vertex (300, 370);
  vertex (200, 330);
  endShape (CLOSE);
  //   part II
  fill (0, 200);
  beginShape ();
  vertex (300, 340);
  vertex (300, 370);
  vertex (400, 330);
  vertex (400, 300);
  vertex (350, 340);
  endShape (CLOSE);

  //   mustache
  fill (30, 200);
  rect (270, 310, 30, 10);
  // rect (270, 315, 10, 10)
  fill (0, 200);
  rect (300, 310, 30, 10);
  // rect (320, 315, 10, 10)

}


void mousePressed () {

   whichBG = (whichBG + 1) % 3;
  
  
}

 

As someone who is very expressive about their emotional state, I found today’s article a valuable framework for how to process my flurry of feelings. In the context of interactivity and user interfaces, Visceral, Behavioral, and Reflective states of mind are useful concepts in directing an experience between a product and human. How do we ensure that an individual is aware of the functions of any given thing, and is in the right state of mind to use it? How can we change the way someone uses it depending on their state of mind?

Norman describes this in the context of a nuclear plant, describing the larger environmental design. When reflective processes are necessary for a sensitive area, humans require particular environments. If that area becomes the location of a high stakes situation, we must create just the right amount of stress to promote focus.

My only issue, one that Norman acknowledges, is diversity. What is stressful for one person is not for another, and vice versa. Along these lines, I pose the same question as before: How do we ensure that an individual is aware of the functions of any given thing, and is in the right state of mind to use it? But also, how do we account for this diversity. Diversity in ability, in psychological and linguistic associations, etc. My short answer is context and asking: Who uses what in what context? Or the more sinister and marginalizing question: Who do we want to use what in the contexts we choose? This question has most likely been asked in many political and institutional contexts and has come to deeply affect how we use our world, and how we view people and things that are undesirable. Doors on this campus are but one example, while the racially and ethnic segregation of the larger metropolitan area of Abu Dhabi is another.

Designers have the power to do good and include, but also marginalize. I only hope to do the former over the latter.

 

 

 

 

Self-Portrait Using Processing

For this project, we were asked to create a self-portrait using processing. I drew an image of myself using primitive shapes, which was difficult at first but it became fun as soon as I became more familiar with shape coordinates. I wanted to create something that’s simple yet also visually appealing. To add an extra element to my self-portrait, I created an array of three images for my background, where I had three different “shades” of one image so that the background changes every time you click the mouse. This is what it looks like: 

And here’s my code:

  //my self-portrait 

float PImage;
PImage im ;                        
PImage [] backgrounds = new PImage[3]; // background array of 3 images
int currentBgNumber = 0;

void setup()
  {
     
     size(852, 480);

   backgrounds = new PImage[3];
    backgrounds[0] = loadImage("1.jpg"); 
    backgrounds[1] = loadImage("2.jpg");
    backgrounds[2] = loadImage("4.jpg");

   }
  
  void draw() 
  {
    
    background(backgrounds[currentBgNumber]);
    
    //hair
    stroke(0);
    fill(0);
    rect(100, 50, 400, 100);
    rect(100, 150, 400, 100);
    rect(100, 200, 400, 100);
    rect(100, 300, 400, 100);
   rect(100, 350, 400, 200);
  
    fill(247, 166, 79);
  
    //neck and body
    
    strokeWeight(4);
    stroke(15, 139, 141);
    fill(224,172,105);
    rect(235, 350, 75, 100);

    fill(224,172,105);
    rect(100, 405, 350, 375, 45);
    
    //shirt
    fill(250);
    rect (140, 405, 260, 200); 
    strokeWeight(4);
    //line (140, 450, 397, 450);
    //line (140, 470, 397, 470);
    //line (140, 490, 397, 490);
    
    //ears
    fill(224,172,105);
    stroke(63, 124, 172);
    ellipse(100, 200, 60, 100);
    ellipse(440, 200, 60, 100);
    
    //earrings
    strokeWeight(1);
    fill(250);
    ellipse(90, 235, 5, 5);
    fill(220,220,220);
    rect(103, 236, 2, 30);
    ellipse(450, 235, 5, 5);
    rect(440, 236, 2, 30);
    strokeWeight(3);
    
    //head
    stroke( 166, 128, 140);
    ellipseMode(CENTER);
    fill(224,172,105);
    ellipse(270, 200, 300, 350);
    fill(0);
    strokeWeight(4);
   
    //bangs 
    stroke(0);
    fill(0); 
    ellipse(300, 35, 420, 100);
    rect(97, 25, 400, 100);
    ellipse(100, 100, 30, 150);
  
  
    //eyebrows 
    stroke(97, 63, 117);
    rect(305, 160, 90, 10);
    rect(145, 160, 90, 10);
  
 
    //eyes 
    stroke(250);
    strokeWeight(3);
    fill(250, 218, 221);
    fill(250);
    line(155,198, 225, 198);
    arc(190, 200, 70, 60, 0, PI);
    line(315,198, 385, 198);
    arc(350, 200, 70, 60, 0, PI);
    //pupils
    fill(84, 42, 14);
    arc(190, 202, 40, 50, 0, PI);
    arc(350, 202, 40, 50, 0, PI);
    //lines
    strokeWeight(0.5);
    stroke(84, 42, 14);
    line(180, 240, 190, 240);
    line(350, 240, 360, 240);
 
   //nose
    stroke(0);
    strokeWeight(2);
    line (275, 230, 260, 260);
    line (260, 260, 275, 260);
      
    //mouth
    
    ellipseMode(CENTER); 
    strokeWeight(7);
    stroke(219,112,147);
    fill(250, 218, 221);
    arc(270, 305, 70, 60, 0, PI);
    }
    
void mousePressed(){
  currentBgNumber++;
  if (currentBgNumber>=3)
    currentBgNumber=0;
}

 

 

Beach at Day or Night – Self-Portrait Processing

Hi! So for this project, I decided to make a portrait of myself at a beach. I made the background first as part of the setup so I can change the value later on. It is sky blue at the start, along with the sun being yellow and the cloud being white. Then I have the sand and the sea, while my figure is at the front.

The main feature of my project I would say is the ability to switch to “Night Mode”, in which when I press a button everything becomes darker and when I click on the screen everything becomes daytime again. Below is an example of me toying around with my project.

https://youtu.be/7TLhmqCURAA

I do not know why but the embedded feature does not work for this link.

Also below is the code for my project.

color rectColor = color(255);
color circleColor = color(255);
color a = color(255);
color b = color(249,215,28);

int count = 1;
void setup(){
  size(500,1000);
  background(135,206,235);
}

void draw(){
  
   //sky blue
  
  
  fill(194,178,128); // sand
  
  beginShape();
  vertex(0,400);
  vertex(0,1000);
  vertex(500,1000);
  endShape(CLOSE);
  
  fill(0,119,190);
  beginShape();
  vertex(0,300);
  vertex(0,400);
  vertex(500,1000);
  vertex(600,1000);
  vertex(600,300);
  endShape(CLOSE);
  
  fill(b);
  ellipse(400,50,60,60); //sun
  
  fill(240,184,160); //skin color
  ellipse(250,350,300,300); //face
  rect(100,500,300,500); //body
  
  pushMatrix();
 
  translate(99,0);
  rotate(radians(10)); //left arm
  rect(50,550,50,500);

  
  
  rotate(radians(335.3)); //right arm
  rect(150,620,50,400);
  
  popMatrix();
  
  fill(255);
  ellipse(200,300,45,30); //left eye
  ellipse(300,300,45,30); //right eye
  
  fill(0);
  ellipse(200,300,20,20); //left pupil
  ellipse(300,300,20,20); //right pupil
  
  fill(255,0,0);
  arc(250,400,120,80,0,3.14); //mouth
  line(190,400,310,400);  //line
  
  fill(0); //hair
  beginShape();
  vertex(110,280);
  vertex(180,205);
  vertex(300,190);
  vertex(370,235);
  endShape(CLOSE);
  
  fill(101,67,33);
  ellipse(180,600,10,10); //left nip
  ellipse(320,600,10,10); //right nip
  
  fill(50,80,120);
  rect(100,900,300,200); // pants
  
  fill(a);
  arc(100,70,100,100,PI,TWO_PI); //for the clouds
  arc(135,70,100,100,0,PI);
  fill(0);
  line(50,70,85,70);
  line(150,70,185,70);
  

}

void keyPressed(){
  background(43,47,119);
  a = color(190,169,222);
  b = color(244,241,201);
}

void mouseClicked(){
  background(135,206,235);
  a = color(255);
  b = color(249,215,28);
}

 

Responses to Readings

HER CODE GOT HUMANS ON THE MOON—AND INVENTED SOFTWARE ITSELF

For a woman who created influential change in a STEM field during the 1960s, Hamilton is surely an outlier as well as a role model to women and girls who wish to follow similar paths. What blew my mind during the Apollo mission procedure was the meticulous behavior of Hamilton. While others hastily moved on with the main project, Hamilton went step-by-step and made sure everything was in order, including the P01 note. Moreover, having extra responsibilities while being a mother meant work would be more tedious towards someone like Hamilton, but because she enjoyed what she did she was able to endure the hardships that came along with it.

Ultimately, Hamilton’s example is great since it paves a new way of thinking about women in STEM fields. And because of great women like Hamilton, Marie Curie, Rosalind Franklin, etc. we now live in a society where women are encouraged to follow their dreams of being a scientist or an engineer and are given the environment to do so. Let us hope that in the future theses environments can be created for girls in third world countries as well.

I do agree that aesthetics can correlate to better results, yet I also want to add on to the emotion part, while providing my own argument. When we look at a device that is aesthetically pleasing, we are suddenly filled with a positive emotion since “something” had exceeded our expectations. Because the object has given us happiness, we reciprocate and think highly of our counterpart. This, however, can also be dangerous since it may cause us to overrate the object, thus giving it a better judgement than its actual perceived functionality. Even though the positive feeling may “arouse curiosity, engages creativity, and makes the brain into an effective learning organism”, I believe that even in real life situation we trust ourselves too much that we think better of what something actually is. For instance, if I go to a sushi restaurant that has normal sushi but has the highest quality of service, I would probably still say it is a great restaurant. This packages my statement but the people who listens to my rumors may also believe that the food is good as well. If you are interested in more of these examples, people from VICE have been making fake restaurants and models to reach the highest points just by spreading “positive” rumors. When we hear something positive, I believe that at the end of the day we need to question ourselves once more if we are judging a certain object by its functionality or its objective features rather than our subjective emotions.