Collision

Screen Shot 2015-11-19 at 11.30.35 AM

 

 

 

 

 

Screen Shot 2015-11-19 at 11.21.30 AM

 

 

Screen Shot 2015-11-19 at 11.22.01 AM

 

the background turn white when collision happens, also terminal is printing the distance between two squares the same time.
function draw() {
background(back);
fill(255,240,245);
var v1 = createVector(600, 350);
var v2 = createVector(mouseX, mouseY);
rect(v1.x, v1.y, 50, 50);
rect(mouseX, mouseY, 50, 50);
if(mouseX>(600-50)& mouseX<(600+50)&mouseY>(350-50)&mouseY<(350+50) ){
back=255;
}else{
back=0;
}
var distance = p5.Vector.dist(v1,v2);
print(distance);
}

SUN

SUN is a therapeutic lighting fixture coordinating different temperature white LEDs and color LEDs to achieve the function of

– Helping people with SAD(seasonal affective disorder) and other anxiety and depression symptoms.

– Being a smart biological Clock adjusting modern schedule for modern human.

Link to Presentation: SUN

Link to Code: https://drive.google.com/folderview?id=0B3ncfgxNfUFJYzVValdkajdjOGs&usp=sharing