6th Inter Lab Documentation

The in-recitation exercise:

A rough frame for Snake games:

float bodyX[] = new float[900];
float bodyY[] = new float[900];
int n = 90;
int tX = int(random(30));
int tY = int(random(30));
boolean ch = true;

void setup(){

size(600,600);
/* for(int x = 20; x < 600 ; x+=20){
line(x,0,x,600);
line(0,x,600,x);
} */
for(int i = 0; i < n ; i++){
bodyX[i] = i;
bodyY[i] = 0;
}
ch = true;
while (ch) {
ch = false;
for(int i = 0; i < n ; i++){
if (bodyX[i] == tX && bodyY[i] == tY){
ch = true;
break;
}
}
tX = int(random(30));
tY = int(random(30));
}
}


void draw(){

background(255);
noStroke();
fill(255,0,0);
rect(tX*20,tY*20,20,20,9);

if (key == CODED){
if (keyCode == UP){
bodyX[n] = bodyX[n-1];
bodyY[n] = bodyY[n-1]-1;
}
else if (keyCode == DOWN){
bodyX[n] = bodyX[n-1];
bodyY[n] = bodyY[n-1]+1;
}
else if (keyCode == LEFT){
bodyX[n] = bodyX[n-1]-1;
bodyY[n] = bodyY[n-1];
}
else if (keyCode == RIGHT){
bodyX[n] = bodyX[n-1]+1;
bodyY[n] = bodyY[n-1];
}
}

fill(0);
for(int i = 0; i < n ; i++){
rect(bodyX[i]*20,bodyY[i]*20,20,20,9);
bodyX[i] = bodyX[i+1];
bodyY[i] = bodyY[i+1];
}

}

And it works like this:

https://drive.google.com/open?id=1m3duuuMUULfbwqRqAzpWoxTD67Bs1rKk

The homework

float speed = 8;
float r = 50;
float x = 300;
float y = 300;
float js = 5;
float i = 0;
float j = 40;

void setup(){
size(600,600);
colorMode(HSB, 100);
}

void draw(){
background(0,0,100);
strokeWeight(20);
ellipse(x,y,r,r);
if ( r < 40 || r >= 400) {
speed = -speed;
}
r += speed;
stroke(i, j, 80);
j += js;
if ((j == 100)||(j< 40)) {
js = -js;
j += js;
i += 5;
}
if (keyPressed){
if (keyCode == UP){
y -= 5;
}
else if (keyCode == DOWN){
y += 5;
}
else if (keyCode == LEFT){
x -= 5;
}
else if (keyCode == RIGHT){
x += 5;
}
}
}

And it works like this:

https://drive.google.com/open?id=1uisZ76edhzquj-BM_xKI6QMYSqII03oA

During the coding, I found how to draw a dynamic multi-element image and make it move. Like I do in the in-class exercise, I made a snake and using the keyboard to make it move.  One trivial detail that particularly surprises me is that we need to use (key == CODED) to determine whether something WAS PRESSED and (keyPressed) to determine whether something IS PRESSED. There is a huge difference between that. Something like a snake, which keeps moving should use the former one to get the moving signal; while something like a circle, which only moves when instructions are given, needs the application of the latter one. That’s something very interesting about these functions that I found.

Fusion and Palette – Final Project Proposal Draft

The second idea of my final project, I call it ā€œfusionā€. Since I entered this university, Iā€™ve got to know lots of various people, with a number of those people I consider ā€œinterestingā€ even larger than the number Iā€™ve met in the past 18 years. Those tracks, symbolizing how I met those people I treasure by socialization or just coincidence, therefore, seem to be of great value. And thatā€™s why Iā€™m considering to design such a project that exhibits the process of tiny footprints we stepped with other people (no matter theyā€™re acquaintance or BFFs) along the way of our lives. This project aims at simulating the procedure of one personā€™s social life by one germ-liked light particle and the track it left behind, from someoneā€™s born only with his/her parents by his/her side, to after his/her parents gradually step out of the main stage of his/her social life, and encounter various types of people, which would all be denoted by light particles and their tracks; of course, you can control the light particleā€™s movement and make it run into certain particles as you wish, just like you can adaptively choose which kind of friends to make. And there would be a rainbow point, standing for the person whoā€™s meant to be standing by your side all the time, and you can possibly meet him/her from the very beginning of your life or maybe you ran into your end but never met the one. You can use a joystick to control the movement. The goal of this project is to reveal the fact that weā€™ve met a enormous number of people in our lives, and they may gonna join your life track for a little while or a long time and you may strengthen yourself or lose something precious because of this ā€œfusionā€. The challenge would be how to make vivid particle moving trail and the code of random particle generator.

And the third one, I call it ā€œpaletteā€. Itā€™s like a color-paring game which you can play either with computer or with your friend. The basic structure would be a LED belt with six or eight LED lights in the game, which would each show a different color and is set with a corresponding button. Two players (maybe one player and computer) take turns to pick one color from the LED palette by pressing that button each time until all colors are picked. And the result of which side wins depends on such criterion: We can say that there exists a similarity value between each pair of colors. And for one player, we select two colors from all kinds of color he/she picked, of which the similarity value is the maximum (this process is done by the computer, and the most similar two colorsā€™ LEDs would start to blink on the belt and the values of them would be shown on the screen by displaying those colorsā€™ RGB values). And who owns a bigger maximum similarity value would win the game. The goal of this project is to let the gamers get fun and the main challenge is to design a decent way to exhibit all those factors together and make users understand the winning condition of this game clearly and rapidly.

Leon Ding – PREPARATORY RESEARCH AND ANALYSIS

For the past field trip, I got a chance to closely observe some of the most cleverly conceived modern technology-based art pieces. One thing that particularly inspired me is by watching those art pieces work and considering over its operating logic, I realized that the relationship between technology and art is actually working mutually. That is to say, not only could technology acts as a vehicle and a platform for art, but art could also be a reflection to reveal how the technology works. Like this installation:

Itā€™s basically a nest-like network, built with wooden frame, woolen wire, and weights. Though itā€™s established as an art piece, it perfectly displays how some underlying algorithms of computer work: with weights going up and down, some computing boards sending a signal to wires, the device in the middle would simulate lots of images and keep transforming. Besides, thereā€™s also device like:

I consider this device as a project which is not that ā€œinteractiveā€. As I talked about in my midterm post, my midterm project is self-enclosed because it didnā€™t show many possibilities on the concept of ā€œinteractionā€. And so did this device. Though the idea was great, using a series of gears to reflect the passing of time, itā€™s not, as a matter of fact, as interactive as other installations, for it restricted itself thus it could only work in a settled way. Another installation is an irrigating device, which would construct a pile of an object consisting of oil, sand, transistor, and water depending on usersā€™ input. Itā€™s interactive as well, apparently.

As for my final project, firstly, as I mentioned in the midterm blog, ā€œ…put our feet in usersā€™ shoes, to think about how to help a ā€œrookieā€ easily understand our design and help him/her to achieve goals. Think, and think like an idiot, that would be the keyā€. I consider the perspective of designer the most important, for it should be set from 100% userā€™s view. Thus I set a new goal for my final work: a project that the user could know how to use it from the first sight. Secondly, As Crawford claims: ā€œThe quality of the interaction depends on the quality of each of the subtasks (listening, thinking, and speaking). And many things commonly held to be interactive are notā€. So Iā€™m thinking about constructing a multisensory project, which requires usersā€™ applying multiple sense organs to ā€œplay the gameā€ (maybe). Finally, one of the greatest ideas I abstracted from that exhibition is, technology-based art can be used to display things of various aspects. Different from the midterm project, I would like to build a philosophical and sociological program, which would lead the audience to a deeper level of thinking. Thatā€™s just goals and Iā€™m about to start. Weā€™ll see.

5th Inter Lab Documentation

Lab Timeļ¼š10/18/2019

Lab Content:

  • Select a picture as my motif
  • Draw it with my processing

Detailed Description:

I picked one picture by Sol Lweitt, (source: https://www.wnpr.org/post/art-idea-look-sol-lewitt).

The reason why I wanted to draw a motif of that is the style of its design is pretty close to one of my favorite albumsļ¼Œ ā€œBetter Late than Never” by č…°ä¹é˜Ÿ(source: https://music.douban.com/subject/25893150/):

Its texture is pretty attractive as well and that’s why I selected that picture. But for the computer drawing, I only choose the middle part as my object.

The method I used is basically printing all those lines brutally (partly because Young told me not to use iteration here), and it works perfectly. Below is the code.

size(330, 330)
background(255, 255, 255)

fill(0,0,0)

rect(0,0,10,330)
fill(0,0,205)
rect(320,0,10,330)

rect(20,0,10,330)
fill(255,48,48)
rect(300,0,10,330)

rect(40,0,10,330)
fill(180,82,205)
rect(280,0,10,330)

rect(60,0,10,330)
fill(0,255,127)
rect(260,0,10,330)

rect(80,0,10,330)
fill(255,215,0)
rect(240,0,10,330)

rect(100,0,10,40)
fill(255,48,48)
rect(100,290,10,40)

rect(120,0,10,40)
fill(0,191,255)
rect(120,290,10,40)

rect(140,0,10,40)
fill(255,165,0)
rect(140,290,10,40)

rect(160,0,10,40)
fill(255,240,245)
rect(160,290,10,40)

rect(180,0,10,40)
fill(0,139,69)
rect(180,290,10,40)

rect(200,0,10,40)
fill(255,222,173)
rect(200,290,10,40)

rect(220,0,10,40)
fill(0,0,0)
rect(220,290,10,40)

rect(100,50,130,10)
rect(100,70,130,10)
rect(100,90,130,10)
rect(100,110,130,10)
rect(100,130,130,10)
rect(100,150,130,10)
rect(100,170,130,10)
rect(100,190,130,10)
rect(100,210,130,10)
rect(100,230,130,10)
rect(100,250,130,10)
rect(100,270,130,10)

One thing that need to mention is that I installed the python mode in processing, so you can tell there are some slight differences between my code and what it should be in Java mode.

And above is the final result of my drawing code. These two pictures are almost the same (except for some shadow effect on the original picture). I think computer drawing maybe is not a good idea, ’cause it’s too ordered, which seems to lack of anima and inspiration; and using too much randomization, the picture would seems too chaotic.

Boxes Know Answers – Leon Ding – Marcela

To be honest, the group project Iā€™ve participated in, which is about online space-transcending chatting room, has little to do with my midterm project. But fortunately, it did trigger my understanding of interaction, which is: the core of interaction should be output that generated based on the given input. Through the circle of input and output, all the components in a interactive system work together towards a certain goal. That is to say, a interactive system needs a clear intention and the ability to process inputs into outputs to accomplish this intention. As for the original inspiration of our midterm project, it should be ā€œThe Book of Answersā€, a book of which thereā€™s a short word or phrase on each page. It feels like everyone is encountering enormous problems that are hard to solve or donā€™t have a specific and clear answer; in that case, something that can give these trapped people inconclusive answers to their questions and leave them a chance to fathom the answers by themselves would be a master stroke. Considering that thought as the very original purpose, we built this project ā€œBoxes Know Answersā€. Comparing to the initial book, our project allows more space for interaction: though they are both based on randomization, a microphone set to listen to your troubles seems way more trustworthy than a dumb book which is displayed on a shelf and clearly knows nothing about your concern. In other words, our project gives those people whoā€™re in a dilemma an exit to let out concern, something that you can pour out your own bitterness, even though the answers we offer are as blurry as the bookā€™s.

We used a microphone-shaped object, a sound sensor, a distance sensor, some servos, and several wooden boxes to build the whole project, with no hints except for an ā€œASK MEā€ close to the micro phone. You talk to the mic about your problems, and three seconds later, a box would open, with the answer laser cut on the lid. We consider that process pretty straightforward so actually we donā€™t need lots of tips to tell the user how to use it. However, as a matter of fact, the original version is far different from that. At the very beginning, it occurred to us that we can use Magic Conch, a concept from Sponge Bob, as the projectā€™s theme. In that cartoon, once you have any questions, Sponge Bob would say ā€œWhy donā€™t you ask Magic Conch?ā€ Of course the conch can give them back nothing but the echo of air, but the listener could ā€œunderstandā€ the echo from their own perspective and work out an answer by themselves. Thatā€™s almost the very image of our project thus we 3D-printed a plastic Conch and several wooden boxes, connected them together with an Arduino board, and set a button to trigger the sound sensor starting to record the question, which was finally rejected by us.

Why? If you were at the user test, you would definitely know why. Though the idea of giving a answer surprised lots of users, the whole project causes much confusion. First, the conch is always connected with listening to it rather than speaking to it, which made many users lose their ways. Besides, the conchā€™s style wasnā€™t quite suitable for those wooden boxes and seemed abrupt. Whatā€™s more, because we didnā€™t solve the problem that how to make boxes automatically open by steppers, the project used LED lights to show which box was the answer and the user must press the button and after the result was shown, open it manually, which is not as cool as the idea we offer. In short, the user test made us realize there were still so many problems to solve and details to improve.
So, as a result, we basically redid the whole project. Firstly, with the help from a fellow, we used servos rather than steppers to rotate and open up boxes. Plug a servo in the circuit and use analogWrite to give instruction 0Ā° and 120Ā°, itā€™s pretty much done. Now there wonā€™t be any LED lights guidance, and as long as the program figure out an answer, a corresponding box would open by itself. And then we built a wooden microphone and put a distance sensor and a sound sensor in it: once somebody get close to the mic, the distance sensor would get a sign and give instruction to sound sensor to make it start to work. In that way, we could get rid of the button and make the process more automatic! And it comes to the code part. To be honest, itā€™s quite easy:

#include <Servo.h>

Servo myservo;

int VIPin = A0;
int DIPin = A1;
int DisThreshold = 80;
int V_upper_bound = 127;
int PinOut[] = {3,5,6,9,10,11};

void setup() {
Serial.begin(9600);
}

void loop() {
//Generate a box number according to the audio received.
int DisInput = analogRead(DIPin);
int BoxNumber = 0;
int Tri = 0;
if (DisInput >= DisThreshold) {
Tri = 1;
}
while (DisInput >= DisThreshold) {
int VoiceInput = analogRead(VIPin) % 6;
BoxNumber += VoiceInput;
DisInput = analogRead(DIPin);
delay(10);
}

if (Tri > 0) {
BoxNumber = BoxNumber % 6;
Serial.println(BoxNumber);
myservo.attach(PinOut[BoxNumber]);
delay(3000);
myservo.write(120);
delay(7000);
myservo.write(0);
}

delay(1000);
}

The last part of the whole project is to assemble everything together. Sounds east but when we practiced it, problems started to turn out. When we pasted the box with servos and start the programā€™s uploading, some boxesā€™ lids rotated into a super weird angle. And then we realized that we didnā€™t paste the most closed box with the servoā€™s angle 0Ā°. A fatal fault. So we had to re-paste most of them. Since there are only six available servos from the equipment room, we designed six corresponding boxes only. Then we found out that the 5V source on Arduino board can provide enough electricity for five servos so we borrowed two adapters, directly connecting to the 220V source (and because of that, during the final assembling, we burnt out one servo thus there were only five boxes in the final version). After solving all these problems, we used big cardboard, drilled several holes on it (to contain those wires) and fixed our project on it. Below is how it works.

Our goal is to offer an answer to those whoā€™re confused with their problems. Without any doubts, we achieve this goal. But the project still has something not align with my definition of interaction. I expect the process of interaction to be more precise and determined but now, in our project, though the input(distance and sound) drives the outputā€™s formation, they are still not logically related and the only binder between them is randomization, which doesnā€™t quite fit in my definition. As for the usersā€™ interaction, I think because our project is quite forthright so people would barely misunderstand that, while something worth thinking about, raised by another classmate, is that we need to specify or give instructions on which kinds of problems could be asked; or else, somebody will ask ā€œwhatā€™s the weather likeā€ and the boxes just give him/her an ambiguous answer, which is certainly unacceptable. If I could have had more time, I would work on how to put the answer on the screen rather than on boxesā€™ lids, just like the magic ball 8. From the failure I had,I realize that no matter what project youā€™re working on, you need to save enough time for the practical test in order to avoid the case that has to finish the testing part, which is utterly crucial, in a rush.

After all, I still consider our projectā€™s interaction as immature, for the reason mentioned above; but the process of creating that did inspire me about one thing: if we want to design a really efficient and user-friendly interactive work, we must consider from a ordinary personā€™s perspective, who knows nothing about our project but has intense need for some certain purpose. That is to say, put our feet in usersā€™ shoes, think about how to help a ā€œrookieā€ easily understand our design and help him/her to achieve goals. Think, and think as an idiot, that would be the key.