HealthyMovieNight

Eat wo Quilt

(click pic to enter)

Idea:

  1. choose your movie
  2. choose your food
  3. give me your weight
  4. movie length * calories burn by exercising per min = calories of food in certain amount you have.

Issues:

  1. hard to find regular food calories API
    • right now just use the first item in the array
  2. pizza has no serving size unit(null)
  3. id –> name

API:

  1. The Movie Database API
  2. Nutritionix

Source:

 

html

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8"/>
		<title> FanGuide </title>
		<link rel="stylesheet" type="text/css" href="style.css"/>

		<script type="text/javascript" src="http://code.jquery.com/jquery-2.0.3.min.js"></script>
		<script type="text/javascript" src="http://underscorejs.org/underscore-min.js"></script>

	</head>
	<body>
		<p>The Movie Tonight
		<input id="movie" type="text"/></p>
		<p>The Food Tonight
		<input id="food" type="text"/></p>
		<p>Feel Like
		<button id="saw">Forestry</button> 
		<button id="fish">Fishing</button>
		<button id="dance">Ballet</button>
		<button id="jog">Water Jogging</button>
		Tonight</p>
		<p>Your Weight
		<input id="weight" type="text"/>
		<button id="kgButton">kg</button>
		<button id="lbsButton">lbs</button>
		</p>

		<button id="searchButton">Search</button>
		<!-- <button onClick="getFoodData();return false;">ARMS Surveys</button>
		<div id="divResultARMS"></div> -->
		<!-- <button id="update">UPDATE</button> -->
		<div id="articles"></div>
		<div id="articles2"></div>

	</body>
		<script type="text/javascript" src="script_new.js"></script>
</html>

js

var idMovie;
var movieTitle;
var duration;

var idFood;
var nameFood;
var calories;
var servingSize;
var servingSizeUnit;

var weightUnit;
var exerciseType;	// int
var exerciseTypeText;
var caloriesExercise;

var caloriesBurnAfterExersice;
var amountToEat;

var base_url = "http://image.tmdb.org/t/p/w500";

function getDuration(){
	var url = 'https://api.themoviedb.org/3/',
		mode = 'movie/',
		key = '?api_key=YourKey';

	$.ajax({
		url: url + mode + idMovie + key,
		dataType: 'jsonp',
		success: function(data){
			console.log(data);
			console.log("<img srt="" + base_url + data.backdrop_path + "">");

			movieTitle = data.original_title;

			duration = data.runtime;
			$('#articles').append("<div class='articleBox'>");
			//$('#articles').append("<p>" + movieTitle + "'s runtime: " + duration +"min" + "</p>");
			//$('#articles').append("<img src="" + base_url + data.backdrop_path + "">");
			$('#articles').append("</div>");

			$('#articles').css({
				"color": "white"
			});

			$('body').css({
				"background-image": "url("" + base_url + data.backdrop_path + "")",
				"color": "white"
			});
			getFoodID();
		}
	});

}

function getFoodID(){
	var url = 'https://api.nutritionix.com/v1_1/',
		search = 'search/',
		appId = '&appId=YourId',
		appKey = '&appKey=YourKey',
		setUp = 'results=0%3A10&cal_min=0&cal_max=50000&fields=item_name%2Cbrand_name%2Citem_id%2Cbrand_id';

	var input = $('#food').val(),
		foodName = encodeURI(input);

	$.ajax({
		url: url + search + foodName + '?' + setUp + appId + appKey,
		dataType: 'json',

		error: function(data){
			console.log("Something wrong!");
		},
		success: function(data){
			console.log(data);

			idFood = data.hits[0]._id;
			nameFood = data.hits[0].fields.brand_name + "'s " + data.hits[0].fields.item_name;

			console.log(idFood + nameFood);

			getNutrition();
		}
	});

}

function getNutrition(){
	var url = 'https://api.nutritionix.com/v1_1/',
		item = 'item?',
		appId = '&appId=YourId',
		appKey = '&appKey=YourKey';

	// nutrition search
	$.ajax({
		url: url + item + 'id=' + idFood + appId + appKey,
		dataType: 'json',

		error: function(data){
			console.log("Something wrong!");
		},
		success: function(data){
			console.log(data);

			// calories = data.nf_calories;
			// servingSize = data.nf_serving_size_qty;
			if(data.nf_serving_size_unit !== null){
				servingSizeUnit = data.nf_serving_size_unit;
			}

			if(data.nf_serving_size_qty !== null){
				calories = data.nf_calories / data.nf_serving_size_qty;
			} else {
				calories = data.nf_calories;
			}

			$('#articles').append("<div class='articleBox'>");
			//$('#articles').append("<p>" + nameFood + "'s calories: " + calories + " per 1 " + servingSizeUnit + "</p>");
			$('#articles').append("</div>");

			calculateEat();
		}
	});
}

function caloriesSetUp(){

	$('#jog').click(function(){
		exerciseType = 363;
		exerciseTypeText = "jog in water";
	});

	$('#saw').click(function(){
		exerciseType = 318;
		exerciseTypeText = "saw trees";
	});

	$('#fish').click(function(){
		exerciseType = 114;
		exerciseTypeText = "fish";
	});

	$('#dance').click(function(){
		exerciseType = 205;
		exerciseTypeText = "dance ballet";
	});

	// unit set-up
	$('#kgButton').click(function(){
		weightUnit = "kg";
	});

	$('#lbsButton').click(function(){
		weightUnit = "lbs";
	});

}

function caloriesBurn(){

	var input = $('#weight').val();
	if (weightUnit == "lbs") {
		caloriesExercise = exerciseType / 100 * input;
	} else {
		caloriesExercise = exerciseType / 100 * (input*2.20462);
	}

	return caloriesExercise;
}

function calculateEat(){

	caloriesBurn();

	// how many calories it will burn after exercising
	caloriesBurnAfterExersice = caloriesExercise / 60 * duration;

	// for certain calories, how many I can eat(per 1 serving size)
	amountToEat = caloriesBurnAfterExersice / calories;
	amountToEat = Math.round( amountToEat *10)/10;

	console.log(amountToEat);

	$('#articles2').append("<div class='articleBox'>");
	if(servingSizeUnit !== null){
		$('#articles2').append("<p>During " + movieTitle + ", if you " + exerciseTypeText + " all the way through it, you can eat " + amountToEat + " " + servingSizeUnit + " of " + nameFood + " without worrying gaining any weights!</p>");
	} else {
		$('#articles2').append("<p>During " + movieTitle + ", if you " + exerciseTypeText + " all the way through it, you can eat " + amountToEat + " " + nameFood + " without worrying gaining any weights!</p>");
	}
	$('#articles2').append("<p>Calories burnnnnnn.</p>");
	// $('#articles').append("<img src="" + base_url + data.backdrop_path + "">");
	$('#articles2').append("</div>");
}

$(document).ready(function(){
	var url = 'https://api.themoviedb.org/3/',
		mode = 'search/movie',
		input,
		movieName,
		//var url = "https://api.themoviedb.org/3/movie/550?api_key=";
		key = '?api_key=YourKey';

	caloriesSetUp();

	$('#searchButton').click(function(){
		var input = $('#movie').val(),
			movieName = encodeURI(input);

		$.ajax({
			url: url + mode + key + '&query=' + movieName,
			dataType: 'jsonp',
			success: function(data){
				console.log(data);

				idMovie = data.results[0].id;

				getDuration();

			}
		});

	});

});

css

.searchButton{
	width: 100px;
	height: 50px;
	text-align: center
}

.articles {
	text-align: center;

}

physical aspects {Tranquil_v2}

Based on the physical characteristics assigned by Neva:

  • Scale: Immersive versus Distant
    • distant
  • Density: Heavy versus Light
    • light, in order, orientation like lotus
  • Rigidity / Elasticity: Hard versus Soft
    • freely, floating, soft
  • Energy-Level: Exciting versus Calming
    • calming
  • Number: One versus Crowd
    • only one
    • or many but with a lot of space, freely floating like stars

I adjust my {Tranquil_v1} from this:

to this(click to switch the background mode(black, grey dots, white), it’d run faster if you enter the post to see):

 

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…)

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?

5-in-5_Day3_Breathe

tease(a teaser)

More to come, too cold to edit at 4am…

**Update**

Inspired by Wriggles & Robins(check out theirs!)
Set up in my bedroom with window wide open at night, tempurature -12ºC/10ºF,
LG HX350T projector, a lot of layers, and hot water stand by. Animation made in AE!

For now, it’s just a one-day simple projecting test. For future, I’d love to connect this with more interactions, exploring possibility to be generic art of emotions and communications. Pam suggested using words recognition to tell user’s speaking content then it can easily avoid pre-rendering! Seems to be having a lot of potentials. Exciting!

Oh there’s one big cannot unsee problem. It’s restricted by the temperature and amount of breath! Hmmm…