Ideas for my project?
in
Programming Questions
•
1 year ago
Ok! I thought a project would be a great way to "get into" processing a little further than I had before.
So my goal this time around is to get processing to generate a finite number of circles, each with it's own identity. The circles should be generated slowly over the course of say 30 seconds, and grow into place instead of appear. Once grown the circles should move about freely until I decide to kill them with a mouse click or something. The ultimate goal is for (using some kind audio library) a singer to be able to kill them off using amplitude / pitch triggers (this part I can manage pretty well in an outside audio application).
So here's how far I've gotten:
void setup(){
size(1200,650);
background(20);
frameRate = 30;
}
void draw(){
for(int i=0; i<2; i++){
fill(0,201,87);
ellipse(random(1200), random(650), 55, 55);
}
}
This generates an infinite number of circles without giving them any kind of individual identity. If I wanted animate any of the generated circles, or destroy them I'm not sure how I'd go about doing it. Now I suspect the answer to my question lies in making a class, but I'm not sure how you'd generate objects and still let them have a unique identity.
Any advice for the newbie?
So my goal this time around is to get processing to generate a finite number of circles, each with it's own identity. The circles should be generated slowly over the course of say 30 seconds, and grow into place instead of appear. Once grown the circles should move about freely until I decide to kill them with a mouse click or something. The ultimate goal is for (using some kind audio library) a singer to be able to kill them off using amplitude / pitch triggers (this part I can manage pretty well in an outside audio application).
So here's how far I've gotten:
void setup(){
size(1200,650);
background(20);
frameRate = 30;
}
void draw(){
for(int i=0; i<2; i++){
fill(0,201,87);
ellipse(random(1200), random(650), 55, 55);
}
}
This generates an infinite number of circles without giving them any kind of individual identity. If I wanted animate any of the generated circles, or destroy them I'm not sure how I'd go about doing it. Now I suspect the answer to my question lies in making a class, but I'm not sure how you'd generate objects and still let them have a unique identity.
Any advice for the newbie?
1