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