Interactive Authoring : Digital Landscape

スクリーンショット 2016-09-26 午後7.04.28.png

The above picture I programmed is the imaginary digital landscape of Tokyo.

Processing Code :

PImage img;
int Z;

void setup(){
size(1000,500);
colorMode(HSB,100);
noStroke();
smooth();
Z = 5;
frameRate(15);
PFont font = createFont(“Naiv-Fat”, 42);
textFont(font, 24);
}

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

if(keyPressed){
if(key == ‘O’ || key == ‘o’){
fill(random(255),40,100);
ellipse(random(1000), random(500), 10, 10);
}else{
textAlign(CENTER);
fill(random(255),70);
text(key,random(width),random(height));
}}
}

void keyPressed(){
if (key == TAB){
background(50);
tint(0,1,100);
}

else if (key == ‘Q’ || key == ‘q’){
background(80,80,190);
tint(1,1,50);
}

else if (key == ‘W’ || key == ‘w’){
background(10,60,100);
tint(60,60,100);
}
}

void mousePressed(){
if(mouseButton == LEFT) {
fill(random(100),40,100);
ellipse(mouseX, mouseY, Z, Z);
}
else if(mouseButton == CENTER) {
Z = Z + 5;
}
else if(mouseButton == RIGHT) {
fill(random(90));
rectMode(CENTER);
rect(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