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