Plz Help!
in
Programming Questions
•
1 years ago
Hiya everyone!
So I'm currently taking a college computer science class and my professor is extremely bad at explaining things, and I have an project that is due by the end of the day today on processing and i have no clue how to do it
, I'm stressing out so bad omg. Can some one please help me create something in processing so i can pass my class? plzplzplzplz.xoxoxo.

He gave out directions but its like reading giberish!
This is the example he gave me:
Robot R1, R2, R3; color c1, c2, c3; void setup() { size(400, 400); c1 = color(#FA08EA); c2 = color(#12FA08); c3 = color(#0A08FA); R1 = new Robot(width/2, height/2, c1, c2, c3); R2 = new Robot(width/2-80, height/2+80, c3, c1, c2); R3 = new Robot(width/2+80, height/2-80, c2, c3, c1); } void draw() { background(#FAB608); R1.display(); R2.display(); R3.display(); rectMode(CENTER); noFill(); rect(width/2, height/2, 80, 140); rect(width/2-80, height/2+80, 80, 140); rect(width/2+80, height/2-80, 80, 140); } // definition of the Robot class class Robot { // variables (what a Robot is) float xPos; float yPos; color bodyColor; color headColor; color eyeColor; // constructor (build a Robot) Robot(float x, float y, color bc, color hc, color ec) { xPos = x; yPos = y; bodyColor = bc; headColor = hc; eyeColor = ec; } // function (what a Robot does) void display() { rectMode(CENTER); ellipseMode(CENTER); // draw body fill(bodyColor); rect(xPos, yPos, 20, 100); // draw head fill(headColor); ellipse(xPos, yPos-30, 60, 60); // draw eyes fill(eyeColor); ellipse(xPos-19, yPos-30, 16, 32); ellipse(xPos+19, yPos-30, 16, 32); // draw legs stroke(0); line(xPos-10, yPos+50, xPos-20, yPos+60); line(xPos+10, yPos+50, xPos+20, yPos+60); } }
And the direction are just:
Your Robot must be an original composition using the various shapes and colors available in Processing.
See Help → Reference for a listing of all shape and color commands, including those not yet discussed in
class. At minimum you must use 4 different shapes and 5 different colors (including the Robot member
variables bodyColor, headColor, and eyeColor.) Your Robot must fit within a rectangle centered at the
point (xPos, yPos) of width 80 and height 140 (pixels).
plzplzplz help a poor girl out!
1