Interactive Authoring: Digital Landscape Painting Redux

screen-shot-2016-09-29-at-11-08-00-pm

The painting above is an abstract representation of the “digital landscape.” The translucent circles and squares are things from the nondigital world, both tangible and nontangible. The white triangles are to be the ways the digital landscape holds together and enhances the nondigital while also encompassing the negative effects of digitalism, represented by the red lines interrupting the other shapes.

The code for the program used is as follows:

float r = random(255);
float g = random (255);
float b = random (255);
void setup() {
size (500, 500);
smooth();
background (0);
}

void draw() {

if (keyPressed == true) {
if (key == CODED) {
if (keyCode == UP) {
if (mousePressed == true) {
noStroke();
fill (r+mouseX, g+mouseY, b, 25);
rect (mouseX, mouseY, mouseY/2 + 1, mouseY/2 + 1);
}
}
}
}
if (keyPressed == true) {
if (key == CODED) {
if (keyCode == LEFT) {
if (mousePressed == true) {
noStroke();
fill (r/2, g, b+mouseX, 25);
ellipse (mouseX, mouseY, mouseX/2 + 2, mouseX/2 + 2);
}
}
}
}
if (keyPressed == true) {
if (key == CODED) {
if (keyCode == RIGHT) {
if (mousePressed == true) {
noStroke();
fill (r+200, g+200, b+200);
triangle (mouseX, mouseY, mouseX + 10, mouseX, mouseX + 4, mouseX + 3);
}
}
}
}
if (keyPressed == true) {
if (key == CODED) {
if (keyCode == DOWN) {
if (mousePressed == true) {
stroke (r+mouseX+5, 50, 50);
strokeWeight (2);
line (0, 0 , mouseX , mouseY);
}
}
}
}
}

Advertisements
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