processing 3

Solutions on MaxInterview for processing 3 by the best coders in the world

showing results for - "processing 3"
Maximilian
10 Mar 2016
1void setup() {
2  size(1200, 900);
3  background(0);
4}
5
6void draw() {
7  translate(width/2, height/2);
8  float mag = 400;
9  float s = 15;
10  noStroke();
11  for (int i = 0; i < 100; i++) {
12    float w = map(sin(radians(frameCount)), -1, 1, -100, 100);
13    float wave1 = map(tan(radians(frameCount * 0.8 + i + w)), -1, 1, -100, 100);
14    float wave2 = map(tan(radians(frameCount + i)), -1, 1, -mag, mag);
15    float c = map(sin(radians(frameCount * 5 + i)), -1, 1, 0, 255);
16    fill(c);
17    rect(wave1, wave2, s, s);
18  }
19}copy