answers to hw and hopely to project

Answer#1

var print = "#";
for(var i=0; i<7; i++){

	console.log(print);
	print += "#";	
}

Answer#2

for(var i=0; i<100; i++){

	if((i+1)%3==0 || (i+1)%5==0){
		console.log("FizzBuzz");
	} else {
	console.log(i+1);
	}
}

Answer#3

var size = 8;
var print1 = "#";
var print2 = " ";
var printFinal1 = "";
var printFinal2 = "";
for(var i=1; i<size+1; i++){
	if (i%2==1){
		printFinal1+=print1;
		printFinal2+=print2;
	}
	else{
		printFinal1+=print2;
		printFinal2+=print1;
	}
}

for(var i=0; i<printFinal.length; i++){
	if(i%2==0){
		console.log(printFinal1);
	} else {
		console.log(printFinal2);
	}
}

Yeah hay.

As for the project that

Create a single web page experience that, upon user input, responds with data from at least 2 web apis. (1) a user needs to “trigger” an event, (2) data needs to be requested via AJAX from two APIs, (3) and the page should update appropriately.

I’m not sure yet… stiill tuning!

{FungU} Concept and prototype with 3D model

test1.0006

notes

test1.0001

test1.0005

test1.0004

Idea

Mycelium covers all over the Earth and is aware of what’s going on up there. Its decomposing ability is the key of the nutrient cycling system, and can also degrade or remove toxins from the environment. Those newly learned information inspired me to be a missioner of fungus, broadcasting what fungus has done for the planet, so this is a project based on the perspective of fungus. Magnifying what fungus does by present it as a creature with thoughts.

Content

When no one’s near, the projector projects(or screen behind plays) the collage of the mycelium activities(growing, moving, decomposing, degrading pollution etc.) video footages, representing what fungus is doing right now. When someone comes near(detected by ultrasonic sensor), the image changes into camera view, and viewer will be capped with oyster mushroom cap(using OpenCV), a light-hearted way to show how close we are to fungus, to intrigue to be aware of what fungus is doing, and hopefully to make us be the positive force for the Earth, like fungus, instead of being a negative influence.

Materials

  • Mushroom: Oyster Mushroom
    • commonly seen, edible, easily growing, can break down the pesticides, petroleum based contaminants and hydrocarbons based pollutants)
  • Cap: Cork shaped as net, wrapping logs to grow out mushroom
  • Body: Mycelium
  • Base: soil in wood box

(3D model made in Maya)

interview and sensors test {FungU}

Interview with Stephen from Ecovative and Customer Service Lady from Fungi Perfecti:

  • Free form mycelium fabrication could be doable, just remember to degerm.
  • Can’t be pressed in small mold because it will be hard to take out of the mold.
  • Can try to put growing log in the mold I make to grow, but cut it in half equals to cut the nutrients in half.

Discuss with Scott:

  • Questions for myself
    • organic or clean? based on what message I want to send, what emotion I want people to have be intrigued, be bound, to have raw motion from
    • —> messy, wild, crazy —> Organic!

Lab:

sensor_test

 

  • kind of achieve to mimic the movement of the mushroom: when no one near, the mushroom keeps swinging, when ppl come near, the mushroom is aware and then stops.
  • problems: swing speed needs to slow down, could be more sensitive and accurate. ASK around. Yo.

Schedule:

  • order oyster mushroom kit
  • try using mycelium as dough(if it’s doable, project might change)
  • physical design
  • software design
  • LAB in shops
  • blue foam: big & small fungi
  • wood base box
  • put oyster mushroom in it and wait it to grow!!!

what can I do to help hooking up fungi and human?

From this week’s reading of Mycelium Running, I learned how powerful fungus and mycelium is. Sending nutrients back to soil, completing the cycling of nutrients, rebuilding forest, absorbing and decomposing toxins. It seems fungus is almost invincible. How can this information be well known by people, and implemented widely? What can I do to help strengthening the connection between human and fungus? Emotional or functional aspect? What’s the story I can tell? I have to admit, the more I thought, the more unsure I became.

I want fungus be loved.

For this, I’m thinking about changing my project a little bit. I want to intrigue and ripple people’s mind.

projectFINALIZED

  • Instead of using mycelium, I’m going to grow oyster mushroom out of a fruit body model, with a camera attach on it(or hidden behind if it’s too difficult).
  • Connect the cap and body with motor to make organic move.
  • Once people come near(infrared sensor), mushroom stills. Little mushroom come out of holes from the base box.
  • The image projected on the wall changes from black to this.
Mushroom

“Everyone is mushroom.” Message sent.

This is also inspired from one line from the book Mycelium Running:
Nature loves communities. When one species is suddenly introduced, the population dynamics shift in response.

The questions I’d love to ask and discuss

  • Will this achieve the goal to intrigue and ripple people’s mind?
  • Will people be interested in fungus after this experience?
  • What’s the information people will have?
  • Can this project justify its existence? (<– this one trouble me the most…)

emotion visualization {Tranquil}

Before I start, let me document one thing first… I FORGOT the format of Processing. Proof as below.

Screen Shot 2014-02-07 at 7.41.33 PM

And also, I found a music video programming in Openframeworks. Pure Astonishing.

 

OK. Let’s begin.

{Tranquil}

For creating 3 studies of the emotion with ratios of space, rations of color, and ratios of time, I got Tranquil from Kate, and l first pictured the situation I’ll have this feeling in, and then tried to convey them through coding.

<em>Situation</em>: sparkling dust floating in dark, hair floating with wind, immerse in music in crowd environment, look into sky, unfocus eyesight, repeat pattern

Study 1: calm(look into sky, unfocus eyesight, repeat pattern)

Study 2: free from disturbance(immerse in music in crowd environment)

Study 3: free(sparkling dust floating in dark, hair floating with wind)

project_update {Mycofabrication}

Inspired by Eric Klarenbeek’s MyceliumChair(image pool), that

  1. 3D prints base with straw & water paste for growing mycelium,
  2. 3D prints shell with bioplastics for molding mycelium.,

I’d love to explore different possibilities of mycelium molding. Is it possible to make delicate stuff with mycelium, other than solid square building bricks? Can it be molded into small parts that are able to be assembled?

mycofabrication

QUESTION TIME!

  • For plan A
    • if I chop mycelium into small pieces, is it still growable?
    • what’s the proportion between mycelium, straw powder, and water?
    • without tight pressing can it still be moldable?
  • For plan B
    • is it possible to connect pieces by joinery?
    • multiple molds –> time consuming?

As for the case study, me and Kate and Peigi decided to team up since we are all focus in the material/fabrication subject. Possible exports include Eric Klarenbeek and Ecovative. Still searching.

Gif-Overload {Giphy API}

Last semester, for my final project for Comm Lab: Web, I made an API meshup website LOST, using Youtube, TheCatAPI, Iheartquotes API.

past1

LOST_homepage

past2

LOST_”No, I’m not.” page

It’s interesting to see images animated in the stop-motion way, so I want to do more with GIFs first, and then later maybe develop into video with sound. For an assignment to build  single web page that displays (some of) the data you found with some basic css styling, I found an API from Giphy, a animated GIFs search website. On the Github of Giphy, the API is well documented and has following functions: search, GIF by id, translate, random, trending. And also, according to their Github,

The Giphy API implements a REST-like interface. Connections can be made with any HTTP enabled programming language. The Giphy API also implements CORS, allowing you to connect to Giphy from JavaScript / Web browsers on your own domain.

To warm up my API-skill for new semester, I use search function, and give 3 choices: Cat, Grilled Cheese, and Coding to display 25 related GIFs from Giphy API, and also a reset button to display pure background. Unfortunately the search function gives you fixed searching result. Might need to twig the offset parameter… Check it out!

Screen Shot 2014-02-05 at 8.33.47 PM

And here are the codes.

php file

<!DOCTYPE HTML>

<html> 
	<head>
		<link rel="stylesheet" type="text/css" href="style.css">
		<link href='http://fonts.googleapis.com/css?family=Reenie+Beanie' rel='stylesheet' type='text/css'>

		<title>Giffff</title>
	</head>
	<body>
	<!-- white words-->
	<h1>Gif-Overload!</h1>
	<!-- rainbow words -->
	<!-- <h1><span class="rainbow">Gif-Overload!</span></h1> -->
	<form align="center" method="post">
    	<div class="button">
        	<button type="submit" value="clear" name="choice"> Reset </button>
	    </div>
	</form>

	<form align="left" method="post">
    	<div class="button1">
        	<button type="submit" value="cat" name="choice"> Cat </button>
	    </div>
	</form>

	<form align="center" method="post">
    	<div class="button">
        	<button type="submit" value="grilled+cheese" name="choice"> Grilled Cheese </button>
	    </div>
	</form>	

	<form align="right" method="post">
    	<div class="button2">
        	<button type="submit" value="coding" name="choice"> Coding </button>
	    </div>
	</form>

	<p align="center">
		<?php

		$choice = $_POST['choice'];

		// mode: search
		$url = 'http://api.giphy.com/v1/gifs/search?q='.$choice.'&api_key=dc6zaTOxFJmzC';

		// mode: translate
		//$url = 'http://api.giphy.com/v1/gifs/translate?s='.$choice.'&api_key=dc6zaTOxFJmzC';

		// mode: random
		// $url = 'http://api.giphy.com/v1/gifs/random?api_key=dc6zaTOxFJmzC&tag='.$choice.'';

		// Get the document at this url
		$response = file_get_contents($url); 
		// echo $response; //debug

		// Parse XML with SimpleXML in PHP http://www.php.net/manual/en/simplexml.examples-basic.php
		$pics = json_decode($response);
		//var_dump($pics); // take a look at this to see what data you get back

		if ($choice == 'clear') {
			echo '';
		} else {
			for ($i=0; $i<25; $i++) {
				// mode: search
				echo '<img src="'.$pics->data[$i]->images->fixed_height->url.'">';
			}
		}

		// mode: translate
		//echo '<img src="'.$pics->data->images->fixed_height->url.'">';

		// mode: random
		//echo '<img src="'.$pics->data->image_url.'">';

		?>
	</p	>
		
</body> 
</html>

css file

body{
	background-image: url('galaxy.png');
}

h1{
	text-align: center;
	font-family: 'Reenie Beanie', cursive;
	font-size: 50px;
	font-weight: bold;
	color: white;
}


.button1 {
	position: absolute;
	top: 140px;
	left: 20%;
}

.button2 {
	position: absolute;
	top: 140px;
	left: 80%;
}

Braninless Intelligence

After reading 1/3 part of Mycelium Running, a fungi bible by Paul Stamets, I’m amazed by how efficiently and fast the mold responds toward its food. It must be one of the reasons that fungi are used to earth’s Clean-Up. In a maze of having oat in the exit, within only 8 hours, the brainless slime mold, Physarum polycephalum, first occupied the whole area and then found the shortest ways out, by natural appealing to food.

mold maze

I looked further into Physarum polycephalum, and found out a research, by Chris Reid of the University of Sydney, state that..

As polycephalum moves through a maze or crawls along the forest floor, it leaves behind a trail of translucent slime. …a foraging slime mold avoids sticky areas where it has already traveled. …is a kind of externalized spatial memory that reminds polycephalum to explore somewhere new.

Spatial memory function! This interests me a lot. There are already a lot of experiments about using slime mold to run the metropolitan traffic system, and found they amazingly similar. I want to do something like that, with same spirit. I want to fungus to guide my route!

My initial idea about fungus project is to make a helmet/hat out of mushrooms. Literally having mushrooms growing on my helmet/hat. Because what intrigues me the most about fungi at first, is its appearance and the emotion it makes me feel, I think it would be a good point to start with, its looks and psychological impact. But then I went just really confused… Is it even meaningful?

So, if I combine both appearance and behavior of fungi together as the theme for my project, will it be more meaningful and complete? Right now in my mind is…. I’ll wear that mushroom helmet/hat, and follow the route of slime mold.

Isn’t it super weird?