11 {
12 auto *e = ctx.mEngine.get();
13 e->get_ready();
14
15 e->timings.master_speed = 0.0015;
16 e->timings.ratio[0] = 1.5;
17 e->timings.ratio[1] = 2.3;
18 e->timings.ratio[2] = 3;
19 e->timings.ratio[3] = 0.05;
20 e->timings.ratio[4] = 0.2;
21 e->timings.ratio[5] = 0.05;
22 e->timings.ratio[6] = 0.055;
23 e->timings.ratio[7] = 0.06;
24 e->timings.ratio[8] = 0.027;
25 e->timings.offset[0] = 0;
26 e->timings.offset[1] = 100;
27 e->timings.offset[2] = 200;
28 e->timings.offset[3] = 300;
29 e->timings.offset[4] = 400;
30 e->timings.offset[5] = 500;
31 e->timings.offset[6] = 600;
32
33 e->calculate_oscillators(e->timings);
34
35 for (
int x = 0;
x < e->num_x;
x++) {
36 for (
int y = 0;
y < e->num_y;
y++) {
37 e->animation.dist = e->distance[
x][
y];
38 e->animation.angle = 5 * e->polar_theta[
x][
y] + e->move.noise_angle[5] +
39 e->move.directional[3] * e->move.noise_angle[6] *
40 e->animation.dist / 10;
41 e->animation.scale_x = 0.08;
42 e->animation.scale_y = 0.08;
43 e->animation.scale_z = 0.02;
44 e->animation.offset_y = -e->move.linear[0];
45 e->animation.offset_x = 0;
46 e->animation.offset_z = 0;
47 e->animation.z = e->move.linear[1];
48 float show1 = e->render_value(e->animation);
49
50 e->animation.angle = 6 * e->polar_theta[
x][
y] + e->move.noise_angle[7] +
51 e->move.directional[5] * e->move.noise_angle[8] *
52 e->animation.dist / 10;
53 e->animation.offset_y = -e->move.linear[1];
54 e->animation.z = e->move.linear[2];
55 float show2 = e->render_value(e->animation);
56
57 e->animation.angle = 6 * e->polar_theta[
x][
y] + e->move.noise_angle[6] +
58 e->move.directional[6] * e->move.noise_angle[7] *
59 e->animation.dist / 10;
60 e->animation.offset_y = e->move.linear[2];
61 e->animation.z = e->move.linear[0];
62 e->animation.dist = e->distance[
x][
y] * 0.8;
63 float show3 = e->render_value(e->animation);
64
65 float f = 1;
66
67 e->pixel.red = f * (show1 + show2);
68 e->pixel.green = f * (show1 - show2);
69 e->pixel.blue = f * (show3 - show1);
70
71 e->pixel = e->rgb_sanity_check(e->pixel);
72 e->setPixelColorInternal(
x,
y, e->pixel);
73 }
74 }
75}