Functions and Arrays

Recitation Work

I forgot to record the individual steps, but here is the final part

float[] xX = {};
float[] yY = {};
int[] cC = {};

void setup()
{
  size(600, 600);
  rectMode(CENTER);
  /*for(int i = 0; i <100; i++)
  {
    displayVulgar(random(600), random(600), int(random(255)));
  }*/
  expand(xX,100);
  expand(yY,100);
  expand(cC,100);
  for(int i = 0; i <100; i++)
  {
    append(xX, random(600));
    append(yY, random(600));
    append(cC, int(random(255)));
    
  }
  
}

void draw()
{
  //for(int i = 0; i <xX.length-1; i++)
  //{
  //  displayVulgar(xX[i], yY[i], cC[i]);
  //}
  displayVulgar(random(600), random(600), int(random(255)));
      
}

void displayVulgar(float x, float y, color c)
{
  noStroke();
  fill(c);
  rect(x, y, 100, 100);
  rect(x+75, y+75, 25, 50);
  ellipse(x-75, y-75, 50, 50);
}

Questions

  1. If you place your for loop in setup, it will run the for loop through its iterations once, while in draw, it will run through the for loop an infinite number of times. 
  2. Arrays allow for better creation of individuals, I’m not sure I will use it for my final project, but I’m not sure yet. I think in the future, it will be easier for data storage, instead of just creating individual sprites. 

Processing Animation

Recitation Work

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

void draw()
{
background(0);
rectMode(CENTER);
stroke(0, 155, 47); //green
fill(0, 155, 47);
rect(width/2, height/2+20, 176, 176);
stroke(62, 155, 203); //blue
fill(62, 155, 203);
rect(width/2, height/2+30, 136, 136);
stroke(207, 208, 209); //gray
fill(207, 208, 209);
rect(width/2, height/2+40, 96, 96);
stroke(245, 223, 20); //yellow
fill(245, 223, 20);
rect(width/2, height/2+48, 56, 56);
if(mouseX >= 272 && mouseX <=328 && mouseY>= 320 && mouseY<= 376)
{
background(0);
stroke(0); //turn yellow square
fill(0);
rect(width/2, height/2+48, 56, 56);
stroke(0, 155, 47); //green
fill(0, 155, 47);
rect(width/2, height/2+20, 176, 176);
stroke(62, 155, 203); //blue
fill(62, 155, 203);
rect(width/2, height/2+30, 136, 136);
stroke(207, 208, 209); //gray
fill(207, 208, 209);
rect(width/2, height/2+40, 96, 96);

}
if(mouseX >= 252 && mouseX <=348 && mouseY>= 292 && mouseY<= 388)
{
background(0);
stroke(0); //turn gray square
fill(0);
rect(width/2, height/2+40, 96, 96);
stroke(0, 155, 47); //green
fill(0, 155, 47);
rect(width/2, height/2+20, 176, 176);
stroke(62, 155, 203); //blue
fill(62, 155, 203);
rect(width/2, height/2+30, 136, 136);
stroke(245, 223, 20); //yellow
fill(245, 223, 20);
rect(width/2, height/2+48, 56, 56);
}
if(mouseX >= 232 && mouseX <=368 && mouseY>= 262 && mouseY<= 398)
{
background(0);
stroke(0); //turn blue square
fill(0);
rect(width/2, height/2+30, 136, 136);

stroke(0, 155, 47); //green
fill(0, 155, 47);
rect(width/2, height/2+20, 176, 176);
stroke(207, 208, 209); //gray
fill(207, 208, 209);
rect(width/2, height/2+40, 96, 96);
stroke(245, 223, 20); //yellow
fill(245, 223, 20);
rect(width/2, height/2+48, 56, 56);
}
if(mouseX >= 212 && mouseX <=388 && mouseY>= 232 && mouseY<= 408)
{
stroke(0); //turn green square
fill(0);
rect(width/2, height/2+20, 176, 176);
stroke(62, 155, 203); //blue
fill(62, 155, 203);
rect(width/2, height/2+30, 136, 136);
stroke(207, 208, 209); //gray
fill(207, 208, 209);
rect(width/2, height/2+40, 96, 96);
stroke(245, 223, 20); //yellow
fill(245, 223, 20);
rect(width/2, height/2+48, 56, 56);

}
}

Additional Homework

Final Project Reflection “Distorted” – Ariana Alvarez

“DISTORTED” – Made by Ariana Alvarez – Professor Rodolfo Cossovich

The path into finding my idea and truly developing the concept was an extensive one with various ups and downs. I defined interaction as the process in which an agent interacts with another through an action-response process, however with a purpose beyond “looking good”. For this reason, initially my research was more assistive technology oriented, as I wanted to create an object, or develop a game similar to a “hackable” and the xbox adaptive controller which redefined technology and interaction in games. Nevertheless, later on, after attending the Machine Learning workshop and conducting more research I found projects such as ‘Soul Mate’, which changed my inclination. ‘Soul Mate’ is an old radio developed by Vytas Jankausas, which uses text synthesis to read potential romantic partners on Tinder for agents that interact with it, therefore it is a new way of “finding a partner” in a rather non-traditional and outdated presentation. Another project from the same artists was ‘Breaking Views’, a television that displays Instagram stories from feed and collects how many times they are viewed from the agent who’s using it. Both these projects are part of a bigger collection called Domestic Media, in which the artist wanted to critique how new technologies change the way we live and socialize, and to do this he used old technologies in a social media spectrum.

Somestic Media #3 Somestic Media #4

Another project that I encountered which redefined my idea was the Project Implicit “Implicit Differentiation Test” developed by Harvard University, the University of Virginia, and the University of Washington. This project aims to measure the strength of associations between concepts and evaluations of people tip races (eg. white people, good), with the final goal of exploring hidden bias within the users, and that way taking one step in understanding the roots of stereotypes and prejudice in society. 

After analyzing both project ideas that seemed quite diverged, I decided to address a problem that was more close to me and my personal identity, which is race. Using Vytas Jankauskas ‘old technology’ concept, I decided to redefine my project  by creating a vintage camera that showed how despite racism being an ‘outdated’ idea, it was still present in people’s minds and kept on “implicitly” defining us through labels even within college application processes.

CONCEPTION AND DESIGN:

Regarding conception and design, I had very clear since the moment I decided to address “identity” as part of my project, that I wanted to immerse users into a photographic experience. Therefore, the idea of putting them in a “photo booth” type of atmosphere was what initially sparked in my mind. I used this approach after observing how the excessive amount of photography’s and selfies that are being taken daily are what really influence people’s image of their self.

Related image

However, as I was choosing the materials to work with, I realized that it wasn’t going to be as easy to manipulate and would end up being too big for people to really grasp onto the purpose. Therefore, I decided to make this idea into a smaller, easier to laser cut version of a vintage camera, which contained and webcam, Arduino and breadboard inside. 

Image result for vintage camera

The interactive experience was planned to be as follows:

  1. User approaches screen and common application question of “Choose the race you identify the most with” appears
  2. User takes a possible “ID” picture with the camera 
  3. Picture is “processed” based on race consideration
  4. Image reveals redrawn with racial labels and slurs
  5. Follow up-experience to immerse user into the problem (Videos of news and testimonies)
  6. Final message about the goal of the project

FABRICATION AND PRODUCTION:

The most significant steps in the production process was first and foremost figuring out how to create the effects I wanted to in processing, and how to manipulate pixels that same way as well. My initial idea regarded changing a persons skin tone with an inverse filter. However, as I felt the message wasn’t being delivered as strongly as it could be, I decided to change my idea to a rather more descriptive, specific, one.  Therefore, I redefined the idea of pixel manipulating the image that a person took into a more conceptual one. By this I mean that, whenever a person would take a picture of themselves on the webcam inside the camera, then their image would be redrawn with labels and slurs regarding their race. This translated into processing meant using the same idea of drawing ellipses with the original image’s color, but instead of ellipses or shapes, it is words. 

Before the user testing I used to only have one racial slur for each race/ethnicity, however after the user testing I added more labels for each image as people told me that it would be more impactful to see different points of view. Another aspect that changed in the production after user testing, was the user experience, as I also included real-life testimonies of experiences and news of college and racial labels in people’s daily lives. Both of these adaptations were included so that my project goal of making people more aware of racial labelling in college was actually addressed. The experiences for each of the races finalized as following:

Native American

Asian

African American

Hispanic

Whites

Processing Code:

https://gist.github.com/arianaalvarezv/42d333e9eec30b2b7acff6d187745ca0

Arduino Code:

https://gist.github.com/arianaalvarezv/a6de259cce73b1f837e6d7d0975787c3

CONCLUSIONS:

The main goal of this project was to create awareness among a general audience about how the outdated idea of racism still exists today in many aspects of our life such as racial labelling in college applications. I further wanted to show how these different stereotypes are distorting our identities by putting us into certain groups that we may not even distinguish ourselves at. Therefore, the project was also meant to serve as a critique against the college application system for basing admissions on race as well. My project aligns with my idea of interaction as it indeed involves an action-response relationship between user, screen and camera. The user inputs a response and picture, and in return processing responds with different outputs in redrawing the image and videos. However, even though it does not completely align with my definition of interaction as it does not serve the purpose of helping someone else, it still has a purpose beyond being a “pretty camera”. It has the purpose of educating people, or at least easing the “racial labels” conversation, as nowadays it is a very hard topic to talk about without offending anyone else. 

Based on the final presentation and the IMA show, I was very happy to see the positive audience’s response to my project. It was very interesting to see how they initially were hesitant to interact with it as they thought it was merely a “cute camera”, but later on when it redrew their face with very strong labels, their face changed completely and understood somewhat the message I wanted to convey. I received much positive feedback and comments for further improvement. 

 

If I had more time, I would improve the scope of the project, maybe make it on a bigger screen, or have more options for multiracial users. As well as I would have probably included more statistics on the consequences of these racial labels after college in places like the workforce and family income. From my setbacks I have learned the importance of developing a strong concept before initiating a project, and ensuring it is something that you are passionate in working for and researching about. As well as the importance of immersing users into an environment that is familiar with them as well, that way they can understand your goal better without having too many doubts. Whereas from my accomplishments I can take away the different ways in which technology and interactivity can be used to prove a point, and how the scope of projects that can be done and created is beyond what is learned in class, and the more curious and playful you get with code, the more things you discover you can do that will help your project. 

This project was of great importance to me, as it is an experience that I have faced before personally. There have been instances in which my identity has been distorted based on the racial labels regarding my race. For this reason, I wanted to bring it up upon the public eye, not only for awareness, but also for action. I believe that the reason why everybody should “care” about this topic, is because they need to acknowledge what’s going on first, in order to address the issue. Everyone thinks that “racism” is outdated as “everyone knows it’s bad”, however, has it truly disappeared? Is it truly nonexistent? It is not. Are we still labeled based on stereotypes? Yes we are. However as long as we don’t let what others think of us distort our identity, then we are taking one step for action against racial inaction. 

REFERENCES:

https://vjnks.com/works/5/somestic-media

https://www.tolerance.org/professional-development/test-yourself-for-hidden-bias

https://implicit.harvard.edu/implicit/iatdetails.html

Processing Basics

Introduction

The goal of this recitation was to learn the basics of the Processing IDE through recreating a piece of art and then modifying it for our own. 

Process

For my project, I chose to recreate Josef Albers’ Homage to the Square: Apparition

<- Original

<- My creation (I tried to screenshot the computer screen, but the WordPress would not let me paste it into the post)

To make mine different, I tried to get every layer to change to the same color as the background but was only able to get the outer layer to follow suit correctly.

Reflection

I think Processing was a perfectly good media to recreate the original Homage to the Square because using a different media and once again paying homage to the square. 

Code

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

void draw()
{
background(0);
rectMode(CENTER);
stroke(0, 155, 47); //green
fill(0, 155, 47);
rect(width/2, height/2+20, 176, 176);
stroke(62, 155, 203); //blue
fill(62, 155, 203);
rect(width/2, height/2+30, 136, 136);
stroke(207, 208, 209); //gray
fill(207, 208, 209);
rect(width/2, height/2+40, 96, 96);
stroke(245, 223, 20); //yellow
fill(245, 223, 20);
rect(width/2, height/2+48, 56, 56);
if(mouseX >= 272 && mouseX <=328 && mouseY>= 320 && mouseY<= 376)
{
background(0);
stroke(0); //turn yellow square
fill(0);
rect(width/2, height/2+48, 56, 56);
stroke(0, 155, 47); //green
fill(0, 155, 47);
rect(width/2, height/2+20, 176, 176);
stroke(62, 155, 203); //blue
fill(62, 155, 203);
rect(width/2, height/2+30, 136, 136);
stroke(207, 208, 209); //gray
fill(207, 208, 209);
rect(width/2, height/2+40, 96, 96);

}
if(mouseX >= 252 && mouseX <=348 && mouseY>= 292 && mouseY<= 388)
{
background(0);
stroke(0); //turn gray square
fill(0);
rect(width/2, height/2+40, 96, 96);
stroke(0, 155, 47); //green
fill(0, 155, 47);
rect(width/2, height/2+20, 176, 176);
stroke(62, 155, 203); //blue
fill(62, 155, 203);
rect(width/2, height/2+30, 136, 136);
stroke(245, 223, 20); //yellow
fill(245, 223, 20);
rect(width/2, height/2+48, 56, 56);
}
if(mouseX >= 232 && mouseX <=368 && mouseY>= 262 && mouseY<= 398)
{
background(0);
stroke(0); //turn blue square
fill(0);
rect(width/2, height/2+30, 136, 136);

stroke(0, 155, 47); //green
fill(0, 155, 47);
rect(width/2, height/2+20, 176, 176);
stroke(207, 208, 209); //gray
fill(207, 208, 209);
rect(width/2, height/2+40, 96, 96);
stroke(245, 223, 20); //yellow
fill(245, 223, 20);
rect(width/2, height/2+48, 56, 56);
}
if(mouseX >= 212 && mouseX <=388 && mouseY>= 232 && mouseY<= 408)
{
stroke(0); //turn green square
fill(0);
rect(width/2, height/2+20, 176, 176);
stroke(62, 155, 203); //blue
fill(62, 155, 203);
rect(width/2, height/2+30, 136, 136);
stroke(207, 208, 209); //gray
fill(207, 208, 209);
rect(width/2, height/2+40, 96, 96);
stroke(245, 223, 20); //yellow
fill(245, 223, 20);
rect(width/2, height/2+48, 56, 56);

}
}

Homework

Part 1

void setup()
{
size(600, 600);
rectMode(CENTER);
background(255);
strokeWeight(10);
rect(width/2, height/2, 100, 100);
}

Part 2

float x = 300;
float y = 300;
float w = 100;
float h = 100;
float speedW = 5;
float speedH = 5;

void setup()
{
size(600, 600);
rectMode(CENTER);
background(255);
strokeWeight(10);
//frameRate(5);
rect(x,y, w, h);
}

void draw()
{

background(255);
rectMode(CENTER);
rect(x, y, w, h);
if ((speedW+w> width) || (speedW+w <0))
{
speedW = -speedW;
speedH = -speedH;
}
w = w+speedW;
h = h+speedH;
}

Part 3

float x = 300;
float y = 300;
float w = 100;
float h = 100;
float speedW = 5;
float speedH = 5;

void setup()
{
size(600, 600);
rectMode(CENTER);
background(255);
strokeWeight(10);
//frameRate(5);
rect(x,y, w, h);
}

void draw()
{
stroke(random(255),random(255),random(255));
background(255);
rectMode(CENTER);
rect(x, y, w, h);
if ((speedW+w> width) || (speedW+w <0))
{
speedW = -speedW;
speedH = -speedH;
}
w = w+speedW;
h = h+speedH;
}

Part 4

float x = 300;
float y = 300;
float w = 100;
float h = 100;
float speedW = 5;
float speedH = 5;
float colors;

void setup()
{
size(600, 600);
rectMode(CENTER);
background(255);
strokeWeight(10);
frameRate(100);
rect(x,y, w, h);
colorMode(HSB);
}

void draw()
{
stroke(colors,255,255);
background(255);
rectMode(CENTER);
strokeWeight(10);
if (colors>=255) colors = 0;
else colors++;
stroke(colors,255,255);
rect(x, y, w, h);
if ((speedW+w> width) || (speedW+w <0))
{
speedW = -speedW;
speedH = -speedH;
}
w = w+speedW;
h = h+speedH;
}

void keyPressed()
{
if (key == CODED)
{
if (keyCode == UP)
{
y = y – 5;
}
else if (keyCode == DOWN)
{
y = y + 5;
}
else if (keyCode == LEFT)
{
x = x – 5;
}
else if (keyCode == RIGHT)
{
x = x + 5;
}
}
}

Reflection

I think the most interesting function to use during this recitation was the keyPressed function and specifically checking if a key was coded to make sure you got the right key. 

Final Project Essay (New) — Jiayi Liang (Mary)

Project Title Happiness Vending Machine

Project Statement of Purpose

This project is an interactive vending machine that sells happiness. Happiness here is “those happy moments that can make someone feel happy”. It can be a small incident in life, an interesting pictures, or a beautiful song. You do not need money to purchase the product since “happiness” is one thing that cannot be valued. All you need to do is to stand in front of the machine, raise your hand to collect the “happy power” and wait for a little while. Then, you can use your happy power to purchase a happy moment shared by others.

Nowadays, living in a big city like Shanghai, many people are feeling stressful. They are always stepping into a bad emotional mood that they lose hope and feel sorrowful. In China, there is a popular new word called “äø§ę–‡åŒ–ā€œ –“disheartenment culture”, which means that people’s pessimistic attitudes towards life is so prevailing that it even has become a culture. The project aims at sharing happiness to every person in the society who needs comfort.  The reason why I decide to call it “vending machine” instead of “happiness sharing machine” or something else is that I want to tell people although you should work super hard to get what you want in your daily life, here is one small vending machine that costs almost nothing, one moment that you can enjoy your laziness. You are justified to get good things without paying.

Project Plan

 My project aims at producing a vending machine that looks like a vending machine. To make my project come true, I point out several important steps I have to complete in each specific time. The first step is to collect happiness. What I want to do is to use the social website to collect the happy moments shared by my friends ranging from classmates to net friends.  Step 1 is due in 11.27 . The second step is to process these information into funny pictures to increase its interestingness. I decide to use a phone app called “butter camera” to produce images. Step 2 is due in 12.1. The third step is to write the code to realize the main part — it you purchase a product, it will show you the pictures or songs. And I will also write codes to add the “happy power system” into the project. The coding work’s due date will be 12.7. Step 4 is to make the vending machine model by use the wood laser cut technology and connect the model with computer by using arduino. The 4th due date will be 12.10. In the following days I will work on adding more instructions and more funny interactions. For example, the way to gain power can be evolved into playing a quick game. The final project will be a vending machine model that will show images of cute images or interesting songs to the users who want to be happier.

Context and Significance

I was originally inspired by a Japanese Cartoon called <Grief Grocery Store> written by Haruki Murakami. In this book, there is a grocery store. If you send letter to it to talk about your grief, the owner will write some advice and encouraging words as a response. Since peopleā€™s grief can be shared, how about sharing peopleā€˜s happiness? This book gives me inspiration on the idea of selling happiness.

Then I work on how to find which kind of happiness to sell since happiness is the thing that is very abstract. I have read a book written by Haruki Murakami called <Langerhans island afternoon>. In the book, he raise a concept called “a little happiness in hand”.  As normal people living in such a big city, it is impossible to have the chance to experience exciting events like those happening in Hollywood. In fact, most of us lives a plain life that is repetitive and boring. So, it is much more important for us to discover the tiny but good things in our life in pursuit of happiness. In most cases, the reason why you feel upset is that you ignore the good side in your life.

Then I work on deciding what kind of machine I am going to build. Recently I am really addicted to collecting a kind of toy called ā€blind box”. Blind box usually refers to a small cartoon figure. The figure is packed in a box that the buyer cannot know what the figure looks like before buying it. A series of blind box often includes 8 to 10 different figures. It is fun to collect it because the figure is very adorable. The process of guessing what my figure will look like and unpacking the blind box is exciting and funny. In many shopping marts, you can find vending machines that sells blind box. This kind of “not knowing what the machine will sells to me” adds playfulness in the blind box industry. Thus, I am going to build a vending machine that randomly sell happy moments to the buyers, which make them feel more surprised.

Thus, based on my research, my proposal is that creating a vending machine that randomly sells tiny but certain happiness to those who feel depressed.

My project aligns with our definition of interaction because there is a procedure of “input, process and output” as Crawford claimed . The vending machine interacts with the audience by noticing the users’ action to collect “happy power”, receiving their request of buying happiness, and offer them a funny picture of music as an output. The uniqueness about my project is that it is raising people’s awareness on the tiny but certain beautiful moments in their life. By sharing them an adorable cartoon image, they feel more relaxed and happier. This vending machine create a utopia space that is different from the busy and boring social life. In front of the machine, you can get rid of the busy life and confusing material stuffs, gaining pure happiness without paying money. All you need to do is spend a little time to relax and enjoy the happy moments.

For the subsequent projects, I will add one more function to the vending machine to make it more interactive. The buyer can upload their own happy moments to the machine too. Thus, the project can also work as an illustrated handbook that record people’s various kinds of happiness.

Work Cited

http://en.people.cn/n3/2017/0712/c90782-9240823.html

The Art of Interactive Design, Crawford (pages 1-5)