Does anybody here have any experience with Processing.org?
My OO assignment is due by tonight and I've been busy with so many other papers I don't know what the fuck I'm doing.
pls help
We can't help you if you don't give us enough information.
>>59533071
Yes, used it for years.
>>59533113
This is the only instruction I have
Create a robot.
In your code make your robot into an object.
Put all of your object code into a class.
Put your new class in a separate tab.
When you create a robot with the robot object you should be able (at a minimum) to customize at least three attributes (characteristics) of the robot.
Create a display method and three other methods (functions) that apply to your robot.
Two of the methods also need to have parameters that are used to modify the behavior.
Be creative! #creative Create a story!
Include psuedocode at the top of your program. Include helpful comments throughout your code.
Include the standard comments at the top of your code (see course website for the standard format).
Zip your folder and attach your project to this dropbox.
>>59533158
What have you got so far?
>>59533158
This is the easiest task ever.
>>59533194
Using this as a base >http://learningprocessing.com/examples/chp08/example-08-03-zoogobject
I've got this in one tab
Nanite nanite;
void setup() {
size(480, 270);
nanite = new Nanite(width/2, height/2);
}
void draw() {
background(#EA2626);
// mouseX position determines speed factor
float factor = constrain(mouseX/10, 0, 5);
//nanite.jiggle(factor);
nanite.display();
}
>>59533239
>>59533194
And this in another
class Nanite {
// Nanite's variables
float x, y, w, h;
// Nanite constructor
Nanite(float tempX, float tempY, float tempW, float tempH) {
x = tempX;
y = tempY;
w = tempW;
h = tempH;
}
// Move Nanite
void jiggle(float speed) {
// Change the location of Nanite randomly
x = x + random(-1, 1)*speed;
y = y + random(-1, 1)*speed;
// Constrain Nanite to window
x = constrain(x, 0, width);
y = constrain(y, 0, height);
}
// Display Nanite
void display() {
// Set ellipses and rects to CENTER mode
translate(x, y);
ellipseMode(CENTER);
rectMode(CENTER);
// Bottom
fill(180);
noStroke();
ellipse(205, 270, 40, 40);
// Nanite Attena
stroke(250, 250, 0);
strokeWeight(2);
line(233, 75, 233, 95);
noStroke();
fill(25, 200, 100);
rect(190, 110, 55, 30);
rect(228, 95, 10, 30);
triangle(245, 140, 220, 160, 200, 140);
// Nanite Head
noStroke();
fill(255);
beginShape();
vertex(180, 100);
vertex(200, 100);
vertex(230, 135);
vertex(230, 270);
vertex(180, 270);
endShape();
// Nanite Eye
fill(0);
ellipse(200, 150, 25, 25);
fill(255, 0, 0);
ellipse(212, 130, 5, 5);
ellipse(200, 150, 8, 8);
// Nanite Mouth
stroke(0);
strokeWeight(2);
line(220, 180, 220, 200);
line(225, 180, 225, 200);
line(215, 180, 215, 200);
// Nanite Sensor
fill(0);
ellipse(210, 250, 10, 10);
// Nanite Screws
noStroke();
fill(110);
ellipse(184, 104, 3, 3);
ellipse(199, 104, 3, 3);
ellipse(226, 136, 3, 3);
ellipse(184, 266, 3, 3);
ellipse(226, 266, 3, 3);
// Nanite Scanner
fill(190);
rect(150, 200, 30, 20);
fill(255);
rect(150, 220, 30, 10);
fill(0, 50, 50);
rect(155, 205, 20, 10);
strokeWeight(1);
stroke(255);
point(160, 208);
line(164, 208, 170, 208);
line(158, 212, 167, 212);
}
}
>>59533194
I got errors everywhere and the tutor I'm with cant see whats wrong going through it. I sure as hell don't know what I'm doing either. I just want to pass this class and I can actually go back and learn it this summer.
Got it. I understand it, but actually writing code kills me.