Interactive Authoring: Digital Landscape

handscape

The goal for this project was to create an interactive program used to create some type of digital landscape. I went with trying to create a traditional drawing program similar to FireAlpaca or certain aspects of Photoshop.

The code used to create the program is as follows.

float value = 255;
color c1 = color(0,0,0);
float e = 5;
float thickness = 1;

void setup(){
size (720,480);
frameRate (120);
background (255);
}

void draw() {
fill (c1);
stroke (c1);
if(mousePressed)
{
{
strokeWeight(thickness);
line(mouseX, mouseY, pmouseX,pmouseY);
}
}4
}

void mouseReleased()
{
thickness = thickness/thickness;
}
void keyPressed (){
if (key == ‘1’) {
c1 = color(255,0,0); //red
}
if (key == ‘2’) {
c1 = color(0,255,0); //green
}
if (key == ‘3’) {
c1 = color(0,0,255); //blue
}
if (key == ‘4’) {
c1 = color(255,255,0); //yellow
}
if (key == ‘5’) {
c1 = color(255,0,255); //magenta
}
if (key == ‘0’) {
c1 = color(255); //white
}
if (key == ‘9’) {
c1 = color(0); //black
}
if (key == ‘=’ && thickness < 100) {
thickness = thickness + 3;
}
if (key == ‘-‘ && thickness > 1) {
thickness = thickness – 3;
if (e < 1){
thickness = 1;
}
}
}

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