-
Recent Posts
Recent Comments
- Danielle Small on Final Blog Post
- Calli Higgins on Homework 10.2
- Calli Higgins on Homework 10.2
- Calli Higgins on Homework 10.2
- Calli Higgins on Nafis Sabir HW 10.2
Archives
Categories
Meta
Final project
Line thatLine;
Line2 thatLine2;
Line3 thatLine3;b
Line4 thatLine4;
void setup() {
background(0);
size(400, 400);
smooth();
thatLine = new Line();
thatLine2 = new Line2();
thatLine3 = new Line3();
thatLine4 = new Line4();
}
void draw() {
thatLine.display();
thatLine2.display();
thatLine3.display();
thatLine4.display();
line(150, 180, 180, 180);
line(200, 180, 230, 180);
line(100, 210, 130, 210);
line(150, 210, 180, 210);
line(200, 210, 230, 210);
line(250, 210, 280, 210);
line(150, 240, 180, 240);
line(200, 240, 230, 240);
}
void keyPressed() {
if ((key == ‘b’) || (key==’i’) ||(key==’r’) || (key == ‘v’)) {
fill(0, 225, 0);
ellipse(50, 50, 80, 80);
line(50, 50, 80, 80);
}
else if ((key == ‘c’) || (key==’j’) || (key==’t’) ||(key==’w’)) {
stroke(0, 225, 0);
line(50, 95, 50, 200);
}
else if ((key == ‘d’)||(key==’k’)||(key==’u’) || (key==’x’)) {
stroke(0, 225, 0);
line(50, 150, 80, 50);
}
else if ((key == ‘f’)|| (key==’n’) ||(key==’y’)) {
stroke(0, 225, 0);
line(50, 150, 20, 50);
}
else if ((key==’g’)|| (key==’o’)) {
stroke(0, 225, 0);
line(50, 200, 20, 250);
}
else if ((key==’h’)|| (key==’q’)) {
stroke(0, 225, 0);
line(50, 200, 80, 250);
}
else if (key == ‘p’) {
textSize(26);
text(‘p’, 110, 150);
text(‘p’, 105, 210);
}
else if (key == ‘a’) {
textSize(26);
text(‘a’, 155, 150);
}
else if (key == ‘s’) {
textSize(26);
text(‘s’, 210, 150);
text(‘s’, 260, 150);
}
else if (key == ‘m’) {
textSize(26);
text(‘m’, 155, 180);
}
else if (key==’e’) {
textSize(26);
text(‘e’, 205, 180);
}
else if (key == ‘l’) {
textSize(26);
text(‘l’, 159, 210);
}
else if (key==’z’) {
textSize(26);
text(‘z’, 205, 210);
text(‘z’, 255, 210);
}
else if (key == ‘:’) {
textSize(26);
text(‘:’, 160, 240);
}
else if (key== ‘(‘) {
textSize(26);
text(‘(‘, 210, 240);
}
}
class Line {
color c;
int xpos;
int ypos;
Line() {
c = color(0, 225, 0);
xpos = 100;
ypos = 150;
}
void display() {
stroke(c);
//smooth();
line(100, 150, 130, 150);
}
}
class Line2 {
color c;
int xpos;
int ypos;
Line2() {
c = color(0, 225, 0);
xpos = 150;
ypos = 150;
}
void display() {
stroke(c);
line(150, 150, 180, 150);
}
}
class Line3 {
color c;
int xpos;
int ypos;
Line3() {
c = color(0, 225, 0);
xpos = 200;
ypos = 150;
}
void display() {
stroke(c);
line(200, 150, 230, 150);
}
}
class Line4 {
color c;
int xpos;
int ypos;
Line4() {
c = color(0, 225, 0);
xpos = 250;
ypos = 150;
}
void display() {
stroke(c);
line(250, 150, 280, 150);
}
}
This entry was posted in Uncategorized. Bookmark the permalink.