Hi,
I hope someone can help me understand functions. I am learning programming processing and I have a project that I been working on. In the end I hope to use minim to put in an mp3 file as this animation plays. For now I am having trouble understanding how functions work. I have been following the book but seem to have hit a rut. here is the code that I want to use functions on:
int rMax= int(random(90,100));
int gMax= int(random(60,95));
int bMax= int(random(100,110));
int aMax= int(random(80,90));
int r = int(random(rMax));
int g = int(random(gMax));
int b = int(random(bMax));
int a = int(random(aMax));
int circleX = int(random(425,475));
int circleY = int(random(100));
int circleSize=0;
Once I understand how functions work I hope to make this into an object oriented program. Finally I would want to use minim to put in an mp3 file to start simultaneously.
Thanks so much for your help... This finals will be the death of me without you lol
I am working on catching up for my midterm but I am not finding what I want to do in the book.
Could someone help me put these two programs together?
what I want is to start with circle_expanding then have the draw_random_circles program draw for a while until a pattern is discerned or until a high fameCount is reached.
Then I want the expanding circles to start again and the whole thing to keep repeating
The part I am least sure about is how to define this value and how to join the programs together.
}
color randomColor(int rMax, int gMax, int bMax, int aMax){
int r = int(random(rMax));
int g = int(random(gMax));
int b = int(random(bMax));
int a = int(random(aMax));
return color(r,g,b,a);
}
color randomColor(int rMax, int gMax, int bMax){
int r = int(random(rMax));
int g = int(random(gMax));
int b = int(random(bMax));
return color(r,g,b);
}