153 float speed_factor = 1;
155 float radial_filter_radius = 23.0;
169 unsigned long a, b, c;
171 float show1, show2, show3, show4, show5, show6, show7, show8, show9, show0;
175 ANIMartRIX(
int w,
int h) { this->init(w, h); }
179 virtual uint16_t xyMap(uint16_t x, uint16_t y) = 0;
181 uint32_t currentTime = 0;
182 void setTime(uint32_t t) { currentTime = t; }
183 uint32_t getTime() {
return currentTime ? currentTime : millis(); }
186 void init(
int w,
int h) {
195 this->radial_filter_radius = 11;
197 this->radial_filter_radius = 23;
199 render_polar_lookup_table(
204 timings.master_speed = 0.01;
216 float subtract(
float &a,
float &b) {
return a - b; }
218 float multiply(
float &a,
float &b) {
return a * b / 255.f; }
223 float colorburn(
float &a,
float &b) {
225 return (1 - ((1 - a / 255.f) / (b / 255.f))) * 255.f;
230 float add(
float &a,
float &b) {
return a + b; }
234 float screen(
float &a,
float &b) {
236 return (1 - (1 - a / 255.f) * (1 - b / 255.f)) * 255.f;
239 float colordodge(
float &a,
float &b) {
return (a / (255.f - b)) * 255.f; }
247 float fade(
float t) {
return t * t * t * (t * (t * 6 - 15) + 10); }
248 float lerp(
float t,
float a,
float b) {
return a + t * (b - a); }
249 float grad(
int hash,
float x,
float y,
float z) {
251 float u = h < 8 ? x : y,
253 : h == 12 || h == 14 ? x
255 return ((h & 1) == 0 ? u : -u) + ((h & 2) == 0 ? v : -v);
259 float pnoise(
float x,
float y,
float z) {
261 int X = (int)floorf(x) & 255,
262 Y = (int)floorf(y) & 255,
263 Z = (int)floorf(z) & 255;
270 int A =
P(X) + Y, AA =
P(A) + Z,
272 B =
P(X + 1) + Y, BA =
P(B) + Z,
277 lerp(u, grad(
P(AA), x, y, z),
278 grad(
P(BA), x - 1, y, z)),
279 lerp(u, grad(
P(AB), x, y - 1, z),
280 grad(
P(BB), x - 1, y - 1, z))),
282 lerp(u, grad(
P(AA + 1), x, y, z - 1),
283 grad(
P(BA + 1), x - 1, y, z - 1)),
284 lerp(u, grad(
P(AB + 1), x, y - 1, z - 1),
285 grad(
P(BB + 1), x - 1, y - 1, z - 1))));
288 void calculate_oscillators(oscillators &timings) {
290 double runtime = getTime() * timings.master_speed *
293 for (
int i = 0; i < num_oscillators; i++) {
296 (runtime + timings.offset[i]) *
300 move.radial[i] = fmodf(move.linear[i],
304 move.directional[i] =
305 sinf(move.radial[i]);
308 move.noise_angle[i] =
311 pnoise(move.linear[i], 0,
316 void run_default_oscillators(
float master_speed = 0.005) {
317 timings.master_speed = master_speed;
319 timings.ratio[0] = 1;
321 timings.ratio[1] = 2;
322 timings.ratio[2] = 3;
323 timings.ratio[3] = 4;
324 timings.ratio[4] = 5;
325 timings.ratio[5] = 6;
326 timings.ratio[6] = 7;
327 timings.ratio[7] = 8;
328 timings.ratio[8] = 9;
329 timings.ratio[9] = 10;
331 timings.offset[0] = 000;
332 timings.offset[1] = 100;
333 timings.offset[2] = 200;
334 timings.offset[3] = 300;
335 timings.offset[4] = 400;
336 timings.offset[5] = 500;
337 timings.offset[6] = 600;
338 timings.offset[7] = 700;
339 timings.offset[8] = 800;
340 timings.offset[9] = 900;
342 calculate_oscillators(timings);
349 float render_value(render_parameters &animation) {
353 float newx = (animation.offset_x + animation.center_x -
354 (cosf(animation.angle) * animation.dist)) *
356 float newy = (animation.offset_y + animation.center_y -
357 (sinf(animation.angle) * animation.dist)) *
359 float newz = (animation.offset_z + animation.z) * animation.scale_z;
363 float raw_noise_field_value = pnoise(newx, newy, newz);
370 if (raw_noise_field_value < animation.low_limit)
371 raw_noise_field_value = animation.low_limit;
372 if (raw_noise_field_value > animation.high_limit)
373 raw_noise_field_value = animation.high_limit;
375 float scaled_noise_value =
376 map_float(raw_noise_field_value, animation.low_limit,
377 animation.high_limit, 0, 255);
379 return scaled_noise_value;
385 void render_polar_lookup_table(
float cx,
float cy) {
389 for (
int xx = 0; xx < num_x; xx++) {
390 for (
int yy = 0; yy < num_y; yy++) {
395 distance[xx][yy] = hypotf(dx, dy);
396 polar_theta[xx][yy] = atan2f(dy, dx);
404 float map_float(
float x,
float in_min,
float in_max,
float out_min,
408 (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
409 if (result < out_min)
411 if (result > out_max)
436 rgb rgb_sanity_check(rgb &pixel) {
454 if (pixel.green > 255)
456 if (pixel.blue > 255)
469 virtual void setPixelColorInternal(
int x,
int y, rgb pixel) = 0;
473 void logOutput() { b = micros(); }
475 void logFrame() { c = micros(); }
481 void report_performance() {
486 int fps = 1000000 / total;
487 int kpps = (fps * num_x * num_y) / 1000;
489 ANIMARTRIX_PRINT(fps);
490 ANIMARTRIX_PRINT(
" fps ");
491 ANIMARTRIX_PRINT(kpps);
492 ANIMARTRIX_PRINT(
" kpps @");
493 ANIMARTRIX_PRINT(num_x * num_y);
494 ANIMARTRIX_PRINT(
" LEDs ");
495 ANIMARTRIX_PRINT(round(total));
496 ANIMARTRIX_PRINT(
" µs per frame waiting: ");
497 ANIMARTRIX_PRINT(round((calc * 100) / total));
498 ANIMARTRIX_PRINT(
"% rendering: ");
499 ANIMARTRIX_PRINT(round((push * 100) / total));
500 ANIMARTRIX_PRINT(
"% (");
501 ANIMARTRIX_PRINT(round(calc));
502 ANIMARTRIX_PRINT(
" + ");
503 ANIMARTRIX_PRINT(round(push));
504 ANIMARTRIX_PRINT(
" µs) Core-temp: ");
507 ANIMARTRIX_PRINT(
" °C\n");
512 void Rotating_Blob() {
516 timings.master_speed = 0.01;
517 timings.ratio[0] = 0.1;
518 timings.ratio[1] = 0.03;
519 timings.ratio[2] = 0.03;
520 timings.ratio[3] = 0.03;
522 timings.offset[1] = 10;
523 timings.offset[2] = 20;
524 timings.offset[3] = 30;
526 calculate_oscillators(
529 for (
int x = 0; x < num_x; x++) {
530 for (
int y = 0; y < num_y; y++) {
533 animation.scale_x = 0.05;
534 animation.scale_y = 0.05;
535 animation.offset_x = 0;
536 animation.offset_y = 0;
537 animation.offset_z = 100;
538 animation.angle = polar_theta[x][y] + move.radial[0];
539 animation.dist = distance[x][y];
540 animation.z = move.linear[0];
541 animation.low_limit = -1;
542 float show1 = render_value(animation);
545 polar_theta[x][y] - move.radial[1] + show1 / 512.0;
546 animation.dist = distance[x][y] * show1 / 255.0;
547 animation.low_limit = 0;
548 animation.z = move.linear[1];
549 float show2 = render_value(animation);
552 polar_theta[x][y] - move.radial[2] + show1 / 512.0;
553 animation.dist = distance[x][y] * show1 / 220.0;
554 animation.z = move.linear[2];
555 float show3 = render_value(animation);
558 polar_theta[x][y] - move.radial[3] + show1 / 512.0;
559 animation.dist = distance[x][y] * show1 / 200.0;
560 animation.z = move.linear[3];
561 float show4 = render_value(animation);
564 pixel.red = (show2 + show4) / 2;
565 pixel.green = show3 / 6;
568 pixel = rgb_sanity_check(pixel);
570 setPixelColorInternal(x, y, pixel);
575 void Chasing_Spirals() {
579 timings.master_speed = 0.01;
580 timings.ratio[0] = 0.1;
581 timings.ratio[1] = 0.13;
582 timings.ratio[2] = 0.16;
584 timings.offset[1] = 10;
585 timings.offset[2] = 20;
586 timings.offset[3] = 30;
588 calculate_oscillators(
591 for (
int x = 0; x < num_x; x++) {
592 for (
int y = 0; y < num_y; y++) {
596 3 * polar_theta[x][y] + move.radial[0] - distance[x][y] / 3;
597 animation.dist = distance[x][y];
598 animation.scale_z = 0.1;
599 animation.scale_y = 0.1;
600 animation.scale_x = 0.1;
601 animation.offset_x = move.linear[0];
602 animation.offset_y = 0;
603 animation.offset_z = 0;
605 float show1 = render_value(animation);
608 3 * polar_theta[x][y] + move.radial[1] - distance[x][y] / 3;
609 animation.dist = distance[x][y];
610 animation.offset_x = move.linear[1];
611 float show2 = render_value(animation);
614 3 * polar_theta[x][y] + move.radial[2] - distance[x][y] / 3;
615 animation.dist = distance[x][y];
616 animation.offset_x = move.linear[2];
617 float show3 = render_value(animation);
620 float radius = radial_filter_radius;
621 float radial_filter = (radius - distance[x][y]) / radius;
623 pixel.red = 3 * show1 * radial_filter;
624 pixel.green = show2 * radial_filter / 2;
625 pixel.blue = show3 * radial_filter / 4;
627 pixel = rgb_sanity_check(pixel);
629 setPixelColorInternal(x, y, pixel);
638 timings.master_speed = 0.01;
639 timings.ratio[0] = 1;
640 timings.ratio[1] = 1.1;
641 timings.ratio[2] = 1.2;
643 timings.offset[1] = 100;
644 timings.offset[2] = 200;
645 timings.offset[3] = 300;
647 calculate_oscillators(
650 for (
int x = 0; x < num_x; x++) {
651 for (
int y = 0; y < num_y; y++) {
655 animation.scale_x = 0.2;
656 animation.scale_y = 0.2;
657 animation.scale_z = 1;
658 animation.dist = distance[x][y];
659 animation.offset_y = -move.linear[0];
660 animation.offset_x = 0;
661 float show1 = render_value(animation);
664 animation.angle = 10;
666 animation.dist = distance[x][y];
667 animation.offset_y = -move.linear[1];
668 float show2 = render_value(animation);
671 animation.angle = 12;
673 animation.dist = distance[x][y];
674 animation.offset_y = -move.linear[2];
675 float show3 = render_value(animation);
679 pixel.green = show2 / 4;
680 pixel.blue = show3 / 4;
682 pixel = rgb_sanity_check(pixel);
684 setPixelColorInternal(x, y, pixel);
693 timings.master_speed = 0.01;
694 timings.ratio[0] = 2;
695 timings.ratio[1] = 2.1;
696 timings.ratio[2] = 1.2;
698 timings.offset[1] = 100;
699 timings.offset[2] = 200;
700 timings.offset[3] = 300;
702 calculate_oscillators(
705 for (
int x = 0; x < num_x; x++) {
706 for (
int y = 0; y < num_y; y++) {
709 animation.angle = polar_theta[x][y];
710 animation.scale_x = 0.1;
711 animation.scale_y = 0.1;
712 animation.scale_z = 0.1;
713 animation.dist = distance[x][y];
714 animation.offset_y = 0;
715 animation.offset_x = 0;
716 animation.z = 2 * distance[x][y] - move.linear[0];
717 float show1 = render_value(animation);
719 animation.angle = polar_theta[x][y];
720 animation.dist = distance[x][y];
721 animation.z = 2 * distance[x][y] - move.linear[1];
722 float show2 = render_value(animation);
729 pixel = rgb_sanity_check(pixel);
731 setPixelColorInternal(x, y, pixel);
736 void Center_Field() {
740 timings.master_speed = 0.01;
741 timings.ratio[0] = 1;
742 timings.ratio[1] = 1.1;
743 timings.ratio[2] = 1.2;
745 timings.offset[1] = 100;
746 timings.offset[2] = 200;
747 timings.offset[3] = 300;
749 calculate_oscillators(
752 for (
int x = 0; x < num_x; x++) {
753 for (
int y = 0; y < num_y; y++) {
756 animation.angle = polar_theta[x][y];
757 animation.scale_x = 0.07;
758 animation.scale_y = 0.07;
759 animation.scale_z = 0.1;
760 animation.dist = 5 * sqrtf(distance[x][y]);
761 animation.offset_y = move.linear[0];
762 animation.offset_x = 0;
764 float show1 = render_value(animation);
766 animation.angle = polar_theta[x][y];
767 animation.scale_x = 0.07;
768 animation.scale_y = 0.07;
769 animation.scale_z = 0.1;
770 animation.dist = 4 * sqrtf(distance[x][y]);
771 animation.offset_y = move.linear[0];
772 animation.offset_x = 0;
774 float show2 = render_value(animation);
781 pixel = rgb_sanity_check(pixel);
783 setPixelColorInternal(x, y, pixel);
788 void Distance_Experiment() {
792 timings.master_speed = 0.01;
793 timings.ratio[0] = 0.2;
794 timings.ratio[1] = 0.13;
795 timings.ratio[2] = 0.012;
797 timings.offset[1] = 100;
798 timings.offset[2] = 200;
799 timings.offset[3] = 300;
801 calculate_oscillators(
804 for (
int x = 0; x < num_x; x++) {
805 for (
int y = 0; y < num_y; y++) {
808 animation.dist = powf(distance[x][y], 0.5);
809 animation.angle = polar_theta[x][y] + move.radial[0];
810 animation.scale_x = 0.07;
811 animation.scale_y = 0.07;
812 animation.scale_z = 0.1;
813 animation.offset_y = move.linear[0];
814 animation.offset_x = 0;
815 animation.offset_z = 0;
817 float show1 = render_value(animation);
819 animation.dist = powf(distance[x][y], 0.6);
820 animation.angle = polar_theta[x][y] + move.noise_angle[2];
821 animation.scale_x = 0.07;
822 animation.scale_y = 0.07;
823 animation.scale_z = 0.1;
824 animation.offset_y = move.linear[1];
825 animation.offset_x = 0;
826 animation.offset_z = 0;
828 float show2 = render_value(animation);
831 pixel.red = show1 + show2;
835 pixel = rgb_sanity_check(pixel);
837 setPixelColorInternal(x, y, pixel);
846 timings.master_speed = 0.003;
847 timings.ratio[0] = 0.02;
848 timings.ratio[1] = 0.03;
849 timings.ratio[2] = 0.04;
850 timings.ratio[3] = 0.05;
851 timings.ratio[4] = 0.6;
852 timings.offset[0] = 0;
853 timings.offset[1] = 100;
854 timings.offset[2] = 200;
855 timings.offset[3] = 300;
856 timings.offset[4] = 400;
858 calculate_oscillators(
861 for (
int x = 0; x < num_x; x++) {
862 for (
int y = 0; y < num_y; y++) {
865 animation.dist = distance[x][y] * (2 + move.directional[0]) / 3;
866 animation.angle = 3 * polar_theta[x][y] +
867 3 * move.noise_angle[0] + move.radial[4];
868 animation.scale_x = 0.1;
869 animation.scale_y = 0.1;
870 animation.scale_z = 0.1;
871 animation.offset_y = 2 * move.linear[0];
872 animation.offset_x = 0;
873 animation.offset_z = 0;
874 animation.z = move.linear[0];
875 float show1 = render_value(animation);
877 animation.dist = distance[x][y] * (2 + move.directional[1]) / 3;
878 animation.angle = 4 * polar_theta[x][y] +
879 3 * move.noise_angle[1] + move.radial[4];
880 animation.offset_x = 2 * move.linear[1];
881 animation.z = move.linear[1];
882 float show2 = render_value(animation);
884 animation.dist = distance[x][y] * (2 + move.directional[2]) / 3;
885 animation.angle = 5 * polar_theta[x][y] +
886 3 * move.noise_angle[2] + move.radial[4];
887 animation.offset_y = 2 * move.linear[2];
888 animation.z = move.linear[2];
889 float show3 = render_value(animation);
891 animation.dist = distance[x][y] * (2 + move.directional[3]) / 3;
892 animation.angle = 4 * polar_theta[x][y] +
893 3 * move.noise_angle[3] + move.radial[4];
894 animation.offset_x = 2 * move.linear[3];
895 animation.z = move.linear[3];
896 float show4 = render_value(animation);
900 pixel.green = show3 * distance[x][y] / 10;
901 pixel.blue = (show2 + show4) / 2;
903 pixel = rgb_sanity_check(pixel);
905 setPixelColorInternal(x, y, pixel);
914 timings.master_speed = 0.002;
915 timings.ratio[0] = 0.02;
916 timings.ratio[1] = 0.03;
917 timings.ratio[2] = 0.04;
918 timings.ratio[3] = 0.05;
919 timings.ratio[4] = 0.6;
920 timings.offset[0] = 0;
921 timings.offset[1] = 100;
922 timings.offset[2] = 200;
923 timings.offset[3] = 300;
924 timings.offset[4] = 400;
926 calculate_oscillators(
929 for (
int x = 0; x < num_x; x++) {
930 for (
int y = 0; y < num_y; y++) {
933 animation.dist = distance[x][y] * (2 + move.directional[0]) / 3;
934 animation.angle = 2 * polar_theta[x][y] +
935 3 * move.noise_angle[0] + move.radial[4];
936 animation.scale_x = 0.1;
937 animation.scale_y = 0.1;
938 animation.scale_z = 0.1;
939 animation.offset_y = 2 * move.linear[0];
940 animation.offset_x = 0;
941 animation.offset_z = 0;
942 animation.z = move.linear[0];
943 float show1 = render_value(animation);
945 animation.dist = distance[x][y] * (2 + move.directional[1]) / 3;
946 animation.angle = 2 * polar_theta[x][y] +
947 3 * move.noise_angle[1] + move.radial[4];
948 animation.offset_x = 2 * move.linear[1];
949 animation.z = move.linear[1];
950 float show2 = render_value(animation);
952 animation.dist = distance[x][y] * (2 + move.directional[2]) / 3;
953 animation.angle = 2 * polar_theta[x][y] +
954 3 * move.noise_angle[2] + move.radial[4];
955 animation.offset_y = 2 * move.linear[2];
956 animation.z = move.linear[2];
957 float show3 = render_value(animation);
959 animation.dist = distance[x][y] * (2 + move.directional[3]) / 3;
960 animation.angle = 2 * polar_theta[x][y] +
961 3 * move.noise_angle[3] + move.radial[4];
962 animation.offset_x = 2 * move.linear[3];
963 animation.z = move.linear[3];
964 float show4 = render_value(animation);
968 pixel.green = show3 * distance[x][y] / 10;
969 pixel.blue = (show2 + show4) / 2;
971 pixel = rgb_sanity_check(pixel);
973 setPixelColorInternal(x, y, pixel);
982 timings.master_speed = 0.004;
983 timings.ratio[0] = 0.02;
984 timings.ratio[1] = 0.03;
985 timings.ratio[2] = 0.04;
986 timings.ratio[3] = 0.05;
987 timings.ratio[4] = 0.6;
988 timings.offset[0] = 0;
989 timings.offset[1] = 100;
990 timings.offset[2] = 200;
991 timings.offset[3] = 300;
992 timings.offset[4] = 400;
994 calculate_oscillators(
997 for (
int x = 0; x < num_x; x++) {
998 for (
int y = 0; y < num_y; y++) {
1001 animation.dist = distance[x][y] * (2 + move.directional[0]) / 3;
1002 animation.angle = 2 * polar_theta[x][y] +
1003 3 * move.noise_angle[0] + move.radial[4];
1004 animation.scale_x = 0.1;
1005 animation.scale_y = 0.1;
1006 animation.scale_z = 0.1;
1007 animation.offset_y = 2 * move.linear[0];
1008 animation.offset_x = 2 * move.linear[1];
1009 animation.offset_z = 0;
1010 animation.z = move.linear[0];
1011 float show1 = render_value(animation);
1013 animation.dist = distance[x][y] * (2 + move.directional[1]) / 3;
1014 animation.angle = 2 * polar_theta[x][y] +
1015 3 * move.noise_angle[1] + move.radial[4];
1016 animation.offset_x = 2 * move.linear[1];
1017 animation.offset_y = show1 / 20.0;
1018 animation.z = move.linear[1];
1019 float show2 = render_value(animation);
1021 animation.dist = distance[x][y] * (2 + move.directional[2]) / 3;
1022 animation.angle = 2 * polar_theta[x][y] +
1023 3 * move.noise_angle[2] + move.radial[4];
1024 animation.offset_y = 2 * move.linear[2];
1025 animation.offset_x = show2 / 20.0;
1026 animation.z = move.linear[2];
1027 float show3 = render_value(animation);
1029 animation.dist = distance[x][y] * (2 + move.directional[3]) / 3;
1030 animation.angle = 2 * polar_theta[x][y] +
1031 3 * move.noise_angle[3] + move.radial[4];
1032 animation.offset_x = 2 * move.linear[3];
1033 animation.offset_y = show3 / 20.0;
1034 animation.z = move.linear[3];
1035 float show4 = render_value(animation);
1038 float radius = radial_filter_radius;
1040 pixel.red = show1 * (y + 1) / num_y;
1041 pixel.green = show3 * distance[x][y] / 10;
1042 pixel.blue = (show2 + show4) / 2;
1043 if (distance[x][y] > radius) {
1049 pixel = rgb_sanity_check(pixel);
1051 setPixelColorInternal(x, y, pixel);
1060 timings.master_speed = 0.0015;
1061 timings.ratio[0] = 4;
1062 timings.ratio[1] = 1;
1063 timings.ratio[2] = 1;
1064 timings.ratio[3] = 0.05;
1065 timings.ratio[4] = 0.6;
1066 timings.offset[0] = 0;
1067 timings.offset[1] = 100;
1068 timings.offset[2] = 200;
1069 timings.offset[3] = 300;
1070 timings.offset[4] = 400;
1072 calculate_oscillators(
1075 for (
int x = 0; x < num_x; x++) {
1076 for (
int y = 0; y < num_y; y++) {
1079 animation.dist = distance[x][y] * 0.8;
1080 animation.angle = polar_theta[x][y];
1081 animation.scale_x = 0.15;
1082 animation.scale_y = 0.12;
1083 animation.scale_z = 0.01;
1084 animation.offset_y = -move.linear[0];
1085 animation.offset_x = 0;
1086 animation.offset_z = 0;
1088 float show1 = render_value(animation);
1090 animation.offset_y = -move.linear[1];
1091 animation.scale_x = 0.15;
1092 animation.scale_y = 0.12;
1093 animation.offset_x = show1 / 100;
1094 animation.offset_y += show1 / 100;
1096 float show2 = render_value(animation);
1098 animation.offset_y = -move.linear[2];
1099 animation.scale_x = 0.15;
1100 animation.scale_y = 0.12;
1101 animation.offset_x = show2 / 100;
1102 animation.offset_y += show2 / 100;
1104 float show3 = render_value(animation);
1107 float linear = (y) / (num_y - 1.f);
1109 pixel.red = linear * show2;
1110 pixel.green = 0.1 * linear * (show2 - show3);
1113 pixel = rgb_sanity_check(pixel);
1115 setPixelColorInternal(x, y, pixel);
1124 timings.master_speed = 0.000001;
1125 timings.ratio[0] = 0.4;
1126 timings.ratio[1] = 0.32;
1127 timings.ratio[2] = 0.10;
1128 timings.ratio[3] = 0.05;
1129 timings.ratio[4] = 0.6;
1130 timings.offset[0] = 0;
1131 timings.offset[1] = 100;
1132 timings.offset[2] = 200;
1133 timings.offset[3] = 300;
1134 timings.offset[4] = 400;
1136 calculate_oscillators(
1139 for (
int x = 0; x < num_x; x++) {
1140 for (
int y = 0; y < num_y; y++) {
1143 animation.dist = 0.3 * distance[x][y] * 0.8;
1144 animation.angle = 3 * polar_theta[x][y] + move.radial[2];
1145 animation.scale_x = 0.1 + (move.noise_angle[0]) / 10;
1147 0.1 + (move.noise_angle[1]) /
1149 animation.scale_z = 0.01;
1150 animation.offset_y = 0;
1151 animation.offset_x = 0;
1152 animation.offset_z = 100 * move.linear[0];
1154 float show1 = render_value(animation);
1156 animation.angle = 3;
1157 float show2 = render_value(animation);
1160 pixel.red = show1 * dist;
1161 pixel.green = (show1 - show2) * dist * 0.3;
1162 pixel.blue = (show2 - show1) * dist;
1164 if (distance[x][y] > 16) {
1170 pixel = rgb_sanity_check(pixel);
1172 setPixelColorInternal(y, x, pixel);
1183 timings.master_speed = 0.001;
1184 timings.ratio[0] = 3;
1185 timings.ratio[1] = 2;
1186 timings.ratio[2] = 1;
1187 timings.ratio[3] = 0.13;
1188 timings.ratio[4] = 0.15;
1189 timings.ratio[5] = 0.03;
1190 timings.ratio[6] = 0.025;
1191 timings.offset[0] = 0;
1192 timings.offset[1] = 100;
1193 timings.offset[2] = 200;
1194 timings.offset[3] = 300;
1195 timings.offset[4] = 400;
1196 timings.offset[5] = 500;
1197 timings.offset[6] = 600;
1199 calculate_oscillators(
1202 for (
int x = 0; x < num_x; x++) {
1203 for (
int y = 0; y < num_y; y++) {
1205 animation.dist = distance[x][y];
1207 polar_theta[x][y] + 2 * PI + move.noise_angle[5];
1208 animation.scale_x = 0.08;
1209 animation.scale_y = 0.08;
1210 animation.scale_z = 0.08;
1211 animation.offset_y = -move.linear[0];
1212 animation.offset_x = 0;
1213 animation.offset_z = 0;
1215 float show1 = render_value(animation);
1217 animation.dist = distance[x][y];
1219 polar_theta[x][y] + 2 * PI + move.noise_angle[6];
1221 animation.scale_x = 0.08;
1222 animation.scale_y = 0.08;
1223 animation.scale_z = 0.08;
1224 animation.offset_y = -move.linear[1];
1225 animation.offset_x = 0;
1226 animation.offset_z = 0;
1228 float show2 = render_value(animation);
1230 animation.angle = polar_theta[x][y] + show1 / 100 +
1231 move.noise_angle[3] + move.noise_angle[4];
1232 animation.dist = distance[x][y] + show2 / 50;
1233 animation.offset_y = -move.linear[2];
1235 animation.offset_y += show1 / 100;
1236 animation.offset_x += show2 / 100;
1238 float show3 = render_value(animation);
1240 animation.offset_y = 0;
1241 animation.offset_x = 0;
1243 float show4 = render_value(animation);
1246 pixel.green = show3 * show4 / 255;
1249 pixel = rgb_sanity_check(pixel);
1250 setPixelColorInternal(y, x, pixel);
1259 timings.master_speed = 0.0011;
1260 timings.ratio[0] = 1.5;
1261 timings.ratio[1] = 2.3;
1262 timings.ratio[2] = 3;
1263 timings.ratio[3] = 0.05;
1264 timings.ratio[4] = 0.2;
1265 timings.ratio[5] = 0.03;
1266 timings.ratio[6] = 0.025;
1267 timings.ratio[7] = 0.021;
1268 timings.ratio[8] = 0.027;
1269 timings.offset[0] = 0;
1270 timings.offset[1] = 100;
1271 timings.offset[2] = 200;
1272 timings.offset[3] = 300;
1273 timings.offset[4] = 400;
1274 timings.offset[5] = 500;
1275 timings.offset[6] = 600;
1277 calculate_oscillators(
1280 for (
int x = 0; x < num_x; x++) {
1281 for (
int y = 0; y < num_y; y++) {
1283 animation.dist = distance[x][y];
1284 animation.angle = 2 * polar_theta[x][y] + move.noise_angle[5] +
1285 move.directional[3] * move.noise_angle[6] *
1286 animation.dist / 10;
1287 animation.scale_x = 0.08;
1288 animation.scale_y = 0.08;
1289 animation.scale_z = 0.02;
1290 animation.offset_y = -move.linear[0];
1291 animation.offset_x = 0;
1292 animation.offset_z = 0;
1293 animation.z = move.linear[1];
1294 float show1 = render_value(animation);
1296 animation.angle = 2 * polar_theta[x][y] + move.noise_angle[7] +
1297 move.directional[5] * move.noise_angle[8] *
1298 animation.dist / 10;
1299 animation.offset_y = -move.linear[1];
1300 animation.z = move.linear[2];
1302 float show2 = render_value(animation);
1304 animation.angle = 2 * polar_theta[x][y] + move.noise_angle[6] +
1305 move.directional[6] * move.noise_angle[7] *
1306 animation.dist / 10;
1307 animation.offset_y = move.linear[2];
1308 animation.z = move.linear[0];
1309 float show3 = render_value(animation);
1313 pixel.red = f * (show1 + show2);
1314 pixel.green = f * (show1 - show2);
1315 pixel.blue = f * (show3 - show1);
1317 pixel = rgb_sanity_check(pixel);
1318 setPixelColorInternal(x, y, pixel);
1327 timings.master_speed = 0.0015;
1328 timings.ratio[0] = 1.5;
1329 timings.ratio[1] = 2.3;
1330 timings.ratio[2] = 3;
1331 timings.ratio[3] = 0.05;
1332 timings.ratio[4] = 0.2;
1333 timings.ratio[5] = 0.05;
1334 timings.ratio[6] = 0.055;
1335 timings.ratio[7] = 0.06;
1336 timings.ratio[8] = 0.027;
1337 timings.offset[0] = 0;
1338 timings.offset[1] = 100;
1339 timings.offset[2] = 200;
1340 timings.offset[3] = 300;
1341 timings.offset[4] = 400;
1342 timings.offset[5] = 500;
1343 timings.offset[6] = 600;
1345 calculate_oscillators(
1348 for (
int x = 0; x < num_x; x++) {
1349 for (
int y = 0; y < num_y; y++) {
1351 animation.dist = distance[x][y];
1352 animation.angle = 5 * polar_theta[x][y] + move.noise_angle[5] +
1353 move.directional[3] * move.noise_angle[6] *
1354 animation.dist / 10;
1355 animation.scale_x = 0.08;
1356 animation.scale_y = 0.08;
1357 animation.scale_z = 0.02;
1358 animation.offset_y = -move.linear[0];
1359 animation.offset_x = 0;
1360 animation.offset_z = 0;
1361 animation.z = move.linear[1];
1362 float show1 = render_value(animation);
1364 animation.angle = 6 * polar_theta[x][y] + move.noise_angle[7] +
1365 move.directional[5] * move.noise_angle[8] *
1366 animation.dist / 10;
1367 animation.offset_y = -move.linear[1];
1368 animation.z = move.linear[2];
1370 float show2 = render_value(animation);
1372 animation.angle = 6 * polar_theta[x][y] + move.noise_angle[6] +
1373 move.directional[6] * move.noise_angle[7] *
1374 animation.dist / 10;
1375 animation.offset_y = move.linear[2];
1376 animation.z = move.linear[0];
1377 animation.dist = distance[x][y] * 0.8;
1378 float show3 = render_value(animation);
1382 pixel.red = f * (show1 + show2);
1383 pixel.green = f * (show1 - show2);
1384 pixel.blue = f * (show3 - show1);
1386 pixel = rgb_sanity_check(pixel);
1387 setPixelColorInternal(y, x, pixel);
1395 run_default_oscillators(0.001);
1397 for (
int x = 0; x < num_x; x++) {
1398 for (
int y = 0; y < num_y; y++) {
1400 animation.dist = distance[x][y];
1401 animation.angle = polar_theta[x][y];
1403 animation.scale_x = 0.07 + move.directional[0] * 0.002;
1404 animation.scale_y = 0.07;
1406 animation.offset_y = -move.linear[0];
1407 animation.offset_x = 0;
1408 animation.offset_z = 0;
1411 animation.low_limit = -1;
1412 float show1 = render_value(animation);
1414 animation.offset_y = -move.linear[1];
1415 float show3 = render_value(animation);
1417 animation.offset_x = show3 / 20;
1418 animation.offset_y = -move.linear[0] / 2 + show1 / 70;
1419 animation.low_limit = 0;
1420 float show2 = render_value(animation);
1422 animation.offset_x = show3 / 20;
1423 animation.offset_y = -move.linear[0] / 2 + show1 / 70;
1425 float show4 = render_value(animation);
1427 float radius = radial_filter_radius;
1429 float radial = (radius - animation.dist) / animation.dist;
1431 float linear = (y + 1) / (num_y - 1.f);
1433 pixel.red = radial * show2;
1434 pixel.green = linear * radial * 0.3 * (show2 - show4);
1437 pixel = rgb_sanity_check(pixel);
1438 setPixelColorInternal(x, y, pixel);
1447 run_default_oscillators();
1448 timings.master_speed = 0.003;
1449 calculate_oscillators(timings);
1451 for (
int x = 0; x < num_x; x++) {
1452 for (
int y = 0; y < num_y; y++) {
1454 animation.dist = (distance[x][y] * distance[x][y]) / 2;
1455 animation.angle = polar_theta[x][y];
1457 animation.scale_x = 0.005;
1458 animation.scale_y = 0.005;
1460 animation.offset_y = -10 * move.linear[0];
1461 animation.offset_x = 0;
1462 animation.offset_z = 0;
1465 animation.low_limit = 0;
1466 float show1 = render_value(animation);
1470 pixel.red = show1 * linear;
1474 pixel = rgb_sanity_check(pixel);
1475 setPixelColorInternal(y, x, pixel);
1484 run_default_oscillators();
1485 timings.master_speed = 0.00005;
1486 calculate_oscillators(timings);
1488 for (
int x = 0; x < num_x; x++) {
1489 for (
int y = 0; y < num_y; y++) {
1492 sqrtf(distance[x][y]) * 0.7 * (move.directional[0] + 1.5);
1494 polar_theta[x][y] - move.radial[0] + distance[x][y] / 5;
1496 animation.scale_x = 0.11;
1497 animation.scale_y = 0.11;
1499 animation.offset_y = -50 * move.linear[0];
1500 animation.offset_x = 0;
1501 animation.offset_z = 0;
1503 animation.z = move.linear[0];
1504 animation.low_limit = -0.1;
1505 animation.high_limit = 1;
1506 float show1 = render_value(animation);
1508 animation.dist = animation.dist * 1.1;
1509 animation.angle += move.noise_angle[0] / 10;
1510 float show2 = render_value(animation);
1512 animation.dist = animation.dist * 1.1;
1513 animation.angle += move.noise_angle[1] / 10;
1515 float show3 = render_value(animation);
1517 float radius = radial_filter_radius;
1519 float radial = (radius - distance[x][y]) / distance[x][y];
1521 pixel.red = radial * show1;
1522 pixel.green = radial * (show1 - show2) / 6;
1523 pixel.blue = radial * (show1 - show3) / 5;
1525 pixel = rgb_sanity_check(pixel);
1526 setPixelColorInternal(y, x, pixel);
1531 void Polar_Waves() {
1535 timings.master_speed = 0.5;
1537 timings.ratio[0] = 0.0025;
1539 timings.ratio[1] = 0.0027;
1540 timings.ratio[2] = 0.0031;
1542 calculate_oscillators(timings);
1544 for (
int x = 0; x < num_x; x++) {
1545 for (
int y = 0; y < num_y; y++) {
1547 animation.dist = (distance[x][y]);
1549 polar_theta[x][y] - animation.dist * 0.1 + move.radial[0];
1550 animation.z = (animation.dist * 1.5) - 10 * move.linear[0];
1551 animation.scale_x = 0.15;
1552 animation.scale_y = 0.15;
1553 animation.offset_x = move.linear[0];
1555 float show1 = render_value(animation);
1557 polar_theta[x][y] - animation.dist * 0.1 + move.radial[1];
1558 animation.z = (animation.dist * 1.5) - 10 * move.linear[1];
1559 animation.offset_x = move.linear[1];
1561 float show2 = render_value(animation);
1563 polar_theta[x][y] - animation.dist * 0.1 + move.radial[2];
1564 animation.z = (animation.dist * 1.5) - 10 * move.linear[2];
1565 animation.offset_x = move.linear[2];
1567 float show3 = render_value(animation);
1569 float radius = radial_filter_radius;
1571 float radial = (radius - distance[x][y]) / distance[x][y];
1573 pixel.red = radial * show1;
1574 pixel.green = radial * show2;
1575 pixel.blue = radial * show3;
1577 pixel = rgb_sanity_check(pixel);
1578 setPixelColorInternal(y, x, pixel);
1587 timings.master_speed = 0.2;
1589 timings.ratio[0] = 0.0025;
1591 timings.ratio[1] = 0.0027;
1592 timings.ratio[2] = 0.0031;
1593 timings.ratio[3] = 0.0033;
1595 timings.ratio[4] = 0.0036;
1596 timings.ratio[5] = 0.0039;
1598 calculate_oscillators(timings);
1600 for (
int x = 0; x < num_x; x++) {
1601 for (
int y = 0; y < num_y; y++) {
1603 animation.dist = distance[x][y];
1604 animation.angle = polar_theta[x][y] + move.radial[0] +
1605 move.noise_angle[0] + move.noise_angle[3];
1606 animation.z = (sqrtf(animation.dist));
1607 animation.scale_x = 0.1;
1608 animation.scale_y = 0.1;
1609 animation.offset_z = 10;
1610 animation.offset_x = 10 * move.linear[0];
1611 float show1 = render_value(animation);
1613 animation.angle = polar_theta[x][y] + move.radial[1] +
1614 move.noise_angle[1] + move.noise_angle[4];
1615 animation.offset_x = 11 * move.linear[1];
1616 animation.offset_z = 100;
1617 float show2 = render_value(animation);
1619 animation.angle = polar_theta[x][y] + move.radial[2] +
1620 move.noise_angle[2] + move.noise_angle[5];
1621 animation.offset_x = 12 * move.linear[2];
1622 animation.offset_z = 300;
1623 float show3 = render_value(animation);
1625 float radius = radial_filter_radius;
1627 float radial = (radius - distance[x][y]) / distance[x][y];
1629 pixel.red = radial * show1;
1630 pixel.green = radial * show2;
1631 pixel.blue = radial * show3;
1633 pixel = rgb_sanity_check(pixel);
1634 setPixelColorInternal(x, y, pixel);
1643 timings.master_speed = 0.12;
1645 timings.ratio[0] = 0.0025;
1647 timings.ratio[1] = 0.0027;
1648 timings.ratio[2] = 0.0031;
1649 timings.ratio[3] = 0.0033;
1651 timings.ratio[4] = 0.0036;
1652 timings.ratio[5] = 0.0039;
1654 calculate_oscillators(timings);
1656 for (
int x = 0; x < num_x; x++) {
1657 for (
int y = 0; y < num_y; y++) {
1659 animation.dist = distance[x][y];
1660 animation.angle = polar_theta[x][y] + move.radial[0] +
1661 move.noise_angle[0] + move.noise_angle[3] +
1662 move.noise_angle[1];
1663 animation.z = (sqrtf(animation.dist));
1664 animation.scale_x = 0.1;
1665 animation.scale_y = 0.1;
1666 animation.offset_z = 10;
1667 animation.offset_x = 10 * move.linear[0];
1668 float show1 = render_value(animation);
1670 animation.angle = polar_theta[x][y] + move.radial[1] +
1671 move.noise_angle[1] + move.noise_angle[4] +
1672 move.noise_angle[2];
1673 animation.offset_x = 11 * move.linear[1];
1674 animation.offset_z = 100;
1675 float show2 = render_value(animation);
1677 animation.angle = polar_theta[x][y] + move.radial[2] +
1678 move.noise_angle[2] + move.noise_angle[5] +
1679 move.noise_angle[3];
1680 animation.offset_x = 12 * move.linear[2];
1681 animation.offset_z = 300;
1682 float show3 = render_value(animation);
1684 float radius = radial_filter_radius;
1686 float radial = (radius - distance[x][y]) / distance[x][y];
1688 pixel.red = radial * (show1 - show3);
1689 pixel.green = radial * (show2 - show1);
1690 pixel.blue = radial * (show3 - show2);
1692 pixel = rgb_sanity_check(pixel);
1693 setPixelColorInternal(x, y, pixel);
1702 timings.master_speed = 0.12;
1704 timings.ratio[0] = 0.0025;
1706 timings.ratio[1] = 0.0027;
1707 timings.ratio[2] = 0.0031;
1708 timings.ratio[3] = 0.0033;
1710 timings.ratio[4] = 0.0036;
1711 timings.ratio[5] = 0.0039;
1713 calculate_oscillators(timings);
1715 for (
int x = 0; x < num_x; x++) {
1716 for (
int y = 0; y < num_y; y++) {
1718 animation.dist = distance[x][y] + move.noise_angle[4];
1719 animation.angle = polar_theta[x][y] + move.radial[0] +
1720 move.noise_angle[0] + move.noise_angle[3] +
1721 move.noise_angle[1];
1722 animation.z = (sqrtf(animation.dist));
1723 animation.scale_x = 0.1;
1724 animation.scale_y = 0.1;
1725 animation.offset_z = 10;
1726 animation.offset_x = 10 * move.linear[0];
1727 float show1 = render_value(animation);
1729 animation.angle = polar_theta[x][y] + move.radial[1] +
1730 move.noise_angle[1] + move.noise_angle[4] +
1731 move.noise_angle[2];
1732 animation.offset_x = 11 * move.linear[1];
1733 animation.offset_z = 100;
1734 float show2 = render_value(animation);
1736 animation.angle = polar_theta[x][y] + move.radial[2] +
1737 move.noise_angle[2] + move.noise_angle[5] +
1738 move.noise_angle[3];
1739 animation.offset_x = 12 * move.linear[2];
1740 animation.offset_z = 300;
1741 float show3 = render_value(animation);
1743 float radius = radial_filter_radius;
1745 float radial = (radius - distance[x][y]) / distance[x][y];
1747 pixel.red = radial * (show1 + show3) * 0.5 * animation.dist / 5;
1748 pixel.green = radial * (show2 + show1) * 0.5 * y / 15;
1749 pixel.blue = radial * (show3 + show2) * 0.5 * x / 15;
1751 pixel = rgb_sanity_check(pixel);
1752 setPixelColorInternal(y, x, pixel);
1761 timings.master_speed = 0.02;
1763 timings.ratio[0] = 0.0025;
1765 timings.ratio[1] = 0.0027;
1766 timings.ratio[2] = 0.0031;
1767 timings.ratio[3] = 0.0033;
1769 timings.ratio[4] = 0.0036;
1770 timings.ratio[5] = 0.0039;
1772 calculate_oscillators(timings);
1774 for (
int x = 0; x < num_x; x++) {
1775 for (
int y = 0; y < num_y; y++) {
1777 animation.dist = distance[x][y] + move.noise_angle[4];
1778 animation.angle = polar_theta[x][y] + move.radial[0] +
1779 move.noise_angle[0] + move.noise_angle[3] +
1780 move.noise_angle[1];
1781 animation.z = 3 + sqrtf(animation.dist);
1782 animation.scale_x = 0.1;
1783 animation.scale_y = 0.1;
1784 animation.offset_z = 10;
1785 animation.offset_x = 50 * move.linear[0];
1786 float show1 = render_value(animation);
1788 animation.angle = polar_theta[x][y] + move.radial[1] +
1789 move.noise_angle[1] + move.noise_angle[4] +
1790 move.noise_angle[2];
1791 animation.offset_x = 50 * move.linear[1];
1792 animation.offset_z = 100;
1793 float show2 = render_value(animation);
1795 animation.angle = polar_theta[x][y] + move.radial[2] +
1796 move.noise_angle[2] + move.noise_angle[5] +
1797 move.noise_angle[3];
1798 animation.offset_x = 50 * move.linear[2];
1799 animation.offset_z = 300;
1800 float show3 = render_value(animation);
1803 float radial = (radius - distance[x][y]) / distance[x][y];
1805 pixel.red = radial * (show1 + show3) * 0.5 * animation.dist / 5;
1806 pixel.green = radial * (show2 + show1) * 0.5 * y / 15;
1807 pixel.blue = radial * (show3 + show2) * 0.5 * x / 15;
1809 pixel = rgb_sanity_check(pixel);
1810 setPixelColorInternal(y, x, pixel);
1819 timings.master_speed = 0.02;
1821 timings.ratio[0] = 0.0025;
1823 timings.ratio[1] = 0.0027;
1824 timings.ratio[2] = 0.0031;
1825 timings.ratio[3] = 0.0033;
1827 timings.ratio[4] = 0.0036;
1828 timings.ratio[5] = 0.0039;
1830 calculate_oscillators(timings);
1832 for (
int x = 0; x < num_x; x++) {
1833 for (
int y = 0; y < num_y; y++) {
1835 animation.dist = distance[x][y] + move.noise_angle[4];
1836 animation.angle = polar_theta[x][y] + move.radial[0] +
1837 move.noise_angle[0] + move.noise_angle[3] +
1838 move.noise_angle[1];
1839 animation.z = 3 + sqrtf(animation.dist);
1840 animation.scale_x = 0.05;
1841 animation.scale_y = 0.05;
1842 animation.offset_z = 10;
1843 animation.offset_x = 50 * move.linear[0];
1844 float show1 = render_value(animation);
1846 animation.angle = polar_theta[x][y] + move.radial[1] +
1847 move.noise_angle[1] + move.noise_angle[4] +
1848 move.noise_angle[2];
1849 animation.offset_x = 50 * move.linear[1];
1850 animation.offset_z = 100;
1851 float show2 = render_value(animation);
1853 animation.angle = polar_theta[x][y] + move.radial[2] +
1854 move.noise_angle[2] + move.noise_angle[5] +
1855 move.noise_angle[3];
1856 animation.offset_x = 50 * move.linear[2];
1857 animation.offset_z = 300;
1858 float show3 = render_value(animation);
1861 float radial = (radius - distance[x][y]) / distance[x][y];
1863 pixel.red = radial * (show1 + show3) * 0.5 * animation.dist / 5;
1864 pixel.green = radial * (show2 + show1) * 0.5 * y / 15;
1865 pixel.blue = radial * (show3 + show2) * 0.5 * x / 15;
1867 pixel = rgb_sanity_check(pixel);
1869 setPixelColorInternal(y, x, pixel);
1874 void Big_Caleido() {
1878 timings.master_speed = 0.02;
1880 timings.ratio[0] = 0.0025;
1882 timings.ratio[1] = 0.0027;
1883 timings.ratio[2] = 0.0031;
1884 timings.ratio[3] = 0.0033;
1886 timings.ratio[4] = 0.0036;
1887 timings.ratio[5] = 0.0039;
1889 calculate_oscillators(timings);
1891 for (
int x = 0; x < num_x; x++) {
1892 for (
int y = 0; y < num_y; y++) {
1894 animation.dist = distance[x][y];
1895 animation.angle = 5 * polar_theta[x][y] +
1896 5 * move.noise_angle[0] +
1897 animation.dist * 0.1;
1899 animation.scale_x = 0.05;
1900 animation.scale_y = 0.05;
1901 animation.offset_z = 50 * move.linear[0];
1902 animation.offset_x = 50 * move.noise_angle[0];
1903 animation.offset_y = 50 * move.noise_angle[1];
1904 float show1 = render_value(animation);
1906 animation.angle = 6 * polar_theta[x][y] +
1907 5 * move.noise_angle[1] +
1908 animation.dist * 0.15;
1910 animation.scale_x = 0.05;
1911 animation.scale_y = 0.05;
1912 animation.offset_z = 50 * move.linear[1];
1913 animation.offset_x = 50 * move.noise_angle[1];
1914 animation.offset_y = 50 * move.noise_angle[2];
1915 float show2 = render_value(animation);
1917 animation.angle = 5;
1919 animation.scale_x = 0.10;
1920 animation.scale_y = 0.10;
1921 animation.offset_z = 10 * move.linear[2];
1922 animation.offset_x = 10 * move.noise_angle[2];
1923 animation.offset_y = 10 * move.noise_angle[3];
1924 float show3 = render_value(animation);
1926 animation.angle = 15;
1928 animation.scale_x = 0.10;
1929 animation.scale_y = 0.10;
1930 animation.offset_z = 10 * move.linear[3];
1931 animation.offset_x = 10 * move.noise_angle[3];
1932 animation.offset_y = 10 * move.noise_angle[4];
1933 float show4 = render_value(animation);
1935 animation.angle = 2;
1937 animation.scale_x = 0.15;
1938 animation.scale_y = 0.15;
1939 animation.offset_z = 10 * move.linear[4];
1940 animation.offset_x = 10 * move.noise_angle[4];
1941 animation.offset_y = 10 * move.noise_angle[5];
1942 float show5 = render_value(animation);
1944 pixel.red = show1 - show4;
1945 pixel.green = show2 - show5;
1946 pixel.blue = show3 - show2 + show1;
1948 pixel = rgb_sanity_check(pixel);
1950 setPixelColorInternal(y, x, pixel);
1960 timings.master_speed = 0.02;
1962 timings.ratio[0] = 0.0025;
1964 timings.ratio[1] = 0.0027;
1965 timings.ratio[2] = 0.0031;
1966 timings.ratio[3] = 0.0033;
1968 timings.ratio[4] = 0.0036;
1969 timings.ratio[5] = 0.0039;
1971 calculate_oscillators(timings);
1973 for (
int x = 0; x < num_x / 2; x++) {
1974 for (
int y = 0; y < num_y / 2; y++) {
1976 animation.dist = distance[x][y];
1977 animation.angle = polar_theta[x][y] + 5 * move.noise_angle[0];
1979 animation.scale_x = 0.1;
1980 animation.scale_y = 0.1;
1981 animation.offset_z = 50 * move.linear[0];
1982 animation.offset_x = 150 * move.directional[0];
1983 animation.offset_y = 150 * move.directional[1];
1984 float show1 = render_value(animation);
1986 animation.dist = distance[x][y];
1987 animation.angle = polar_theta[x][y] + 4 * move.noise_angle[1];
1989 animation.scale_x = 0.15;
1990 animation.scale_y = 0.15;
1991 animation.offset_z = 50 * move.linear[1];
1992 animation.offset_x = 150 * move.directional[1];
1993 animation.offset_y = 150 * move.directional[2];
1994 float show2 = render_value(animation);
1996 animation.dist = distance[x][y];
1997 animation.angle = polar_theta[x][y] + 5 * move.noise_angle[2];
1999 animation.scale_x = 0.1;
2000 animation.scale_y = 0.1;
2001 animation.offset_z = 50 * move.linear[2];
2002 animation.offset_x = 150 * move.directional[2];
2003 animation.offset_y = 150 * move.directional[3];
2004 float show3 = render_value(animation);
2006 animation.dist = distance[x][y];
2007 animation.angle = polar_theta[x][y] + 5 * move.noise_angle[3];
2009 animation.scale_x = 0.15;
2010 animation.scale_y = 0.15;
2011 animation.offset_z = 50 * move.linear[3];
2012 animation.offset_x = 150 * move.directional[3];
2013 animation.offset_y = 150 * move.directional[4];
2014 float show4 = render_value(animation);
2016 animation.dist = distance[x][y];
2017 animation.angle = polar_theta[x][y] + 5 * move.noise_angle[4];
2019 animation.scale_x = 0.2;
2020 animation.scale_y = 0.2;
2021 animation.offset_z = 50 * move.linear[4];
2022 animation.offset_x = 150 * move.directional[4];
2023 animation.offset_y = 150 * move.directional[5];
2024 float show5 = render_value(animation);
2026 pixel.red = show1 + show2;
2027 pixel.green = show3 + show4;
2030 pixel = rgb_sanity_check(pixel);
2032 setPixelColorInternal(x, y, pixel);
2034 setPixelColorInternal((num_x - 1) - x, y, pixel);
2035 setPixelColorInternal((num_x - 1) - x, (num_y - 1) - y, pixel);
2036 setPixelColorInternal(x, (num_y - 1) - y, pixel);
2046 timings.master_speed = 0.03;
2048 timings.ratio[0] = 0.025;
2050 timings.ratio[1] = 0.027;
2051 timings.ratio[2] = 0.031;
2052 timings.ratio[3] = 0.0033;
2054 timings.ratio[4] = 0.0036;
2055 timings.ratio[5] = 0.0039;
2057 calculate_oscillators(timings);
2059 for (
int x = 0; x < num_x; x++) {
2060 for (
int y = 0; y < num_y; y++) {
2062 animation.dist = distance[x][y] * (move.directional[0]);
2063 animation.angle = polar_theta[x][y] + move.radial[0];
2065 animation.scale_x = 0.09;
2066 animation.scale_y = 0.09;
2067 animation.offset_z = 5 * move.linear[0];
2068 animation.offset_x = 0;
2069 animation.offset_y = 0;
2070 float show1 = render_value(animation);
2072 animation.dist = distance[x][y] * move.directional[1];
2073 animation.angle = polar_theta[x][y] + move.radial[1];
2075 animation.scale_x = 0.07;
2076 animation.scale_y = 0.07;
2077 animation.offset_z = 5 * move.linear[1];
2078 animation.offset_x = 0;
2079 animation.offset_y = 0;
2080 float show2 = render_value(animation);
2082 animation.dist = distance[x][y] * move.directional[2];
2083 animation.angle = polar_theta[x][y] + move.radial[2];
2085 animation.scale_x = 0.05;
2086 animation.scale_y = 0.05;
2087 animation.offset_z = 5 * move.linear[2];
2088 animation.offset_x = 0;
2089 animation.offset_y = 0;
2090 float show3 = render_value(animation);
2093 pixel.green = show2;
2096 pixel = rgb_sanity_check(pixel);
2098 setPixelColorInternal(x, y, pixel);
2108 timings.master_speed = 0.02;
2110 timings.ratio[0] = 0.025;
2112 timings.ratio[1] = 0.027;
2113 timings.ratio[2] = 0.031;
2114 timings.ratio[3] = 0.0033;
2116 timings.ratio[4] = 0.0036;
2117 timings.ratio[5] = 0.0039;
2119 calculate_oscillators(timings);
2121 for (
int x = 0; x < num_x; x++) {
2122 for (
int y = 0; y < num_y; y++) {
2124 animation.dist = distance[x][y];
2125 animation.angle = polar_theta[x][y];
2127 animation.scale_x = 0.09;
2128 animation.scale_y = 0.09;
2129 animation.offset_z = 0;
2130 animation.offset_x = 0;
2131 animation.offset_y = -20 * move.linear[0];
2133 animation.low_limit = -1;
2134 animation.high_limit = 1;
2135 show1 = render_value(animation);
2137 animation.dist = distance[x][y];
2138 animation.angle = polar_theta[x][y];
2140 animation.scale_x = 0.09;
2141 animation.scale_y = 0.09;
2142 animation.offset_z = 0;
2143 animation.offset_x = 0;
2144 animation.offset_y = -20 * move.linear[0];
2146 animation.low_limit = -1;
2147 animation.high_limit = 1;
2148 show2 = render_value(animation);
2150 animation.dist = distance[x][y];
2151 animation.angle = polar_theta[x][y];
2153 animation.scale_x = 0.09;
2154 animation.scale_y = 0.09;
2155 animation.offset_z = 0;
2156 animation.offset_x = 500 + show1 / 20;
2157 animation.offset_y = -4 * move.linear[0] + show2 / 20;
2158 animation.low_limit = 0;
2159 animation.high_limit = 1;
2160 show3 = render_value(animation);
2162 animation.dist = distance[x][y];
2163 animation.angle = polar_theta[x][y];
2165 animation.scale_x = 0.09;
2166 animation.scale_y = 0.09;
2167 animation.offset_z = 0;
2168 animation.offset_x = 500 + show1 / 18;
2169 animation.offset_y = -4 * move.linear[0] + show2 / 18;
2170 animation.low_limit = 0;
2171 animation.high_limit = 1;
2172 show4 = render_value(animation);
2174 animation.dist = distance[x][y];
2175 animation.angle = polar_theta[x][y];
2177 animation.scale_x = 0.09;
2178 animation.scale_y = 0.09;
2179 animation.offset_z = 0;
2180 animation.offset_x = 500 + show1 / 19;
2181 animation.offset_y = -4 * move.linear[0] + show2 / 19;
2182 animation.low_limit = 0.3;
2183 animation.high_limit = 1;
2184 show5 = render_value(animation);
2187 pixel.green = show3;
2190 pixel = rgb_sanity_check(pixel);
2192 setPixelColorInternal(x, y, pixel);
2201 timings.master_speed = 0.02;
2203 timings.ratio[0] = 0.025;
2205 timings.ratio[1] = 0.027;
2206 timings.ratio[2] = 0.031;
2207 timings.ratio[3] = 0.0033;
2209 timings.ratio[4] = 0.0036;
2210 timings.ratio[5] = 0.0039;
2212 calculate_oscillators(timings);
2214 for (
int x = 0; x < num_x; x++) {
2215 for (
int y = 0; y < num_y; y++) {
2217 animation.dist = distance[x][y];
2218 animation.angle = polar_theta[x][y];
2220 animation.scale_x = 0.09;
2221 animation.scale_y = 0.09;
2222 animation.offset_z = 0;
2223 animation.offset_x = 0;
2224 animation.offset_y = -20 * move.linear[0];
2226 animation.low_limit = 0;
2227 animation.high_limit = 1;
2228 show1 = render_value(animation);
2230 animation.dist = distance[x][y];
2231 animation.angle = polar_theta[x][y];
2233 animation.scale_x = 0.09;
2234 animation.scale_y = 0.09;
2235 animation.offset_z = 0;
2236 animation.offset_x = 0;
2237 animation.offset_y = -40 * move.linear[0];
2239 animation.low_limit = 0;
2240 animation.high_limit = 1;
2241 show2 = render_value(animation);
2243 pixel.red = add(show2, show1);
2245 pixel.blue = colordodge(show2, show1);
2247 pixel = rgb_sanity_check(pixel);
2249 setPixelColorInternal(x, y, pixel);
2258 timings.master_speed = 0.03;
2260 timings.ratio[0] = 0.025;
2262 timings.ratio[1] = 0.027;
2263 timings.ratio[2] = 0.031;
2264 timings.ratio[3] = 0.0053;
2266 timings.ratio[4] = 0.0056;
2267 timings.ratio[5] = 0.0059;
2269 calculate_oscillators(timings);
2271 for (
int x = 0; x < num_x; x++) {
2272 for (
int y = 0; y < num_y; y++) {
2274 animation.dist = distance[x][y] * (move.directional[0]);
2275 animation.angle = polar_theta[x][y] + move.radial[0];
2277 animation.scale_x = 0.09;
2278 animation.scale_y = 0.09;
2279 animation.offset_z = 5 * move.linear[0];
2280 animation.offset_x = 0;
2281 animation.offset_y = 0;
2282 float show1 = render_value(animation);
2284 animation.dist = distance[x][y] * move.directional[1];
2285 animation.angle = polar_theta[x][y] + move.radial[1];
2287 animation.scale_x = 0.07;
2288 animation.scale_y = 0.07;
2289 animation.offset_z = 5 * move.linear[1];
2290 animation.offset_x = 0;
2291 animation.offset_y = 0;
2292 float show2 = render_value(animation);
2294 animation.dist = distance[x][y] * move.directional[2];
2295 animation.angle = polar_theta[x][y] + move.radial[2];
2297 animation.scale_x = 0.05;
2298 animation.scale_y = 0.05;
2299 animation.offset_z = 5 * move.linear[2];
2300 animation.offset_x = 0;
2301 animation.offset_y = 0;
2302 float show3 = render_value(animation);
2304 animation.dist = distance[x][y] * (move.directional[3]);
2305 animation.angle = polar_theta[x][y] + move.radial[3];
2307 animation.scale_x = 0.09;
2308 animation.scale_y = 0.09;
2309 animation.offset_z = 5 * move.linear[3];
2310 animation.offset_x = 0;
2311 animation.offset_y = 0;
2312 float show4 = render_value(animation);
2314 animation.dist = distance[x][y] * move.directional[4];
2315 animation.angle = polar_theta[x][y] + move.radial[4];
2317 animation.scale_x = 0.07;
2318 animation.scale_y = 0.07;
2319 animation.offset_z = 5 * move.linear[4];
2320 animation.offset_x = 0;
2321 animation.offset_y = 0;
2322 float show5 = render_value(animation);
2324 animation.dist = distance[x][y] * move.directional[5];
2325 animation.angle = polar_theta[x][y] + move.radial[5];
2327 animation.scale_x = 0.05;
2328 animation.scale_y = 0.05;
2329 animation.offset_z = 5 * move.linear[5];
2330 animation.offset_x = 0;
2331 animation.offset_y = 0;
2332 float show6 = render_value(animation);
2334 float radius = radial_filter_radius;
2336 float radial = (radius - distance[x][y]) / distance[x][y];
2338 pixel.red = radial * add(show1, show4);
2339 pixel.green = radial * colordodge(show2, show5);
2340 pixel.blue = radial * screen(show3, show6);
2342 pixel = rgb_sanity_check(pixel);
2344 setPixelColorInternal(x, y, pixel);
2353 timings.master_speed = 0.03;
2355 timings.ratio[0] = 0.025;
2357 timings.ratio[1] = 0.027;
2358 timings.ratio[2] = 0.031;
2359 timings.ratio[3] = 0.0053;
2361 timings.ratio[4] = 0.0056;
2362 timings.ratio[5] = 0.0059;
2364 calculate_oscillators(timings);
2366 for (
int x = 0; x < num_x; x++) {
2367 for (
int y = 0; y < num_y; y++) {
2371 animation.dist = distance[x][y] * (move.directional[0]) * s;
2372 animation.angle = polar_theta[x][y] + move.radial[0];
2374 animation.scale_x = 0.09;
2375 animation.scale_y = 0.09;
2376 animation.offset_z = 5 * move.linear[0];
2377 animation.offset_x = 0;
2378 animation.offset_y = 0;
2379 float show1 = render_value(animation);
2381 animation.dist = distance[x][y] * move.directional[1] * s;
2382 animation.angle = polar_theta[x][y] + move.radial[1];
2384 animation.scale_x = 0.07;
2385 animation.scale_y = 0.07;
2386 animation.offset_z = 5 * move.linear[1];
2387 animation.offset_x = 0;
2388 animation.offset_y = 0;
2389 float show2 = render_value(animation);
2391 animation.dist = distance[x][y] * move.directional[2] * s;
2392 animation.angle = polar_theta[x][y] + move.radial[2];
2394 animation.scale_x = 0.05;
2395 animation.scale_y = 0.05;
2396 animation.offset_z = 5 * move.linear[2];
2397 animation.offset_x = 0;
2398 animation.offset_y = 0;
2399 float show3 = render_value(animation);
2401 animation.dist = distance[x][y] * (move.directional[3]) * s;
2402 animation.angle = polar_theta[x][y] + move.radial[3];
2404 animation.scale_x = 0.09;
2405 animation.scale_y = 0.09;
2406 animation.offset_z = 5 * move.linear[3];
2407 animation.offset_x = 0;
2408 animation.offset_y = 0;
2409 float show4 = render_value(animation);
2411 animation.dist = distance[x][y] * move.directional[4] * s;
2412 animation.angle = polar_theta[x][y] + move.radial[4];
2414 animation.scale_x = 0.07;
2415 animation.scale_y = 0.07;
2416 animation.offset_z = 5 * move.linear[4];
2417 animation.offset_x = 0;
2418 animation.offset_y = 0;
2419 float show5 = render_value(animation);
2421 animation.dist = distance[x][y] * move.directional[5] * s;
2422 animation.angle = polar_theta[x][y] + move.radial[5];
2424 animation.scale_x = 0.05;
2425 animation.scale_y = 0.05;
2426 animation.offset_z = 5 * move.linear[5];
2427 animation.offset_x = 0;
2428 animation.offset_y = 0;
2429 float show6 = render_value(animation);
2431 float radius = radial_filter_radius;
2433 float radial = (radius - distance[x][y]) / distance[x][y];
2435 show7 = screen(show1, show4);
2436 show8 = colordodge(show2, show5);
2437 show9 = screen(show3, show6);
2439 pixel.red = radial * (show7 + show8);
2441 pixel.blue = radial * show9;
2443 pixel = rgb_sanity_check(pixel);
2445 setPixelColorInternal(x, y, pixel);
2454 timings.master_speed = 0.005;
2456 timings.ratio[0] = 0.025;
2458 timings.ratio[1] = 0.027;
2459 timings.ratio[2] = 0.031;
2460 timings.ratio[3] = 0.0053;
2462 timings.ratio[4] = 0.0056;
2463 timings.ratio[5] = 0.01;
2465 calculate_oscillators(timings);
2467 for (
int x = 0; x < num_x; x++) {
2468 for (
int y = 0; y < num_y; y++) {
2472 animation.dist = distance[x][y];
2473 animation.angle = 2;
2475 animation.scale_x = 0.15;
2476 animation.scale_y = 0.15;
2477 animation.offset_z = 0;
2478 animation.offset_y = 50 * move.linear[0];
2479 animation.offset_x = 0;
2480 animation.low_limit = 0;
2481 float show1 = render_value(animation);
2483 animation.dist = distance[x][y];
2484 animation.angle = 2;
2486 animation.offset_x = -50 * move.linear[0];
2487 float show2 = render_value(animation);
2489 animation.dist = distance[x][y];
2490 animation.angle = 1;
2492 animation.scale_x = 0.15;
2493 animation.scale_y = 0.15;
2494 animation.offset_x = 0;
2495 animation.offset_y = -50 * move.linear[1];
2496 float show4 = render_value(animation);
2498 animation.dist = distance[x][y];
2499 animation.angle = 1;
2501 animation.scale_x = 0.15;
2502 animation.scale_y = 0.15;
2503 animation.offset_x = 0;
2504 animation.offset_y = 50 * move.linear[1];
2505 float show5 = render_value(animation);
2511 show3 = add(show1, show2);
2512 show6 = screen(show4, show5);
2519 pixel = rgb_sanity_check(pixel);
2521 setPixelColorInternal(x, y, pixel);
2530 timings.master_speed = 0.005;
2532 timings.ratio[0] = 0.025;
2534 timings.ratio[1] = 0.027;
2535 timings.ratio[2] = 0.031;
2536 timings.ratio[3] = 0.0053;
2538 timings.ratio[4] = 0.0056;
2539 timings.ratio[5] = 0.0059;
2541 calculate_oscillators(timings);
2543 for (
int x = 0; x < num_x; x++) {
2544 for (
int y = 0; y < num_y; y++) {
2546 animation.dist = distance[x][y];
2547 animation.angle = polar_theta[x][y];
2549 animation.scale_x = 0.09;
2550 animation.scale_y = 0.09;
2551 animation.offset_y = -30 * move.linear[0];
2552 animation.offset_z = 0;
2553 animation.offset_x = 0;
2554 animation.low_limit = -1;
2555 show1 = render_value(animation);
2557 animation.dist = distance[x][y];
2558 animation.angle = polar_theta[x][y];
2560 animation.scale_x = 0.09;
2561 animation.scale_y = 0.09;
2562 animation.offset_y = -30 * move.linear[1];
2563 animation.offset_z = 0;
2564 animation.offset_x = 0;
2565 animation.low_limit = -1;
2566 show2 = render_value(animation);
2568 animation.dist = distance[x][y];
2569 animation.angle = polar_theta[x][y] + 2 + (show1 / 255) * PI;
2571 animation.scale_x = 0.09;
2572 animation.scale_y = 0.09;
2573 animation.offset_y = -10 * move.linear[0];
2574 animation.offset_z = 0;
2575 animation.offset_x = 0;
2576 animation.low_limit = 0;
2577 show3 = render_value(animation);
2579 animation.dist = distance[x][y];
2580 animation.angle = polar_theta[x][y] + 2 + (show2 / 255) * PI;
2583 animation.scale_x = 0.09;
2584 animation.scale_y = 0.09;
2585 animation.offset_y = -20 * move.linear[0];
2586 animation.offset_z = 0;
2587 animation.offset_x = 0;
2588 animation.low_limit = 0;
2589 show4 = render_value(animation);
2591 show5 = screen(show4, show3);
2592 show6 = colordodge(show5, show3);
2594 float linear1 = y / 32.f;
2595 float linear2 = (32 - y) / 32.f;
2597 pixel.red = show5 * linear1;
2599 pixel.blue = show6 * linear2;
2601 pixel = rgb_sanity_check(pixel);
2603 setPixelColorInternal(x, y, pixel);
2612 timings.master_speed = 0.006;
2614 timings.ratio[0] = 0.025;
2616 timings.ratio[1] = 0.027;
2617 timings.ratio[2] = 0.031;
2618 timings.ratio[3] = 0.0053;
2620 timings.ratio[4] = 0.0056;
2621 timings.ratio[5] = 0.0059;
2623 calculate_oscillators(timings);
2625 for (
int x = 0; x < num_x; x++) {
2626 for (
int y = 0; y < num_y; y++) {
2630 animation.dist = distance[x][y];
2631 animation.angle = polar_theta[x][y];
2633 animation.scale_x = 0.09 * scale;
2634 animation.scale_y = 0.09 * scale;
2635 animation.offset_y = -30 * move.linear[0];
2636 animation.offset_z = 0;
2637 animation.offset_x = 0;
2638 animation.low_limit = -1;
2639 show1 = render_value(animation);
2641 animation.dist = distance[x][y];
2642 animation.angle = polar_theta[x][y];
2644 animation.scale_x = 0.09 * scale;
2645 animation.scale_y = 0.09 * scale;
2646 animation.offset_y = -30 * move.linear[1];
2647 animation.offset_z = 0;
2648 animation.offset_x = 0;
2649 animation.low_limit = -1;
2650 show2 = render_value(animation);
2652 animation.dist = distance[x][y];
2653 animation.angle = polar_theta[x][y] + 2 + (show1 / 255) * PI;
2655 animation.scale_x = 0.09 * scale;
2656 animation.scale_y = 0.09 * scale;
2657 animation.offset_y = -10 * move.linear[0];
2658 animation.offset_z = 0;
2659 animation.offset_x = 0;
2660 animation.low_limit = 0;
2661 show3 = render_value(animation);
2663 animation.dist = distance[x][y];
2664 animation.angle = polar_theta[x][y] + 2 + (show2 / 255) * PI;
2667 animation.scale_x = 0.09 * scale;
2668 animation.scale_y = 0.09 * scale;
2669 animation.offset_y = -20 * move.linear[0];
2670 animation.offset_z = 0;
2671 animation.offset_x = 0;
2672 animation.low_limit = 0;
2673 show4 = render_value(animation);
2675 show5 = screen(show4, show3);
2676 show6 = colordodge(show5, show3);
2681 pixel.red = (show5 + show6) / 2;
2682 pixel.green = (show5 - 50) + (show6 / 16);
2685 pixel = rgb_sanity_check(pixel);
2687 setPixelColorInternal(x, y, pixel);
2692 void Complex_Kaleido() {
2696 timings.master_speed = 0.009;
2698 timings.ratio[0] = 0.025;
2700 timings.ratio[1] = 0.027;
2701 timings.ratio[2] = 0.031;
2702 timings.ratio[3] = 0.0053;
2704 timings.ratio[4] = 0.0056;
2705 timings.ratio[5] = 0.0059;
2707 calculate_oscillators(timings);
2711 for (
int x = 0; x < num_x; x++) {
2712 for (
int y = 0; y < num_y; y++) {
2714 animation.dist = distance[x][y];
2715 animation.angle = 5 * polar_theta[x][y] + 10 * move.radial[0] +
2718 animation.scale_x = 0.07;
2719 animation.scale_y = 0.07;
2720 animation.offset_z = 0;
2721 animation.offset_x = -30 * move.linear[0];
2722 animation.offset_y = 0;
2723 animation.low_limit = 0;
2724 show1 = render_value(animation);
2726 animation.dist = distance[x][y];
2727 animation.angle = -5 * polar_theta[x][y] + 12 * move.radial[1] +
2730 animation.scale_x = 0.07;
2731 animation.scale_y = 0.07;
2732 animation.offset_z = 0;
2733 animation.offset_x = -30 * move.linear[1];
2734 animation.offset_y = 0;
2735 animation.low_limit = 0;
2736 show2 = render_value(animation);
2738 animation.dist = distance[x][y];
2739 animation.angle = -5 * polar_theta[x][y] + 12 * move.radial[2] +
2742 animation.scale_x = 0.05;
2743 animation.scale_y = 0.05;
2744 animation.offset_z = 0;
2745 animation.offset_x = -40 * move.linear[2];
2746 animation.offset_y = 0;
2747 animation.low_limit = 0;
2748 show3 = render_value(animation);
2750 animation.dist = distance[x][y];
2751 animation.angle = 5 * polar_theta[x][y] + 12 * move.radial[3] +
2754 animation.scale_x = 0.09;
2755 animation.scale_y = 0.09;
2756 animation.offset_z = 0;
2757 animation.offset_x = -35 * move.linear[3];
2758 animation.offset_y = 0;
2759 animation.low_limit = 0;
2760 show4 = render_value(animation);
2762 show5 = screen(show4, show3);
2763 show6 = colordodge(show2, show3);
2768 float radius = radial_filter_radius;
2770 float radial = (radius - distance[x][y]) / distance[x][y];
2772 pixel.red = radial * (show1 + show2);
2773 pixel.green = 0.3 * radial * show6;
2774 pixel.blue = radial * show5;
2776 pixel = rgb_sanity_check(pixel);
2778 setPixelColorInternal(x, y, pixel);
2783 void Complex_Kaleido_2() {
2787 timings.master_speed = 0.009;
2789 timings.ratio[0] = 0.025;
2791 timings.ratio[1] = 0.027;
2792 timings.ratio[2] = 0.031;
2793 timings.ratio[3] = 0.0053;
2795 timings.ratio[4] = 0.0056;
2796 timings.ratio[5] = 0.0059;
2798 calculate_oscillators(timings);
2802 for (
int x = 0; x < num_x; x++) {
2803 for (
int y = 0; y < num_y; y++) {
2805 animation.dist = distance[x][y];
2806 animation.angle = 5 * polar_theta[x][y] + 10 * move.radial[0] +
2809 animation.scale_x = 0.07 * size;
2810 animation.scale_y = 0.07 * size;
2811 animation.offset_z = 0;
2812 animation.offset_x = -30 * move.linear[0];
2813 animation.offset_y = 0;
2814 animation.low_limit = 0;
2815 show1 = render_value(animation);
2817 animation.dist = distance[x][y];
2818 animation.angle = -5 * polar_theta[x][y] + 12 * move.radial[1] +
2821 animation.scale_x = 0.07 * size;
2822 animation.scale_y = 0.07 * size;
2823 animation.offset_z = 0;
2824 animation.offset_x = -30 * move.linear[1];
2825 animation.offset_y = 0;
2826 animation.low_limit = 0;
2827 show2 = render_value(animation);
2829 animation.dist = distance[x][y];
2830 animation.angle = -5 * polar_theta[x][y] + 12 * move.radial[2] +
2833 animation.scale_x = 0.05 * size;
2834 animation.scale_y = 0.05 * size;
2835 animation.offset_z = 0;
2836 animation.offset_x = -40 * move.linear[2];
2837 animation.offset_y = 0;
2838 animation.low_limit = 0;
2839 show3 = render_value(animation);
2841 animation.dist = distance[x][y];
2842 animation.angle = 5 * polar_theta[x][y] + 12 * move.radial[3] +
2845 animation.scale_x = 0.09 * size;
2846 animation.scale_y = 0.09 * size;
2847 animation.offset_z = 0;
2848 animation.offset_x = -35 * move.linear[3];
2849 animation.offset_y = 0;
2850 animation.low_limit = 0;
2851 show4 = render_value(animation);
2853 show5 = screen(show4, show3);
2854 show6 = colordodge(show2, show3);
2859 float radius = radial_filter_radius;
2861 float radial = (radius - distance[x][y]) / distance[x][y];
2863 pixel.red = radial * (show1 + show2);
2864 pixel.green = 0.3 * radial * show6;
2865 pixel.blue = radial * show5;
2867 pixel = rgb_sanity_check(pixel);
2869 setPixelColorInternal(x, y, pixel);
2874 void Complex_Kaleido_3() {
2878 timings.master_speed = 0.001;
2880 timings.ratio[0] = 0.025;
2882 timings.ratio[1] = 0.027;
2883 timings.ratio[2] = 0.031;
2884 timings.ratio[3] = 0.033;
2886 timings.ratio[4] = 0.037;
2887 timings.ratio[5] = 0.038;
2888 timings.ratio[5] = 0.041;
2890 calculate_oscillators(timings);
2892 float size = 0.4 + move.directional[0] * 0.1;
2896 for (
int x = 0; x < num_x; x++) {
2897 for (
int y = 0; y < num_y; y++) {
2899 animation.dist = distance[x][y];
2901 5 * polar_theta[x][y] + 10 * move.radial[0] +
2902 animation.dist / (((move.directional[0] + 3) * 2)) +
2903 move.noise_angle[0] * q;
2905 animation.scale_x = 0.08 * size * (move.directional[0] + 1.5);
2906 animation.scale_y = 0.07 * size;
2907 animation.offset_z = -10 * move.linear[0];
2908 animation.offset_x = -30 * move.linear[0];
2909 animation.offset_y = 0;
2910 animation.low_limit = 0;
2911 show1 = render_value(animation);
2913 animation.dist = distance[x][y];
2915 -5 * polar_theta[x][y] + 10 * move.radial[1] +
2916 animation.dist / (((move.directional[1] + 3) * 2)) +
2917 move.noise_angle[1] * q;
2919 animation.scale_x = 0.07 * size * (move.directional[1] + 1.1);
2920 animation.scale_y = 0.07 * size * (move.directional[2] + 1.3);
2922 animation.offset_z = -12 * move.linear[1];
2924 animation.offset_x = -(num_x - 1) * move.linear[1];
2925 animation.offset_y = 0;
2926 animation.low_limit = 0;
2927 show2 = render_value(animation);
2929 animation.dist = distance[x][y];
2931 -5 * polar_theta[x][y] + 12 * move.radial[2] +
2932 animation.dist / (((move.directional[3] + 3) * 2)) +
2933 move.noise_angle[2] * q;
2935 animation.scale_x = 0.05 * size * (move.directional[3] + 1.5);
2937 animation.scale_y = 0.05 * size * (move.directional[4] + 1.5);
2939 animation.offset_z = -12 * move.linear[3];
2940 animation.offset_x = -40 * move.linear[3];
2941 animation.offset_y = 0;
2942 animation.low_limit = 0;
2943 show3 = render_value(animation);
2945 animation.dist = distance[x][y];
2947 5 * polar_theta[x][y] + 12 * move.radial[3] +
2948 animation.dist / (((move.directional[5] + 3) * 2)) +
2949 move.noise_angle[3] * q;
2951 animation.scale_x = 0.09 * size * (move.directional[5] + 1.5);
2954 animation.scale_y = 0.09 * size * (move.directional[6] + 1.5);
2957 animation.offset_z = 0;
2958 animation.offset_x = -35 * move.linear[3];
2959 animation.offset_y = 0;
2960 animation.low_limit = 0;
2961 show4 = render_value(animation);
2963 show5 = screen(show4, show3) - show2;
2964 show6 = colordodge(show4, show1);
2966 show7 = multiply(show1, show2);
2968 float linear1 = y / 32.f;
2971 float radius = radial_filter_radius;
2973 float radial = (radius - distance[x][y]) / distance[x][y];
2975 show7 = multiply(show1, show2) * linear1 * 2;
2976 show8 = subtract(show7, show5);
2979 pixel.green = 0.2 * show8;
2980 pixel.blue = show5 * radial;
2981 pixel.red = (1 * show1 + 1 * show2) - show7 / 2;
2983 pixel = rgb_sanity_check(pixel);
2985 setPixelColorInternal(x, y, pixel);
2990 void Complex_Kaleido_4() {
2994 timings.master_speed = 0.01;
2996 timings.ratio[0] = 0.025;
2998 timings.ratio[1] = 0.027;
2999 timings.ratio[2] = 0.031;
3000 timings.ratio[3] = 0.033;
3002 timings.ratio[4] = 0.037;
3003 timings.ratio[5] = 0.038;
3004 timings.ratio[6] = 0.041;
3006 calculate_oscillators(timings);
3012 for (
int x = 0; x < num_x; x++) {
3013 for (
int y = 0; y < num_y; y++) {
3015 float s = 1 + move.directional[6] * 0.3;
3017 animation.dist = distance[x][y] * s;
3019 5 * polar_theta[x][y] + 1 * move.radial[0] -
3020 animation.dist / (3 + move.directional[0] * 0.5);
3022 animation.scale_x = 0.08 * size + (move.directional[0] * 0.01);
3023 animation.scale_y = 0.07 * size + (move.directional[1] * 0.01);
3024 animation.offset_z = -10 * move.linear[0];
3025 animation.offset_x = 0;
3026 animation.offset_y = 0;
3027 animation.low_limit = 0;
3028 show1 = render_value(animation);
3030 animation.dist = distance[x][y] * s;
3032 5 * polar_theta[x][y] + 1 * move.radial[1] +
3033 animation.dist / (3 + move.directional[1] * 0.5);
3035 animation.scale_x = 0.08 * size + (move.directional[1] * 0.01);
3036 animation.scale_y = 0.07 * size + (move.directional[2] * 0.01);
3037 animation.offset_z = -10 * move.linear[1];
3038 animation.offset_x = 0;
3039 animation.offset_y = 0;
3040 animation.low_limit = 0;
3041 show2 = render_value(animation);
3043 animation.dist = distance[x][y];
3044 animation.angle = 1;
3046 animation.scale_x = 0.2 * size;
3047 animation.scale_y = 0.2 * size;
3048 animation.offset_z = 0;
3049 animation.offset_y = +7 * move.linear[3] + move.noise_angle[3];
3050 animation.offset_x = 0;
3051 animation.low_limit = 0;
3052 show3 = render_value(animation);
3054 animation.dist = distance[x][y];
3056 5 * polar_theta[x][y] + 12 * move.radial[3] +
3057 animation.dist / (((move.directional[5] + 3) * 2)) +
3058 move.noise_angle[3] * q;
3060 animation.scale_x = 0.09 * size * (move.directional[5] + 1.5);
3063 animation.scale_y = 0.09 * size * (move.directional[6] + 1.5);
3066 animation.offset_z = 0;
3067 animation.offset_x = -35 * move.linear[3];
3068 animation.offset_y = 0;
3069 animation.low_limit = 0;
3070 show4 = render_value(animation);
3081 float radius = radial_filter_radius;
3083 float radial = (radius - distance[x][y]) / distance[x][y];
3089 show5 = ((show1 + show2)) - show3;
3095 show6 = colordodge(show1, show2);
3097 pixel.red = show5 * radial;
3098 pixel.blue = (64 - show5 - show3) * radial;
3099 pixel.green = 0.5 * (show6);
3103 pixel = rgb_sanity_check(pixel);
3105 setPixelColorInternal(x, y, pixel);
3110 void Complex_Kaleido_5() {
3114 timings.master_speed = 0.01;
3116 timings.ratio[0] = 0.025;
3118 timings.ratio[1] = 0.027;
3119 timings.ratio[2] = 0.031;
3120 timings.ratio[3] = 0.033;
3122 timings.ratio[4] = 0.037;
3123 timings.ratio[5] = 0.0038;
3124 timings.ratio[6] = 0.041;
3126 calculate_oscillators(timings);
3132 for (
int x = 0; x < num_x; x++) {
3133 for (
int y = 0; y < num_y; y++) {
3135 float s = 1 + move.directional[6] * 0.8;
3137 animation.dist = distance[x][y] * s;
3138 animation.angle = 10 * move.radial[6] +
3139 50 * move.directional[5] * polar_theta[x][y] -
3142 animation.scale_x = 0.08 * size;
3143 animation.scale_y = 0.07 * size;
3144 animation.offset_z = -10 * move.linear[0];
3145 animation.offset_x = 0;
3146 animation.offset_y = 0;
3147 animation.low_limit = -0.5;
3148 show1 = render_value(animation);
3150 float radius = radial_filter_radius;
3152 float radial = (radius - distance[x][y]) / distance[x][y];
3154 pixel.red = show1 * radial;
3158 pixel = rgb_sanity_check(pixel);
3160 setPixelColorInternal(x, y, pixel);
3165 void Complex_Kaleido_6() {
3169 timings.master_speed = 0.01;
3171 timings.ratio[0] = 0.025;
3173 timings.ratio[1] = 0.027;
3174 timings.ratio[2] = 0.031;
3175 timings.ratio[3] = 0.033;
3177 timings.ratio[4] = 0.037;
3178 timings.ratio[5] = 0.0038;
3179 timings.ratio[6] = 0.041;
3181 calculate_oscillators(timings);
3183 for (
int x = 0; x < num_x; x++) {
3184 for (
int y = 0; y < num_y; y++) {
3186 animation.dist = distance[x][y];
3187 animation.angle = 16 * polar_theta[x][y] + 16 * move.radial[0];
3189 animation.scale_x = 0.06;
3190 animation.scale_y = 0.06;
3191 animation.offset_z = -10 * move.linear[0];
3192 animation.offset_y = 10 * move.noise_angle[0];
3193 animation.offset_x = 10 * move.noise_angle[4];
3194 animation.low_limit = 0;
3195 show1 = render_value(animation);
3197 animation.dist = distance[x][y];
3198 animation.angle = 16 * polar_theta[x][y] + 16 * move.radial[1];
3200 animation.scale_x = 0.06;
3201 animation.scale_y = 0.06;
3202 animation.offset_z = -10 * move.linear[1];
3203 animation.offset_y = 10 * move.noise_angle[1];
3204 animation.offset_x = 10 * move.noise_angle[3];
3205 animation.low_limit = 0;
3206 show2 = render_value(animation);
3216 pixel = rgb_sanity_check(pixel);
3218 setPixelColorInternal(x, y, pixel);
3227 timings.master_speed = 0.037;
3229 timings.ratio[0] = 0.025;
3231 timings.ratio[1] = 0.027;
3232 timings.ratio[2] = 0.031;
3233 timings.ratio[3] = 0.033;
3235 timings.ratio[4] = 0.037;
3236 timings.ratio[5] = 0.1;
3237 timings.ratio[6] = 0.41;
3239 calculate_oscillators(timings);
3241 for (
int x = 0; x < num_x; x++) {
3242 for (
int y = 0; y < num_y; y++) {
3246 4 * sinf(move.directional[5] * PI + (
float)x / 2) +
3247 4 * cosf(move.directional[6] * PI +
float(y) / 2);
3248 animation.angle = 1 * polar_theta[x][y];
3250 animation.scale_x = 0.06;
3251 animation.scale_y = 0.06;
3252 animation.offset_z = -10 * move.linear[0];
3253 animation.offset_y = 10;
3254 animation.offset_x = 10;
3255 animation.low_limit = 0;
3256 show1 = render_value(animation);
3258 animation.dist = (10 + move.directional[0]) *
3259 sinf(-move.radial[5] + move.radial[0] +
3260 (distance[x][y] / (3)));
3261 animation.angle = 1 * polar_theta[x][y];
3263 animation.scale_x = 0.1;
3264 animation.scale_y = 0.1;
3265 animation.offset_z = -10;
3266 animation.offset_y = 20 * move.linear[0];
3267 animation.offset_x = 10;
3268 animation.low_limit = 0;
3269 show2 = render_value(animation);
3271 animation.dist = (10 + move.directional[1]) *
3272 sinf(-move.radial[5] + move.radial[1] +
3273 (distance[x][y] / (3)));
3274 animation.angle = 1 * polar_theta[x][y];
3276 animation.scale_x = 0.1;
3277 animation.scale_y = 0.1;
3278 animation.offset_z = -10;
3279 animation.offset_y = 20 * move.linear[1];
3280 animation.offset_x = 10;
3281 animation.low_limit = 0;
3282 show3 = render_value(animation);
3284 animation.dist = (10 + move.directional[2]) *
3285 sinf(-move.radial[5] + move.radial[2] +
3286 (distance[x][y] / (3)));
3287 animation.angle = 1 * polar_theta[x][y];
3289 animation.scale_x = 0.1;
3290 animation.scale_y = 0.1;
3291 animation.offset_z = -10;
3292 animation.offset_y = 20 * move.linear[2];
3293 animation.offset_x = 10;
3294 animation.low_limit = 0;
3295 show4 = render_value(animation);
3303 pixel.blue = (0.7 * show2 + 0.6 * show3 + 0.5 * show4);
3304 pixel.red = pixel.blue - 40;
3309 pixel = rgb_sanity_check(pixel);
3311 setPixelColorInternal(x, y, pixel);
3316 void Parametric_Water() {
3320 timings.master_speed = 0.003;
3322 timings.ratio[0] = 0.025;
3324 timings.ratio[1] = 0.027;
3325 timings.ratio[2] = 0.029;
3326 timings.ratio[3] = 0.033;
3328 timings.ratio[4] = 0.037;
3329 timings.ratio[5] = 0.15;
3330 timings.ratio[6] = 0.41;
3332 calculate_oscillators(timings);
3334 for (
int x = 0; x < num_x; x++) {
3335 for (
int y = 0; y < num_y; y++) {
3338 float f = 10 + 2 * move.directional[0];
3340 animation.dist = (f + move.directional[0]) *
3341 sinf(-move.radial[5] + move.radial[0] +
3342 (distance[x][y] / (s)));
3343 animation.angle = 1 * polar_theta[x][y];
3345 animation.scale_x = 0.1;
3346 animation.scale_y = 0.1;
3347 animation.offset_z = -10;
3348 animation.offset_y = 20 * move.linear[0];
3349 animation.offset_x = 10;
3350 animation.low_limit = 0;
3351 show2 = render_value(animation);
3353 animation.dist = (f + move.directional[1]) *
3354 sinf(-move.radial[5] + move.radial[1] +
3355 (distance[x][y] / (s)));
3356 animation.angle = 1 * polar_theta[x][y];
3358 animation.scale_x = 0.1;
3359 animation.scale_y = 0.1;
3360 animation.offset_z = -10;
3361 animation.offset_y = 20 * move.linear[1];
3362 animation.offset_x = 10;
3363 animation.low_limit = 0;
3364 show3 = render_value(animation);
3366 animation.dist = (f + move.directional[2]) *
3367 sinf(-move.radial[5] + move.radial[2] +
3368 (distance[x][y] / (s)));
3369 animation.angle = 1 * polar_theta[x][y];
3371 animation.scale_x = 0.1;
3372 animation.scale_y = 0.1;
3373 animation.offset_z = -10;
3374 animation.offset_y = 20 * move.linear[2];
3375 animation.offset_x = 10;
3376 animation.low_limit = 0;
3377 show4 = render_value(animation);
3379 animation.dist = (f + move.directional[3]) *
3380 sinf(-move.radial[5] + move.radial[3] +
3381 (distance[x][y] / (s)));
3382 animation.angle = 1 * polar_theta[x][y];
3384 animation.scale_x = 0.1;
3385 animation.scale_y = 0.1;
3386 animation.offset_z = -10;
3387 animation.offset_y = 20 * move.linear[3];
3388 animation.offset_x = 10;
3389 animation.low_limit = 0;
3390 show5 = render_value(animation);
3392 show6 = screen(show4, show5);
3393 show7 = screen(show2, show3);
3396 float radial = (radius - distance[x][y]) / radius;
3401 pixel.red = pixel.blue - 40;
3403 pixel.blue = (0.3 * show6 + 0.7 * show7) * radial;
3405 pixel = rgb_sanity_check(pixel);
3407 setPixelColorInternal(x, y, pixel);
3412 void Module_Experiment1() {
3416 timings.master_speed = 0.03;
3418 timings.ratio[0] = 0.0025;
3420 timings.ratio[1] = 0.0027;
3421 timings.ratio[2] = 0.029;
3422 timings.ratio[3] = 0.033;
3425 calculate_oscillators(timings);
3427 for (
int x = 0; x < num_x; x++) {
3428 for (
int y = 0; y < num_y; y++) {
3430 animation.dist = distance[x][y] + 20 * move.directional[0];
3431 animation.angle = move.noise_angle[0] + move.noise_angle[1] +
3434 animation.scale_x = 0.1;
3435 animation.scale_y = 0.1;
3436 animation.offset_z = -10;
3437 animation.offset_y = 20 * move.linear[2];
3438 animation.offset_x = 10;
3439 animation.low_limit = 0;
3440 show1 = render_value(animation);
3446 pixel = rgb_sanity_check(pixel);
3448 setPixelColorInternal(x, y, pixel);
3453 void Module_Experiment2() {
3457 timings.master_speed = 0.02;
3459 timings.ratio[0] = 0.0025;
3461 timings.ratio[1] = 0.0027;
3462 timings.ratio[2] = 0.029;
3463 timings.ratio[3] = 0.033;
3466 calculate_oscillators(timings);
3468 for (
int x = 0; x < num_x; x++) {
3469 for (
int y = 0; y < num_y; y++) {
3472 distance[x][y] - (16 + move.directional[0] * 16);
3473 animation.angle = move.noise_angle[0] + move.noise_angle[1] +
3476 animation.scale_x = 0.1;
3477 animation.scale_y = 0.1;
3478 animation.offset_z = -10;
3479 animation.offset_y = 20 * move.linear[2];
3480 animation.offset_x = 10;
3481 animation.low_limit = 0;
3482 show1 = render_value(animation);
3485 pixel.green = show1 - 80;
3486 pixel.blue = show1 - 150;
3488 pixel = rgb_sanity_check(pixel);
3490 setPixelColorInternal(x, y, pixel);
3495 void Module_Experiment3() {
3499 timings.master_speed = 0.01;
3501 timings.ratio[0] = 0.0025;
3503 timings.ratio[1] = 0.0027;
3504 timings.ratio[2] = 0.029;
3505 timings.ratio[3] = 0.033;
3508 calculate_oscillators(timings);
3510 for (
int x = 0; x < num_x; x++) {
3511 for (
int y = 0; y < num_y; y++) {
3514 distance[x][y] - (12 + move.directional[3] * 4);
3515 animation.angle = move.noise_angle[0] + move.noise_angle[1] +
3518 animation.scale_x = 0.1;
3519 animation.scale_y = 0.1;
3520 animation.offset_z = -10;
3521 animation.offset_y = 20 * move.linear[2];
3522 animation.offset_x = 10;
3523 animation.low_limit = 0;
3524 show1 = render_value(animation);
3527 pixel.green = show1 - 80;
3528 pixel.blue = show1 - 150;
3530 pixel = rgb_sanity_check(pixel);
3532 setPixelColorInternal(x, y, pixel);
3541 run_default_oscillators();
3542 timings.master_speed = 0.003;
3543 calculate_oscillators(timings);
3545 for (
int x = 0; x < num_x; x++) {
3546 for (
int y = 0; y < num_y; y++) {
3548 animation.dist = (distance[x][y] * distance[x][y]) / 2;
3549 animation.angle = polar_theta[x][y];
3551 animation.scale_x = 0.005;
3552 animation.scale_y = 0.005;
3554 animation.offset_y = -10 * move.linear[0];
3555 animation.offset_x = 0;
3556 animation.offset_z = 0.1 * move.linear[0];
3559 animation.low_limit = 0;
3560 float show1 = render_value(animation);
3566 pixel.blue = 40 - show1;
3568 pixel = rgb_sanity_check(pixel);
3569 setPixelColorInternal(y, x, pixel);
3574 void Module_Experiment4() {
3578 timings.master_speed = 0.031;
3580 timings.ratio[0] = 0.0025;
3582 timings.ratio[1] = 0.0027;
3583 timings.ratio[2] = 0.029;
3584 timings.ratio[3] = 0.033;
3585 timings.ratio[4] = 0.036;
3588 calculate_oscillators(timings);
3590 for (
int x = 0; x < num_x; x++) {
3591 for (
int y = 0; y < num_y; y++) {
3595 animation.dist = (distance[x][y] * distance[x][y]) * 0.7;
3596 animation.angle = polar_theta[x][y];
3598 animation.scale_x = 0.004 * s;
3599 animation.scale_y = 0.003 * s;
3600 animation.offset_z = 0.1 * move.linear[2];
3601 animation.offset_y = -20 * move.linear[2];
3602 animation.offset_x = 10;
3603 animation.low_limit = 0;
3604 show1 = render_value(animation);
3606 animation.dist = (distance[x][y] * distance[x][y]) * 0.8;
3607 animation.angle = polar_theta[x][y];
3609 animation.scale_x = 0.004 * s;
3610 animation.scale_y = 0.003 * s;
3611 animation.offset_z = 0.1 * move.linear[3];
3612 animation.offset_y = -20 * move.linear[3];
3613 animation.offset_x = 100;
3614 animation.low_limit = 0;
3615 show2 = render_value(animation);
3617 animation.dist = (distance[x][y] * distance[x][y]) * 0.9;
3618 animation.angle = polar_theta[x][y];
3620 animation.scale_x = 0.004 * s;
3621 animation.scale_y = 0.003 * s;
3622 animation.offset_z = 0.1 * move.linear[4];
3623 animation.offset_y = -20 * move.linear[4];
3624 animation.offset_x = 1000;
3625 animation.low_limit = 0;
3626 show3 = render_value(animation);
3635 pixel.red = show1 - show2 - show3;
3636 pixel.blue = show2 - show1 - show3;
3637 pixel.green = show3 - show1 - show2;
3642 pixel = rgb_sanity_check(pixel);
3644 setPixelColorInternal(x, y, pixel);
3649 void Module_Experiment5() {
3653 timings.master_speed = 0.031;
3655 timings.ratio[0] = 0.0025;
3657 timings.ratio[1] = 0.0027;
3658 timings.ratio[2] = 0.029;
3659 timings.ratio[3] = 0.33;
3660 timings.ratio[4] = 0.036;
3663 calculate_oscillators(timings);
3665 for (
int x = 0; x < num_x; x++) {
3666 for (
int y = 0; y < num_y; y++) {
3670 animation.dist = distance[x][y] +
3671 sinf(0.5 * distance[x][y] - move.radial[3]);
3672 animation.angle = polar_theta[x][y];
3674 animation.scale_x = 0.1 * s;
3675 animation.scale_y = 0.1 * s;
3676 animation.offset_z = 0.1 * move.linear[0];
3677 animation.offset_y = -20 * move.linear[0];
3678 animation.offset_x = 10;
3679 animation.low_limit = 0;
3680 show1 = render_value(animation);
3686 pixel = rgb_sanity_check(pixel);
3688 setPixelColorInternal(x, y, pixel);
3693 void Module_Experiment6() {
3697 timings.master_speed = 0.01;
3701 timings.ratio[0] = 0.0025;
3703 timings.ratio[1] = 0.0027;
3704 timings.ratio[2] = 0.029;
3705 timings.ratio[3] = 0.33 * w;
3706 timings.ratio[4] = 0.36 * w;
3709 calculate_oscillators(timings);
3711 for (
int x = 0; x < num_x; x++) {
3712 for (
int y = 0; y < num_y; y++) {
3716 animation.dist = distance[x][y] +
3717 sinf(0.25 * distance[x][y] - move.radial[3]);
3718 animation.angle = polar_theta[x][y];
3720 animation.scale_x = 0.1 * s;
3721 animation.scale_y = 0.1 * s;
3722 animation.offset_z = 0.1 * move.linear[0];
3723 animation.offset_y = -20 * move.linear[0];
3724 animation.offset_x = 10;
3725 animation.low_limit = 0;
3726 show1 = render_value(animation);
3728 animation.dist = distance[x][y] +
3729 sinf(0.24 * distance[x][y] - move.radial[4]);
3730 animation.angle = polar_theta[x][y];
3732 animation.scale_x = 0.1 * s;
3733 animation.scale_y = 0.1 * s;
3734 animation.offset_z = 0.1 * move.linear[1];
3735 animation.offset_y = -20 * move.linear[1];
3736 animation.offset_x = 10;
3737 animation.low_limit = 0;
3738 show2 = render_value(animation);
3746 pixel.red = (show1 + show2);
3747 pixel.green = ((show1 + show2) * 0.6) - 30;
3750 pixel = rgb_sanity_check(pixel);
3752 setPixelColorInternal(x, y, pixel);
3757 void Module_Experiment7() {
3761 timings.master_speed = 0.005;
3765 timings.ratio[0] = 0.01;
3767 timings.ratio[1] = 0.011;
3768 timings.ratio[2] = 0.029;
3769 timings.ratio[3] = 0.33 * w;
3770 timings.ratio[4] = 0.36 * w;
3773 calculate_oscillators(timings);
3775 for (
int x = 0; x < num_x; x++) {
3776 for (
int y = 0; y < num_y; y++) {
3781 2 + distance[x][y] +
3782 2 * sinf(0.25 * distance[x][y] - move.radial[3]);
3783 animation.angle = polar_theta[x][y];
3785 animation.scale_x = 0.1 * s;
3786 animation.scale_y = 0.1 * s;
3787 animation.offset_z = 10 * move.linear[0];
3788 animation.offset_y = -20 * move.linear[0];
3789 animation.offset_x = 10;
3790 animation.low_limit = 0;
3791 show1 = render_value(animation);
3794 2 + distance[x][y] +
3795 2 * sinf(0.24 * distance[x][y] - move.radial[4]);
3796 animation.angle = polar_theta[x][y];
3798 animation.scale_x = 0.1 * s;
3799 animation.scale_y = 0.1 * s;
3800 animation.offset_z = 0.1 * move.linear[1];
3801 animation.offset_y = -20 * move.linear[1];
3802 animation.offset_x = 10;
3803 animation.low_limit = 0;
3804 show2 = render_value(animation);
3812 pixel.red = (show1 + show2);
3813 pixel.green = ((show1 + show2) * 0.6) - 50;
3816 pixel = rgb_sanity_check(pixel);
3818 setPixelColorInternal(x, y, pixel);
3823 void Module_Experiment8() {
3827 timings.master_speed = 0.01;
3831 timings.ratio[0] = 0.01;
3833 timings.ratio[1] = 0.011;
3834 timings.ratio[2] = 0.013;
3835 timings.ratio[3] = 0.33 * w;
3836 timings.ratio[4] = 0.36 * w;
3838 timings.ratio[5] = 0.38 * w;
3839 timings.ratio[6] = 0.0003;
3841 timings.offset[0] = 0;
3842 timings.offset[1] = 100;
3843 timings.offset[2] = 200;
3844 timings.offset[3] = 300;
3845 timings.offset[4] = 400;
3846 timings.offset[5] = 500;
3847 timings.offset[6] = 600;
3849 calculate_oscillators(timings);
3851 for (
int x = 0; x < num_x; x++) {
3852 for (
int y = 0; y < num_y; y++) {
3858 3 + distance[x][y] +
3859 3 * sinf(0.25 * distance[x][y] - move.radial[3]);
3860 animation.angle = polar_theta[x][y] + move.noise_angle[0] +
3861 move.noise_angle[6];
3863 animation.scale_x = 0.1 * s;
3864 animation.scale_y = 0.1 * s;
3865 animation.offset_z = 10 * move.linear[0];
3866 animation.offset_y = -5 * r * move.linear[0];
3867 animation.offset_x = 10;
3868 animation.low_limit = 0;
3869 show1 = render_value(animation);
3872 4 + distance[x][y] +
3873 4 * sinf(0.24 * distance[x][y] - move.radial[4]);
3874 animation.angle = polar_theta[x][y] + move.noise_angle[1] +
3875 move.noise_angle[6];
3877 animation.scale_x = 0.1 * s;
3878 animation.scale_y = 0.1 * s;
3879 animation.offset_z = 0.1 * move.linear[1];
3880 animation.offset_y = -5 * r * move.linear[1];
3881 animation.offset_x = 100;
3882 animation.low_limit = 0;
3883 show2 = render_value(animation);
3886 5 + distance[x][y] +
3887 5 * sinf(0.23 * distance[x][y] - move.radial[5]);
3888 animation.angle = polar_theta[x][y] + move.noise_angle[2] +
3889 move.noise_angle[6];
3891 animation.scale_x = 0.1 * s;
3892 animation.scale_y = 0.1 * s;
3893 animation.offset_z = 0.1 * move.linear[2];
3894 animation.offset_y = -5 * r * move.linear[2];
3895 animation.offset_x = 1000;
3896 animation.low_limit = 0;
3897 show3 = render_value(animation);
3899 show4 = colordodge(show1, show2);
3901 float rad = sinf(PI / 2 +
3902 distance[x][y] / 14);
3910 pixel.red = rad * ((show1 + show2) + show3);
3911 pixel.green = (((show2 + show3) * 0.8) - 90) * rad;
3912 pixel.blue = show4 * 0.2;
3914 pixel = rgb_sanity_check(pixel);
3916 setPixelColorInternal(x, y, pixel);
3921 void Module_Experiment9() {
3925 timings.master_speed = 0.03;
3929 timings.ratio[0] = 0.1;
3931 timings.ratio[1] = 0.011;
3932 timings.ratio[2] = 0.013;
3933 timings.ratio[3] = 0.33 * w;
3934 timings.ratio[4] = 0.36 * w;
3936 timings.ratio[5] = 0.38 * w;
3937 timings.ratio[6] = 0.0003;
3939 calculate_oscillators(timings);
3941 for (
int x = 0; x < num_x; x++) {
3942 for (
int y = 0; y < num_y; y++) {
3944 animation.dist = distance[x][y];
3945 animation.angle = polar_theta[x][y] + move.radial[1];
3947 animation.scale_x = 0.001;
3948 animation.scale_y = 0.1;
3949 animation.scale_z = 0.1;
3950 animation.offset_y = -10 * move.linear[0];
3951 animation.offset_x = 20;
3952 animation.offset_z = 10;
3953 animation.low_limit = 0;
3954 show1 = render_value(animation);
3956 pixel.red = 10 * show1;
3960 pixel = rgb_sanity_check(pixel);
3962 setPixelColorInternal(x, y, pixel);
3967 void Module_Experiment10() {
3971 timings.master_speed = 0.01;
3975 timings.ratio[0] = 0.01;
3977 timings.ratio[1] = 0.011;
3978 timings.ratio[2] = 0.013;
3979 timings.ratio[3] = 0.33 * w;
3980 timings.ratio[4] = 0.36 * w;
3982 timings.ratio[5] = 0.38 * w;
3983 timings.ratio[6] = 0.0003;
3985 timings.offset[0] = 0;
3986 timings.offset[1] = 100;
3987 timings.offset[2] = 200;
3988 timings.offset[3] = 300;
3989 timings.offset[4] = 400;
3990 timings.offset[5] = 500;
3991 timings.offset[6] = 600;
3993 calculate_oscillators(timings);
3995 for (
int x = 0; x < num_x; x++) {
3996 for (
int y = 0; y < num_y; y++) {
4002 3 + distance[x][y] +
4003 3 * sinf(0.25 * distance[x][y] - move.radial[3]);
4004 animation.angle = polar_theta[x][y] + move.noise_angle[0] +
4005 move.noise_angle[6];
4007 animation.scale_x = 0.1 * s;
4008 animation.scale_y = 0.1 * s;
4009 animation.offset_z = 10 * move.linear[0];
4010 animation.offset_y = -5 * r * move.linear[0];
4011 animation.offset_x = 10;
4012 animation.low_limit = 0;
4013 show1 = render_value(animation);
4016 4 + distance[x][y] +
4017 4 * sinf(0.24 * distance[x][y] - move.radial[4]);
4018 animation.angle = polar_theta[x][y] + move.noise_angle[1] +
4019 move.noise_angle[6];
4021 animation.scale_x = 0.1 * s;
4022 animation.scale_y = 0.1 * s;
4023 animation.offset_z = 0.1 * move.linear[1];
4024 animation.offset_y = -5 * r * move.linear[1];
4025 animation.offset_x = 100;
4026 animation.low_limit = 0;
4027 show2 = render_value(animation);
4030 5 + distance[x][y] +
4031 5 * sinf(0.23 * distance[x][y] - move.radial[5]);
4032 animation.angle = polar_theta[x][y] + move.noise_angle[2] +
4033 move.noise_angle[6];
4035 animation.scale_x = 0.1 * s;
4036 animation.scale_y = 0.1 * s;
4037 animation.offset_z = 0.1 * move.linear[2];
4038 animation.offset_y = -5 * r * move.linear[2];
4039 animation.offset_x = 1000;
4040 animation.low_limit = 0;
4041 show3 = render_value(animation);
4043 show4 = colordodge(show1, show2);
4045 float rad = sinf(PI / 2 +
4046 distance[x][y] / 14);
4054 CHSV(rad * ((show1 + show2) + show3), 255, 255);
4056 pixel = rgb_sanity_check(pixel);
4058 uint8_t a = getTime() / 100;
4059 CRGB p =
CRGB(
CHSV(((a + show1 + show2) + show3), 255, 255));
4062 pixel.green = p.
green;
4063 pixel.blue = p.
blue;
4064 setPixelColorInternal(x, y, pixel);