Interactive Authoring Touch ups and Fixes assignment.

Girl with the pearl earring updated code:

void setup(){

size (580, 700);
};

void draw(){
background (0);
//head
fill(196,173,148);
rect(357,248,63,148);
noStroke();
ellipse(346,258,136,173);

fill(242,205,205);
ellipse(313,251,159,181);
//body
fill(76,61,29);
noStroke();
triangle(452, 374, 465, 706,156, 710);
rect( 288, 419, 156,175,96,0,-15,0);
rect( 292, 369, 163,92,112,13,-1,-4);
//collar
fill(255);
ellipse(378,378,146,17);

//headdress
fill(125,125,0);
rect(267,129,202,100, 50,50,50,50);
rect(301,99,174,100, 50,50,50,50);
rect(315,80,165,70, 50,50,50,50);
fill(10,75,158);
noStroke();
rect(263,151,225,23, 55,50,62,24);
rect(250,161,220,40, 111,54,30,10);
rect(242,169,200,49, 52,33,67,24);
rect(260,160,201,53, 52,33,67,24);
rect(289,158,186,89, 52,33,67,24);
rect(273,196,186,42, 52,33,44,24);
rect(263,165,188,64, 52,33,59,16);
//lower headband
fill(10,79,139);
rect(320,184,147,72, 52,33,59,24);
rect(298,180,133,70, 52,33,59,24);
rect(319,179,161,58, 52,33,59,24);
rect(338,243,116,23, 52,33,59,24);
fill(131, 126, 29);
stroke(26);
triangle(580,413,467,94,482,434);
fill(0);
fill(19,72,113, 191);
triangle(584,421,474,115,543,425);

//earing
fill(134,130,123);
stroke(11);
ellipse(411,335,26,28);
fill(251);
ellipse(405,331,12,13);
fill(209,209, 246);
ellipse(405,331,12,13);

//eyes
fill(248);
stroke(0);
ellipse(256,251,29,21);
ellipse(314,271,29,21);
fill(0);
ellipse(262,252,14,15);
ellipse(321,272,16,14);

//lips
fill(255,0,0);
ellipse(284,303,48,9);
ellipse(287,317,41,11);

// Nose
stroke(0);
fill(242,205,205);
triangle(281,255,280,291,245,289);
fill(192,163,163);
triangle(281,256,285,293,253,289);
}

Moving objects code:

//Refrences
int Nothing = 0;
int Berny = 1;
int Dual = 2;
int Tricycle = 3;
int Truck = 4;
//Double Digits
int Oryon = 12;
int Kennedy = 20;
int Alex = 22;
int Demon = 28;
int Life = 42;
int Coin = 50;

// Triple Digits
int Keagan = 100;
int Vampire = 110;
int Elf = 150;
int Goblin = 200;
int Godzilla = 230;
int Finals = 250;

// Set Up
void setup() {
size(200,200);
}
void draw() {
background(Alex);
stroke(Nothing);

// Growing and quick shrink Circle
if (keyPressed == true){
ellipse(Goblin,Vampire,Vampire,Vampire);
fill(Oryon,Kennedy,Vampire);
Goblin = Goblin – Berny;
Vampire= Vampire – Dual;
}
else{
ellipse(Goblin,Vampire,Coin,Coin);
fill(random(Alex));
}
// Spasming rectangle

if (mousePressed == true){
Elf = Elf – Berny;
Demon = Demon + Berny;
fill(random(Finals), random(Keagan), random(Oryon));
rect( Elf, Demon, Life, Life);
}
else{
fill(Keagan,Keagan,150);
rect( Elf, Demon, Life, Life);
}
// Clingy Triangle

if (keyPressed == true){
fill(random(Vampire),Keagan,Oryon);
triangle(Truck,Vampire,Godzilla,Berny,Demon,Elf);

}
}

Fix 1:

//had to add a (

void setup() {

background(255);
size(1920,1080);
smooth();

}

void draw() {

background(255);
ellipseMode(CENTER);
rectMode(CENTER);

stroke(0);
fill(175);
rect(mouseX,mouseY,20,100);
stroke(0);
fill(255);
ellipse(mouseX,mouseY-30,60,60);
fill(mouseX,0,mouseY);
ellipse(mouseX-19,mouseY-30,16,32);
ellipse(mouseX+19,mouseY-30,16,32);
stroke(0);
line(mouseX-10,mouseY+50,pmouseX-10,pmouseY+60);
line(mouseX+10,mouseY+50,pmouseX+10,pmouseY+60);

}
void mousePressed() {
println((“Take me to your leader!”));
}

Fix 2:

void setup() {
size(200,200);
background(255);
}
void draw() {
}
void mousePressed() {
stroke(0);
fill(175);
rectMode(CENTER);
rect(mouseX,mouseY,16,16);
}
void keyPressed() {
background(255);
}

Fix 3:

color RanColor;
boolean goCrazy;

void setup() {
size(300, 300);
RanColor = color(200, 10, 189);
}

void draw() {
background (RanColor);
if (goCrazy) {
RanColor = color(random(255), random(255), random(255));
}
}

void mousePressed() {
goCrazy = true;
}

void mouseReleased() {
goCrazy = false;
}

Fix 4:

int circleX = 0;
int circleY = 100;
void setup() {
size(200,200);
}
void draw() {
background(255);
stroke(0);
fill(175);
ellipse(circleX,circleX,50,50);
circleX = circleX + 1;
}

Fix 5:

float g;
float b;
float a;
float diam;
float x;
float y;
float r;
void setup() {
size(720,480);
background(0);
smooth();
}
void draw() {
// Fill all variables with random values
r = random(255);
g = random(255);
b = random(255);
a = random(255);
diam = random(20);
x = random(width);
y = random(height);
// Use values to draw an ellipse
noStroke();
fill(r,g,b,a);
ellipse(x,y,diam, r);
}

Advertisements

About Alex Mandzi

I'm a new artist and wish to become a game designer. I like cartoons and draw them as well.
This entry was posted in Computer Animation, 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