Week 4 reflection and data project

Reading Reflection

This is the first time I have came across literature on design, and it is refreshing to read about design principles which ground artistic choices in a project. I believe technology itself is both a mode and barrier to communication; a barrier because human connection is supposed to be real, felt, and not interrupted, and a mode because of its ability to reach so many across the world just through sophisticated internet systems.  Norman discusses this as well with how machines are rule based and rigid, but humans are flexible and develop relationships over understanding. The principles of discoverability and understanding are great design principles to begin with. Especially with code, I believe a well-commented code can actually get across the developer’s thinking process, and also makes the codebase a place for others to collaborate. I believe a well-commented code adds up to the discoverability of the code, such as what feature attributes to what code line specifically. I think this is a major part where it co-relates to interactive media.

I also find it interesting how Human Centered Design is called a philosophy and not an area of focus. I think this argument isn’t developed enough in the reading, as the reading refers to this as a philosophy but the rest are referred to as areas of focus.

Something that drives me crazy is delivery riders trying to find buildings on campus. Almost every time I order food the rider calls me because they are lost somewhere on the Highline. All the residences look the same from outside and the names are not visible from the road. There are basically no signifiers for them, so they go in circles until someone comes down to get the food. A map at each entrance (a stair leading from the ground floor or every road connection to the high line) that is laid out the same way the buildings actually are so the map and the real space match. It is such a small thing but it wastes time for both the rider and the student, and by Norman’s logic it is not the rider’s fault at all, it is the design.

For interactive media, feedback is the principle I keep coming back to. If a user clicks on something in a sketch and nothing happens right away, they just keep clicking, same as people pressing the elevator button over and over. A color change or a small sound is enough to tell them the program got their input. The user should also know what to click or press without me explaining it; a button has to look like a button. Mapping is the easy one in a sketch since moving the mouse up can move something up on the screen and nobody has to think twice. The system image part stayed with me the most though. The user can never ask me what I meant while they are using my project. Whatever is on the screen is all they get.

Coding Assignment

I decided to make a room simulation by using the data of the CO2 and temperature from an office room. I used the Occupancy Detection dataset from Kaggle, where they taken in different motion readings from the day including the CO2, temperature, and timing of the day. I map a graph directly below the simulated “room” to give us an idea of the CO2 levels of the room as the time of the day changes. I have also made a window which changes color as the time of the day changes, and then the color of the room changes as CO2 levels get higher or lower (Red for high CO2 and blue for lower).

Code I am proud of

The part I’m most proud of is getting the room to change color with the CO2 level. Each frame I take the current minute’s reading and use map() to turn it into a number between 0 and 1, where 400 ppm (roughly outdoor air) is 0 and 1400 ppm is 1. I wrap it in constrain() so a reading above 1400 can’t push the value past 1 and break the color. That number then goes into lerpColor(), which blends between a calm blue and a warm red, so the room slowly shifts from blue to red as the air gets stuffier over the day.

What I like about this is that one line of math carries the whole idea of the project. You don’t need to read the numbers to know the air is getting worse, you can just see the room turning red. It also made the lag really visible. People arrive around 7:36 but the room doesn’t turn noticeably red until after 9, because CO2 takes time to build up.

let r = rows[idx];

  // ROOM: floor color follows CO2 (blue = fresh, red = stuffy)
  let t = constrain(map(r.co2, 400, 1400, 0, 1), 0, 1);
  fill(lerpColor(color(120, 180, 230), color(230, 90, 80), t));
  stroke(60);
  strokeWeight(4);
  rect(100, 40, 600, 260);

How this was made

I started with importing the datatest.txt and cleaning it. There were a few errors with empty lines which I got rid off. To be particular, there was one less column header compared to the number of columns in the file, and when I was parsing each line to get each column value into the array, I ran into an error. There was an empty row, so I had to look for such things in the dataset too. Then I looked at the names of the headers, and assigned variables to each one.

Since the headers were shifted by one, I couldn’t rely on the names, so I read each value by its column number instead. I only kept the rows from February 3 because it’s a full day, midnight to midnight, which gave me 1440 readings, one for every minute. When I printed the first line of data, I noticed the file starts at 14:19 on February 2, so that day was incomplete. The file also stops partway through February 4, which left February 3 as the only full day, so I kept just that one. I saved each minute as an object with its time, temperature, light, CO2 and occupancy so the rest of the code would be easier to read.

After that I built the visual in layers. First the room, with the floor color changing from blue to red as CO2 goes up. Then the window, which gets brighter with the light reading, and two people who show up at the desks when the room is occupied. Under the room I drew a line graph of CO2 for the whole day, with a dashed line at 800 ppm since that’s around where ventilation usually kicks in. Last, I added the timeline so the day plays on its own, and you can hover over the canvas to scrub to any minute.

Embedded Sketch

Reflection and Improvement

I would want to make this simulation for dataset2 too, which was in the kaggle dataset. Those readings were taken with a closed room and therefore CO2 builds faster compared to this where it is slower. I would also love a 3d model of the room with actual sunlight changing as the day changes and the sunlight coming in from the window. I would probably make a comparison between the both.

 

Week 3 – Reading and OOP exercise

Reading reflection

The part of interactivity that I really agree with is that it is a scale and not a binary. I believe interactivity is a huge aspect of how technology is perceived, and I am really interested in how it shapes the relationship between the user and the technology.  I believe interactivity doesn’t needs to be physical in its nature where a user has to press a button or a widget, but it is really about how involved they feel with the technology/or any other medium of interaction. The author then speaks about how they feel that reading is not interactive. I disagree with this part, and I believe that reading is highly interactive. In an era where there is so much online material/posts/apps/games to interact with I find reading to be highly interactive and not rushed. The author also speaks about how opening a fridge door is interactive, which is an interesting approach. I believe small everyday tasks have an interesting nuance to them and how their design matters I think it is in these tasks that we actually slow down. I don’t want to be philosophical about this, but I genuinely resonate with how interaction is people based like when communicating and dancing. As a sustained dialogue ambassador, I really agree with Crawford’s stance on how communication is interactive. Like as an ambassador, I have been trained to like communicate with participants and co-facilitators without the need of speaking, and letting silence set in and genuinely listening to everyone, including listening on different levels like their body language. This is also what interactivity looks like to me, so I think it does have different aspects to it, but it all comes down to how seen the user/person feels whether it is technical or not.

Coding Exercise

My inspiration for this code was the Ikigai concept in Japanese, where it means what you pursue in life has to be at the intersection of what you like and what you the world will need. I also really like the translucent aspect of this as well, and to me it appears to be like tainted glass.

Sources for images: https://www.istockphoto.com/photos/vertical-stained-glass-window
My Program

My code

I build this through the ikigai class I defined. The part of the code, I am proud of is how I integrated the translucency.

class IkigaiCircle {
  //it runs when a new circle is made
  constructor(x, y, col, appearAt) {
    //The centre of the circle
    this.x = x;
    this.y = y;
    //Colour name into a p5 colour
    this.col = color(col);
    //  a crucial part in helping us set the color to translucent
    this.col.setAlpha(100);
    // count value when this circle appears
    this.appearAt = appearAt;
  }

I started by drawing a single circle in the middle of the canvas, then added three more to build the ikigai diagram, using see-through colours so the overlaps would blend. To make it animate, I added a counter that goes up every frame and made each circle appear only after the counter reached a certain number. Once I noticed the four circles used almost the same code, I turned them into an IkigaiCircle class and moved the colours and positions into arrays, so a loop could create all four circles for me. Finally, I changed the background from grey to cream because the grey made the colours look dull.

Week 2 – Reading reflection

From the introduction, I had the following thoughts. Reas mentions of how chaos in major events in history like prevalence of quantum mechanics and world war 1  led to shifts in art. This made me question of whether chaos around AI will lead to shifts on how art is formed and viewed. Reas then continues talking about how software art is effected by noise while I understand what noise he is referring to; I think about how noise doesn’t allow me to focus while making art and how the same word could have such different impacts and meanings.

He then mentions Valentino Braitenberg as a neuro-atomist and his work about an imaginary robot to study about cognition. I really liked the crossover between art, math, and science. I read more into these robots and found how one robot’s motion was effected by temperature actually akined to the brownian motion. I really agree with the analogy here since the motion seemed so random when Reas modeled it; it links all back to nature even the randomness.

In the Order of Art, he also talks about making art of your own and I think that is what gives art life: individualism. I really found Mondrian’s evolution in artwork very humane too since we think about life or careers in something very linear or restricted, but seeing how his style emerged along with music in NewYork is a helpful in supporting that we can change paths, decisions, and expression and that is okay.

When Reas explores Computer Graphics, he varies the randomness which changes the art pattern and then shows examples of graphics which vary with different factors. For me, I worked with noise() particularly which brings in slight order in comparison to random(). If we were to talk quantitively, I still would lean into less randomness and more structure since an increased amount of disorder takes away what I want to communicate through artwork. I don’t really think there is an optimum balance as that would keep changing from project to project, here I really resonate with Mondrian’s view of art.

Week 2 – Computer Graphics

OVERVIEW

I was taking my makeup off with a cotton ball and found the strands of cotton to be the inspiration for the compute graphic. I went over the magazines as well but nothing in particular resonated, so I browsed more examples of computer graphics. This is when I came across Perlin noise which was a technique invented by Ken Perlin while working on his film: Tron. I was also very inspired by textures and blur, and how they add such personality. Ideally I was supposed to create a similar graphic.

sourced at https://genekogan.com/code/p5js-perlin-noise/

CODE HIGHLIGHT

The major part with the code was adjusting variables, I had a similar experience with drawing eyelashes for my self-portrait.

This is the main for loop that takes the noise field and the loop reads the noise field at the current position, converts that value to an angle, then uses cos and sin to turn the angle into a step of fixed length. It draws that segment, moves to its end, and repeats.

 for (i = 0; i < 20; i++) {
        n3 = noise(oldX * resolution, oldY * resolution) + 0.045;
        angle = map(n3, 0.3, 0.7, 0, PI * 4);

        newX = cos(angle) * len + oldX;
        newY = sin(angle) * len + oldY;
        line(oldX, oldY, newX, newY);
        oldX = newX;
        oldY = newY;
}

EMBEDDED SKETCH

 

HOW THIS WAS MADE

I divided this in 3 main sections with defining the canvas first, and then the variables which I will need to vary, and then the seed grid and reading the noise field. I also used different resources for the main algorithm like https://www.youtube.com/watch?v=Qf4dIN99e2w

by coding train and a walk through by Steve’s Masterclass. I read about the noise() function on GeekforGeeks and the p5j. website. The looping logic was learnt through youtube.

Initially, 2 nested loops help to walk a path of starting positions, and then saving the grid positions. A third nested loop works by reading the noise field at current position, turning that value into an angle, converting the angle into a step of length len via cos and sin, drawing the segment, and moving to the end of it and repeat. This loop runs for 20 times which gives it a wriggling tail, and the paths curve because the noise value is re-read at every step.

Reflection and Ideas for future work

I do still find the main idea of perlin noise to be complicated. However, I am very intrigued by how many intersections this sits at right now like how it is a noise field which means it includes bunch of vectors, but at the same time they are directed in terms of direction. I think I would like to take it as close as possible to the image I have shared and maybe an animated version.

Week 1 self potrait

My concept

I wanted to build a portrait that resonated with me. Features like the eye lash and my face shape were something I wanted to particularly be mindful of. I wasn’t going for a moving or dynamic sketch but rather wanted to focus on the basic sketch and understanding javascript. Other then that, I just wanted to build off what we learnt in class. I also included that I was very tired this week from moving in and settling, so I drew a change of state to sleeping haha.

The main functionality would be the changing day and night.

Code

// I have kept a isNight variable which tracks if it is day or night
// since it is starting as false it means it is day time
let isNight = false; 

function setup() {
  createCanvas(400, 400);
}

function draw() {
  // background changes based on state
  // so if isNight is true which is if it is night time the sky is dark blue
  if (isNight) {
    // dark navy sky
    background(10, 5, 80); 
  } else {
    // else it was day time
    background(100, 180, 230);
  }

  // sun or moon same depends on state
  noStroke();
  if (isNight) {
    // pale gray-white moon
    fill(240); 
    circle(50, 50, 50);
  } else {
    fill("yellow");
    circle(50, 50, 50);
  }

  //hair like the back of it
  fill("black")
  circle(200,220,300);
  // left ear
  fill(230, 190, 150);
  ellipse(95, 220, 18, 22);
  //right ear
  fill(230, 190, 150);
  ellipse(305, 220, 18, 22);
  
  // face
  fill(250, 200, 160); 
  noStroke();
  ellipse(200, 200, 210, 220); 
  // hair at the front of head
  fill("black");
  noStroke();
  ellipse(200, 120, 200, 70);

  // eyes
  if (isNight) {
    // closed eyes at night
    stroke(0);
    strokeWeight(3);
    noFill();
    arc(165, 190, 45, 35, PI, TWO_PI);
    arc(235, 190, 45, 35, PI, TWO_PI);
    noStroke();

    
  } else {
    // open eyes during the day
    fill(255);
    noStroke();
    ellipse(170, 180, 45, 35);
    ellipse(230, 180, 45, 35);
    fill(60);
    ellipse(170, 180, 20, 20);
    ellipse(230, 180, 20, 20);
  }

  // nose
  fill(230, 190, 150);
  ellipse(200, 220, 18, 22);

  // eyelashes
  
    stroke(0);
    strokeWeight(2);
    line(145, 170, 135, 165);
    line(152, 166, 148, 154);
    line(162, 161, 162, 150);
    line(255, 170, 262, 160);
    line(248, 166, 252, 154);
    line(240, 153, 235, 163);
    noStroke();
  

  //emoji for the lips
  textSize(65);
  text("👄", 168, 290);
}

function mousePressed() {
  // flips true to false or false to true, any click any where flips this
  isNight = !isNight; 
}

I struggled a bit with the eyelash placement. I wanted them to be at an angle, and I achieved exactly what I wanted. Especially placing them over the eyes was challenging and finding that placement. This was a trial and error process for sure and took me considerable time, but I am happy it looks like the way I want.

Embedded Sketch

 

How this was made

I started with the face and nose since they would be the same in both day and night. I couldn’t make the mouth like I wanted, so I looked at the “Getting Started with p5” where I saw the text function. I used the lip emoji in that function and then added the eyelashes and hair. I wanted these 2 to be static too with the day/night change. I added the sun in the back. I just used one main function ‘draw’ and had everything inside. I used the “isNight” variable for day and night. I changed the shape of the eye depending on the state. One interesting thing I learned was that each line of code draws on top of the last, so shapes drawn later cover the ones drawn earlier. It’s not about compiling, it’s just the order things get painted onto the canvas.

Reflection and improvements

I would make a dynamic sketch in the future and make it more personal as for now I just wanted this to be a reflection of myself (like quite literally) out of the shapes and techniques we learnt. I think I would add my neck and body too. Probably changes in state that reflect more things about me too.