Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int speedDrop = 5;
- float fpsDrop = 0.08;
- int spacingDrop = 10;
- int particlesDrop = 6;
- float rowDelayDrop = 0.50;
- int id(int row, int col) {
- return col + 90*row;
- }
- for (float i = 0; i < 6.0; i += fpsDrop) {
- int position[particlesDrop];
- for (int k = 0; k < 4; k++) {
- for (int j = 0; j < particlesDrop; j++) {
- position[j] = (int) ((89-(j*spacingDrop))*(i-rowDelayDrop*k) - ((22.25-(j*1.25)) * (i-rowDelayDrop*k)*(i-rowDelayDrop*k)));
- if (position[j] > 0 && position[j]) {
- leds[id(k, position[j])] = CRGB((int) 150.0 *((float) j/(float) particlesDrop), (int) 150.0 *((float) j/(float) particlesDrop), 255);
- }
- }
- }
- FastLED.show();
- delay(speedDrop);
- FastLED.clear();
Advertisement
Add Comment
Please, Sign In to add comment