12 {
13 auto *e = ctx.mEngine.get();
14 e->get_ready();
15
16
17
18
19 static constexpr float perlin_period = 3657.14285714f;
20
21 e->timings.master_speed = 0.01;
22 e->timings.ratio[0] = 1;
23 e->timings.ratio[1] = 1.1;
24 e->timings.ratio[2] = 1.2;
25
26 e->timings.offset[1] = 100;
27 e->timings.offset[2] = 200;
28 e->timings.offset[3] = 300;
29
30 e->calculate_oscillators(e->timings);
31
32 for (
int x = 0;
x < e->num_x;
x++) {
33 for (
int y = 0;
y < e->num_y;
y++) {
34 e->animation.angle = e->polar_theta[
x][
y];
35 e->animation.scale_x = 0.07;
36 e->animation.scale_y = 0.07;
37 e->animation.scale_z = 0.1;
38 e->animation.dist = 5 *
fl::sqrtf(e->distance[
x][
y]);
39 e->animation.offset_y =
fl::fmodf(e->move.linear[0], perlin_period);
40 e->animation.offset_x = 0;
41 e->animation.z = 0;
42 float show1 = e->render_value(e->animation);
43
44 e->animation.angle = e->polar_theta[
x][
y];
45 e->animation.scale_x = 0.07;
46 e->animation.scale_y = 0.07;
47 e->animation.scale_z = 0.1;
48 e->animation.dist = 4 *
fl::sqrtf(e->distance[
x][
y]);
49 e->animation.offset_y =
fl::fmodf(e->move.linear[0], perlin_period);
50 e->animation.offset_x = 0;
51 e->animation.z = 0;
52 float show2 = e->render_value(e->animation);
53
54 e->pixel.red = show1;
55 e->pixel.green = show2;
56 e->pixel.blue = 0;
57
58 e->pixel = e->rgb_sanity_check(e->pixel);
59 e->setPixelColorInternal(
x,
y, e->pixel);
60 }
61 }
62}
float sqrtf(float value) FL_NO_EXCEPT
float fmodf(float x, float y) FL_NO_EXCEPT