IA: Drawing Software

 

screenshot-2016-09-29-16-47-50

Screenshot 2016-09-29 20.14.33.png

screenshot-2016-09-30-08-03-59When thinking of digital landscape I could not move pass the literal of data being stored in codes consisting of zeros and ones. The images above show the transition of data to color displayed on screen.

Program:

float R;
float G;
float B;
float T=255; //Opp.
int W=20; //Width
int H=20; //Hight
int LX1,LY1,LX2,LY2;
void setup(){
size(600,600);
background(255);
}

void draw(){

//boarder————————————————————————————
noStroke();
rectMode(CORNER);
fill(150);
rect(-1,-1,30,600);//Rightside
rect(570,-1,30,600);//leftside
rect(-1,-1,600,30);//top
rect(-1,550,600,50);//bottom
//color swatch————————————————————————————————
stroke(0);
//red
fill(255,0,0);
rect(30,550,30,50);

//orange
fill(255,210,0);
rect(60,550,30,50);

//yellow
fill(252,255,0);
rect(90,550,30,50);

//green
fill(66,255,0);
rect(120,550,30,50);

//blue
fill(0,0,255);
rect(150,550,30,50);

//indigo
fill(69,22,206);
rect(180,550,30,50);

//putple
fill(222,0,255);
rect(210,550,30,50);

//black
fill(0);
rect(240,550,30,50);

//white
fill(255);
rect(270,550,30,50);

//Brush Swatch———————————————————————————————————–
fill(255);//white
rect(540,550,30,50);
rect(510,550,30,50);
stroke(0);
rectMode(CENTER);
fill(R,G,B,T);
rect (555,575,W,H);
//fill(R,G,B,T/3);
//rect (545,555,40,40);
fill(R,G,B,T);
ellipse (525,575,W,H);
//fill(R,G,B,T/3);
//ellipse(525,575,40,40);
stroke(R,G,B);
line(LX1,LY1,LX2,LY2);
//Size—————————————————————————————-
fill(255);
text(“Size:” + W,425,580);
text(“Opacity:” + T,320,580);
}
void mousePressed(){
if (mouseX<570 && mouseX>30 && mouseY<550 && mouseY>30){
noStroke();
fill(R,G,B,T);
ellipse(mouseX,mouseY,W,H);
//rect(mouseX,mouseY,W,H);
//fill(B,G,R,T/3);
//fill(R,G,B,T/3);
//rect(pmouseX,pmouseY,W*2,H*2);
}

stroke(0);
//Color Swatch——————————————————————————-
//red
if (mouseX<60 && mouseX>30 && mouseY>550){
R=255;
G=0;
B=0;
}
//orange
if (mouseX<90 && mouseX>60 && mouseY>550){
R=255;
G=210;
B=0;
}
//yellow
if (mouseX>90 && mouseX<120 && mouseY>550){
R=252;
G=250;
B=0;
}
//green
if (mouseX<150 && mouseX>120 && mouseY>550){
R=66;
G=255;
B=0;
}
//blue
if (mouseX>150 && mouseX<180 && mouseY>550){
R=0;
G=0;
B=255;
}
//indigo
if (mouseX>180 && mouseX<210 && mouseY>550){
R=69;
G=22;
B=206;
}
//purple
if (mouseX>210 && mouseX<240 && mouseY>550){
R=255;
G=0;
B=255;
}
//Black
if (mouseX<270 && mouseX>240 && mouseY>550){
R=0;
G=0;
B=0;
}
//white
if (mouseX>270 && mouseX<300 && mouseY>550){
R=255;
G=255;
B=255;
}
noStroke();
//————————————————————————————–
}
void keyPressed(){
//size———————————————————————————–
if(key=='[‘){
W=W-2;
H=H-2;
}
if(key==’]’){
W=W+2;
H=H+2;
}
//Oppacity——————————————————————————-
if(key==’o’){
T=T-5;
}
if(key==’p’){
T=T+5;
}
//Text——————————————————————————–
if(key==’1′){
fill(R,G,B,T);
text(‘1′,mouseX,mouseY);
}
if(key==’0’){
fill(R,G,B,T);
text(‘0′,mouseX,mouseY);
}
//erease all————————————————————————————
if(key==’e’){
background(255);
LX1=0;
LY1=0;
LX2=0;
LY2=0;
}
//rectKey——————————————————————————r
if(key==’r’){
stroke(0);
rectMode(CENTER);
fill(R,G,B,T);
rect(mouseX,mouseY,W,H);
}
if(key==’c’){
stroke(0);
fill(R,G,B,T);
ellipse(mouseX,mouseY,W,H);
}
//line Points—————————————————————————-
if(key==’x’){
LX1=mouseX;
LY1=mouseY;
}
if(key==’y’){
LX2=mouseX;
LY2=mouseY;
}
}
void mouseDragged(){
//Brush———————————————————————————-
noStroke();
fill(R,G,B,T);
ellipse(mouseX,mouseY,W,H);
//fill(B,G,R,T/3);
//fill(R,G,B,T/3);
//ellipse(pmouseX,pmouseY,W*2,H*2);
}
// Processing.org, clocl program

Advertisements

About dercks

Shelby is a student at Alfred State College in Digital Media and Animation.
This entry was posted in Interactive Authoring 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