Google Particle Doodle in Processing
in
Programming Questions
•
2 years ago
Hey,
I just looked at this Google Doodles and thought of making this nice particle effect in Processing.
I set up a grid of ellipses and now want to create this particle effect while the mouse "flows" over the ellipses. So as soon as the mouse comes closer to an ellipse this one has to grow in size and other ellipses around have to go back to their normal size.
I'm not sure whether this is the right way, so to put all my code in the "draw". Or do I have to work with arrays to address each ellipse individually when the mouse comes closer? Thanks for your help in advance!!!
- int ellipseSize = 15;
- void setup() {
- size (800,600);
- noStroke();
- fill (30,200,200);
- smooth();
- }
- void draw() {
- background (255);
- for (int i = 0; i<width+ellipseSize; i+=20) {
- for (int j = 0; j<height+ellipseSize; j+=20) {
- ellipse (i,j,ellipseSize,ellipseSize);
- }
- }
- }
1