Interactive Authoring : Digital Landscape (Final)

%e3%82%b9%e3%82%af%e3%83%aa%e3%83%bc%e3%83%b3%e3%82%b7%e3%83%a7%e3%83%83%e3%83%88-2016-09-29-%e5%8d%88%e5%89%8d1-21-16

The imagination of children is always beautiful and fantastic. Even though we cannot see what children are thinking, their imaginations are at work. This picture shows what might be going on in a child’s mind.

 

Processing Code:

PImage img;
int Z;
int blue = 0;
int green = 0;
int yellow = 0;
int purple = 0;

void setup(){
size(500,700);
smooth();
background(0);
Z = 5;

stroke(255,255,255,10);
float x = 250, y = 370, diameter = 500;
float r = 255, g = 255, b = 255;
int i = 0;

for(i = 0; i < 10; i++){
g = g * 1.3;
b = b * 0.9;
fill(255 – r, 255 – g, 255 – b);
diameter = diameter – 50;
ellipse(x, y, diameter, diameter);
}}

void draw(){
img = loadImage(“silhouette.png”);
image(img,0,0);

noStroke();
if (keyPressed) {
if (key == ‘1’) {
blue = 1;
green = 0;
yellow = 0;
purple = 0;
}
if (key == ‘2’) {
green = 1;
blue = 0;
yellow = 0;
purple = 0;
}
if (key == ‘3’) {
yellow = 1;
blue = 0;
green = 0;
purple = 0;
}
if (key == ‘4’) {
purple = 1;
blue = 0;
green = 0;
yellow = 0;
}

if (blue == 1) {
fill(100,100,255,50);
noStroke();}
if (green == 1) {
fill(60,135,60,40);
noStroke();}
if (yellow == 1) {
fill(250,250,125,40);
noStroke();}
if (purple == 1) {
fill(125,10,160,50);
noStroke();}}

if (keyPressed) {
if (key == TAB) {
ellipse (mouseX,mouseY, Z,Z);
}}}
void mousePressed(){
if(mouseButton == LEFT){
fill(255,255,255,50);
ellipse(mouseX, mouseY, Z, Z);
}
else if(mouseButton == CENTER){
Z = Z+1;
}
else if(mouseButton == RIGHT){
Z = Z-1;
}}

void mouseDragged(){
fill(255,255,255,50);
ellipse(mouseX, mouseY, Z, Z);
}

Advertisements

About Yoko

I'm Yoko. I'm an international student from Japan. I love Japanese animation♡
This entry was posted in Interactive Authoring, Non-Timebased and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s