Digital Landscape

digitallandscapecolor

Digital Landscape, personally not proud of it, I failed to understand the concept.

Code

int strokeWeight;
float alpha;
color paintbrush;
PImage photo;

void setup() {
size(800, 800);
background (255,255,255);

photo = loadImage(“PS NoonValley.jpg”);
image(photo, 0,0);
photo = loadImage(“PS DayPier.jpg”);
image(photo, 400, 0);
photo = loadImage(“PS OrangeSky.jpg”);
image(photo, 0, 400);
photo = loadImage(“PS NightBridge.jpg”);
image(photo, 400, 400);
}
void draw() {
if (key == ‘f’){
strokeWeight = strokeWeight + 1;
}
if (strokeWeight >= 100){
strokeWeight = 100;
}
if (key == ‘t’){
strokeWeight = strokeWeight – 1;
}
if (strokeWeight <= 1){
strokeWeight = 1;
}
if (keyPressed) {
if (key == ‘r’) {
paintbrush = color(255,0,0,5);
}
if (key == ‘o’) {
paintbrush = color(255,165,0,5);
}
if (key == ‘y’) {
paintbrush = color(255,255,0,5);
}
if (key == ‘g’) {
paintbrush = color(0,255,0,5);
}
if (key == ‘b’) {
paintbrush = color(0,0,255,5);
}
if (key == ‘p’) {
paintbrush = color(255,0,255,5);
}
if (key == ‘m’) {
paintbrush = color(255,192,203,5);
}
if (key == ‘w’) {
paintbrush = color(255,5);
}
if (key == ‘k’) {
paintbrush = color(0,5);
}
}
}
void mouseDragged() {
if (mousePressed == true) {
strokeWeight(strokeWeight);
stroke(paintbrush);
line(pmouseX, pmouseY, mouseX, mouseY);
}
}

Advertisements
This entry was posted in Non Time Based 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