///////////////////////// //Kal-El by Saahil Dhar// ///////////////////////// void setup() { // set canvas size to 400 pixels wide by 400 pixels high size(400, 400); // Set rectMode to draw from top left corner to bottom right corner rectMode(CORNERS); } void draw() { //Clear screen to sky color background(#3BE6FF); noStroke(); ////////// //Kal-El// ////////// ////////////// //Kal's body// ////////////// //Draw kal's chest (cobalt blue) fill(47, 45, 247); quad(mouseX-50, mouseY, mouseX+50, mouseY, mouseX-30, mouseY+60, mouseX-50, mouseY+40); quad(mouseX-30, mouseY+60, mouseX+50, mouseY, mouseX+50, mouseY+40, mouseX+30, mouseY+60); //Draw Kal's chest shield (red part) fill(255,0,0); stroke(255,0,0); quad(mouseX, mouseY+30, mouseX, mouseY+60, mouseX-40, mouseY+40, mouseX-30, mouseY+30); quad(mouseX, mouseY+30, mouseX, mouseY+60, mouseX+40, mouseY+40, mouseX+30, mouseY+30); //Draw Shield plaque (yellow part) fill(255,255,0); noStroke(); triangle(mouseX-40, mouseY+40, mouseX-30, mouseY+30, mouseX-20, mouseY+30); triangle(mouseX-40, mouseY+40, mouseX+10, mouseY+50, mouseX-20, mouseY+50); triangle(mouseX+20, mouseY+30, mouseX+40, mouseY+40, mouseX-15, mouseY+40); //Draw kal's face (skin) fill(255, 204, 178); rect(mouseX-30, mouseY-40, mouseX+30, mouseY+20); //Draw Kal's hair (black) fill(0); rect(mouseX-30, mouseY-60, mouseX+30, mouseY-30); triangle(mouseX, mouseY-30, mouseX, mouseY-20, mouseX+10, mouseY-30); //Draw kal's cape attachments (red) fill(255,0,0); quad(mouseX-10, mouseY+20, mouseX-30, mouseY+20, mouseX-50, mouseY, mouseX-50, mouseY-20); quad(mouseX+10, mouseY+20, mouseX+30, mouseY+20, mouseX+50, mouseY, mouseX+50, mouseY-20); //Draw kal's cape (red) fill(255,0,0); quad(mouseX-50, mouseY-20, mouseX-50, mouseY+40, mouseX-90, mouseY+20, mouseX-130, mouseY+20); quad(mouseX+50, mouseY-20, mouseX+50, mouseY+40, mouseX+90, mouseY+20, mouseX+130, mouseY+20); //Draw kal's arms (cobalt blue) fill(47, 45, 247); triangle(mouseX-50, mouseY+40, mouseX-50, mouseY-40, mouseX-110, mouseY-40); triangle(mouseX+50, mouseY+40, mouseX+50, mouseY-40, mouseX+110, mouseY-40); //Draw Kal's boots (red) fill(255,0,0); quad(mouseX-20, mouseY+60, mouseX+20, mouseY+60, mouseX+10, mouseY+70, mouseX-10, mouseY+70); stroke(111, 235, 255); strokeWeight(2); line(mouseX, mouseY+60, mouseX, mouseY+70); /////////////// //Kal's fists// /////////////// //Draw Kal's knuckles (skin) noStroke(); fill(255, 204, 178); rect(mouseX+50, mouseY-100, mouseX+130, mouseY-60); rect(mouseX-130, mouseY-100, mouseX-50, mouseY-60); //Draw Kal's knuckle shadows (darker skin) fill(232,187,164); rect(mouseX+50, mouseY-70, mouseX+130, mouseY-60); rect(mouseX-130, mouseY-70, mouseX-50, mouseY-60); //Draw Kal's palms (darkest skin) fill(219, 176, 155); quad(mouseX+80, mouseY-60, mouseX+80, mouseY-40, mouseX+110, mouseY-40, mouseX+130, mouseY-60); quad(mouseX-80, mouseY-60, mouseX-80, mouseY-40, mouseX-110, mouseY-40, mouseX-130, mouseY-60); //Draw Kal's finger divisions (darkest skin) stroke(219, 176, 155); strokeWeight(2); line(mouseX+70, mouseY-60, mouseX+70, mouseY-90); line(mouseX+90, mouseY-60, mouseX+90, mouseY-90); line(mouseX+110, mouseY-60, mouseX+110, mouseY-90); line(mouseX-70, mouseY-60, mouseX-70, mouseY-90); line(mouseX-90, mouseY-60, mouseX-90, mouseY-90); line(mouseX-110, mouseY-60, mouseX-110, mouseY-90); //Draw Kal's thumbs (skin) fill(255, 204, 178); noStroke(); rect(mouseX-80, mouseY-60, mouseX-40, mouseY-40); rect(mouseX+40, mouseY-60, mouseX+80, mouseY-40); ////////////// //Kal's eyes// ////////////// //Draw kal's irises (light blue) noStroke(); ellipseMode(CORNER); fill(183,227,255); ellipse(mouseX+10, mouseY-20, 10, 10); ellipse(mouseX-20, mouseY-20, 10, 10); //Draw kal's pupils (black) fill(0); ellipseMode(CENTER); ellipse(mouseX+15, mouseY-15, 5, 5); ellipse(mouseX-15, mouseY-15, 5, 5); //Draw kal's eyebrows (black) fill(0); triangle(mouseX+10, mouseY-20, mouseX+10, mouseY-10, mouseX+20, mouseY-20); triangle(mouseX-10, mouseY-20, mouseX-10, mouseY-10, mouseX-20, mouseY-20); } /////////////// //Heat Vision// /////////////// void mouseMoved() { // Flash kal's heat vision rays (when mouse moves) fill(255, 102, 0, 165); triangle(mouseX+15, mouseY-15, 210, 0, 270, 0); quad(mouseX+15, mouseY-15, 280, 0, 400, 0, 400, 110); triangle(mouseX+15, mouseY-15, 400, 130, 400, 270); quad(mouseX+15, mouseY-15, 400, 290, 400, 400, 280, 400); triangle(mouseX+15, mouseY-15, 270, 400, 210, 400); triangle(mouseX-15, mouseY-15, 190, 400, 130, 400); quad(mouseX-15, mouseY-15, 120, 400, 0, 400, 0, 290 ); triangle(mouseX-15, mouseY-15, 0, 270, 0, 130); quad(mouseX-15, mouseY-15, 0, 110, 0, 0, 120, 0); triangle(mouseX-15, mouseY-15, 130, 0, 190, 0); //Make Kal's eyes glow red (when mouse moves) ellipseMode(CORNER); fill(255, 0, 0); ellipse(mouseX+10, mouseY-20, 10, 10); ellipse(mouseX-20, mouseY-20, 10, 10); }