We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi, A very basic question here. I am totally new to this. I have 3 dots, Red,Yellow,Blue. I simply want to make them fade in and out independent of each other and at random intervals. Would be also nice to shift saturation as another fading elements in each. How do I do this? Here are the dots I made. void setup() { size(1200,800); background(0); }
void draw() { stroke(255,3,5,127); fill(255,3,5,40); ellipse(300,400,200,200);
stroke(250,251,5,127); fill(250,251,5,40); ellipse(600,400,200,200);
stroke(0,0,255,127); fill(0,0,255,40); ellipse(900,400,200,200); }
Answers
You should define a Dot class in order to have 3 independent dots w/ their own properties.
http://processing.org/reference/class.html
And of course, store those 3 object references in an array:
http://processing.org/reference/Array.html
An online example which just does those:
http://studio.processingtogether.com/sp/pad/export/ro.9FqnMDLUZqQCV/latest
Thank you GoToLoop. Likely way over my head here but that gives me more to tinker with and learn.