Thanks for the help! This time I'm struggling building a Plant class. As I need 4 of these plants, a Plant class would help. This is the mock-up of what I want, without using class and objects:
Quote:PFont f;
float time = 0.0;
float increment = 0.01;
int fs = 16;
void setup()
{
size(500,500);
}
void draw() {
background(255);
float xn = 1;
float s = noise(time)*100;
f = loadFont("Webdings-48.vlw");
textFont(f, fs);
noiseDetail(1,0.1);
float n = noise(time)* width;
println(n);
float m = noise(time*1.2)* width;
float o = noise(time*0.9)*width;
time += increment;
strokeWeight(2);
bezier( 250, 500, n, 500, 200, 20, n, m/3+100);
fill(255);
ellipse(n , m/3+100, s, s);
fill(0);
text("alkopop", n + 30, m/3+105);
noFill();
bezier( 350, 500, m, 500, 300, 150, m, 300);
fill(255);
ellipse(m,300,s/1.5,s/1.5);
fill(0);
text("menu", m + 20, 305);
noFill();
bezier( 390, 500, o, 500, 370, 10, o, 100);
fill(255);
ellipse(o,100,s/2,s/2);
fill(0);
text("portfolio", o + 30, 105);
smooth();
noFill();
}
What I don't understand, is how to write a class in a separate tab? And do I need this? Which parameters should I include in the class? I'm a bit confused with the whole class-object thing, not even the brilliant Dan Shiffman-book could answer my questions (still a brilliant book!). Thanks for your help!