152 float speed_factor = 1;
154 float radial_filter_radius = 23.0;
163 std::vector<std::vector<float>>
165 std::vector<std::vector<float>>
168 unsigned long a, b, c;
170 float show1, show2, show3, show4, show5, show6, show7, show8, show9, show0;
174 ANIMartRIX(
int w,
int h) { this->init(w, h); }
178 virtual uint16_t xyMap(uint16_t x, uint16_t y) = 0;
180 uint32_t currentTime = 0;
181 void setTime(uint32_t t) { currentTime = t; }
182 uint32_t getTime() {
return currentTime ? currentTime : millis(); }
185 void init(
int w,
int h) {
194 this->radial_filter_radius = 11;
196 this->radial_filter_radius = 23;
198 render_polar_lookup_table(
213 float subtract(
float &a,
float &b) {
return a - b; }
215 float multiply(
float &a,
float &b) {
return a * b / 255.f; }
220 float colorburn(
float &a,
float &b) {
222 return (1 - ((1 - a / 255.f) / (b / 255.f))) * 255.f;
227 float add(
float &a,
float &b) {
return a + b; }
231 float screen(
float &a,
float &b) {
233 return (1 - (1 - a / 255.f) * (1 - b / 255.f)) * 255.f;
236 float colordodge(
float &a,
float &b) {
return (a / (255.f - b)) * 255.f; }
244 float fade(
float t) {
return t * t * t * (t * (t * 6 - 15) + 10); }
245 float lerp(
float t,
float a,
float b) {
return a + t * (b - a); }
246 float grad(
int hash,
float x,
float y,
float z) {
248 float u = h < 8 ? x : y,
250 : h == 12 || h == 14 ? x
252 return ((h & 1) == 0 ? u : -u) + ((h & 2) == 0 ? v : -v);
256 float pnoise(
float x,
float y,
float z) {
258 int X = (int)floorf(x) & 255,
259 Y = (int)floorf(y) & 255,
260 Z = (int)floorf(z) & 255;
267 int A =
P(X) + Y, AA =
P(A) + Z,
269 B =
P(X + 1) + Y, BA =
P(B) + Z,
274 lerp(u, grad(
P(AA), x, y, z),
275 grad(
P(BA), x - 1, y, z)),
276 lerp(u, grad(
P(AB), x, y - 1, z),
277 grad(
P(BB), x - 1, y - 1, z))),
279 lerp(u, grad(
P(AA + 1), x, y, z - 1),
280 grad(
P(BA + 1), x - 1, y, z - 1)),
281 lerp(u, grad(
P(AB + 1), x, y - 1, z - 1),
282 grad(
P(BB + 1), x - 1, y - 1, z - 1))));
285 void calculate_oscillators(oscillators &timings) {
287 double runtime = getTime() * timings.master_speed *
290 for (
int i = 0; i < num_oscillators; i++) {
293 (runtime + timings.offset[i]) *
297 move.radial[i] = fmodf(move.linear[i],
301 move.directional[i] =
302 sinf(move.radial[i]);
305 move.noise_angle[i] =
308 pnoise(move.linear[i], 0,
313 void run_default_oscillators() {
315 timings.master_speed = 0.005;
317 timings.ratio[0] = 1;
319 timings.ratio[1] = 2;
320 timings.ratio[2] = 3;
321 timings.ratio[3] = 4;
322 timings.ratio[4] = 5;
323 timings.ratio[5] = 6;
324 timings.ratio[6] = 7;
325 timings.ratio[7] = 8;
326 timings.ratio[8] = 9;
327 timings.ratio[9] = 10;
329 timings.offset[0] = 000;
330 timings.offset[1] = 100;
331 timings.offset[2] = 200;
332 timings.offset[3] = 300;
333 timings.offset[4] = 400;
334 timings.offset[5] = 500;
335 timings.offset[6] = 600;
336 timings.offset[7] = 700;
337 timings.offset[8] = 800;
338 timings.offset[9] = 900;
340 calculate_oscillators(timings);
347 float render_value(render_parameters &animation) {
351 float newx = (animation.offset_x + animation.center_x -
352 (cosf(animation.angle) * animation.dist)) *
354 float newy = (animation.offset_y + animation.center_y -
355 (sinf(animation.angle) * animation.dist)) *
357 float newz = (animation.offset_z + animation.z) * animation.scale_z;
361 float raw_noise_field_value = pnoise(newx, newy, newz);
368 if (raw_noise_field_value < animation.low_limit)
369 raw_noise_field_value = animation.low_limit;
370 if (raw_noise_field_value > animation.high_limit)
371 raw_noise_field_value = animation.high_limit;
373 float scaled_noise_value =
374 map_float(raw_noise_field_value, animation.low_limit,
375 animation.high_limit, 0, 255);
377 return scaled_noise_value;
383 void render_polar_lookup_table(
float cx,
float cy) {
385 polar_theta.resize(num_x, std::vector<float>(num_y, 0.0f));
386 distance.resize(num_x, std::vector<float>(num_y, 0.0f));
388 for (
int xx = 0; xx < num_x; xx++) {
389 for (
int yy = 0; yy < num_y; yy++) {
394 distance[xx][yy] = hypotf(dx, dy);
395 polar_theta[xx][yy] = atan2f(dy, dx);
403 float map_float(
float x,
float in_min,
float in_max,
float out_min,
407 (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
408 if (result < out_min)
410 if (result > out_max)
435 rgb rgb_sanity_check(rgb &pixel) {
453 if (pixel.green > 255)
455 if (pixel.blue > 255)
468 virtual void setPixelColorInternal(
int x,
int y, rgb pixel) = 0;
472 void logOutput() { b = micros(); }
474 void logFrame() { c = micros(); }
480 void report_performance() {
485 int fps = 1000000 / total;
486 int kpps = (fps * num_x * num_y) / 1000;
488 ANIMARTRIX_PRINT(fps);
489 ANIMARTRIX_PRINT(
" fps ");
490 ANIMARTRIX_PRINT(kpps);
491 ANIMARTRIX_PRINT(
" kpps @");
492 ANIMARTRIX_PRINT(num_x * num_y);
493 ANIMARTRIX_PRINT(
" LEDs ");
494 ANIMARTRIX_PRINT(round(total));
495 ANIMARTRIX_PRINT(
" µs per frame waiting: ");
496 ANIMARTRIX_PRINT(round((calc * 100) / total));
497 ANIMARTRIX_PRINT(
"% rendering: ");
498 ANIMARTRIX_PRINT(round((push * 100) / total));
499 ANIMARTRIX_PRINT(
"% (");
500 ANIMARTRIX_PRINT(round(calc));
501 ANIMARTRIX_PRINT(
" + ");
502 ANIMARTRIX_PRINT(round(push));
503 ANIMARTRIX_PRINT(
" µs) Core-temp: ");
506 ANIMARTRIX_PRINT(
" °C\n");
511 void Rotating_Blob() {
515 timings.master_speed = 0.01;
516 timings.ratio[0] = 0.1;
517 timings.ratio[1] = 0.03;
518 timings.ratio[2] = 0.03;
519 timings.ratio[3] = 0.03;
521 timings.offset[1] = 10;
522 timings.offset[2] = 20;
523 timings.offset[3] = 30;
525 calculate_oscillators(
528 for (
int x = 0; x < num_x; x++) {
529 for (
int y = 0; y < num_y; y++) {
532 animation.scale_x = 0.05;
533 animation.scale_y = 0.05;
534 animation.offset_x = 0;
535 animation.offset_y = 0;
536 animation.offset_z = 100;
537 animation.angle = polar_theta[x][y] + move.radial[0];
538 animation.dist = distance[x][y];
539 animation.z = move.linear[0];
540 animation.low_limit = -1;
541 float show1 = render_value(animation);
544 polar_theta[x][y] - move.radial[1] + show1 / 512.0;
545 animation.dist = distance[x][y] * show1 / 255.0;
546 animation.low_limit = 0;
547 animation.z = move.linear[1];
548 float show2 = render_value(animation);
551 polar_theta[x][y] - move.radial[2] + show1 / 512.0;
552 animation.dist = distance[x][y] * show1 / 220.0;
553 animation.z = move.linear[2];
554 float show3 = render_value(animation);
557 polar_theta[x][y] - move.radial[3] + show1 / 512.0;
558 animation.dist = distance[x][y] * show1 / 200.0;
559 animation.z = move.linear[3];
560 float show4 = render_value(animation);
563 pixel.red = (show2 + show4) / 2;
564 pixel.green = show3 / 6;
567 pixel = rgb_sanity_check(pixel);
569 setPixelColorInternal(x, y, pixel);
574 void Chasing_Spirals() {
578 timings.master_speed = 0.01;
579 timings.ratio[0] = 0.1;
580 timings.ratio[1] = 0.13;
581 timings.ratio[2] = 0.16;
583 timings.offset[1] = 10;
584 timings.offset[2] = 20;
585 timings.offset[3] = 30;
587 calculate_oscillators(
590 for (
int x = 0; x < num_x; x++) {
591 for (
int y = 0; y < num_y; y++) {
595 3 * polar_theta[x][y] + move.radial[0] - distance[x][y] / 3;
596 animation.dist = distance[x][y];
597 animation.scale_z = 0.1;
598 animation.scale_y = 0.1;
599 animation.scale_x = 0.1;
600 animation.offset_x = move.linear[0];
601 animation.offset_y = 0;
602 animation.offset_z = 0;
604 float show1 = render_value(animation);
607 3 * polar_theta[x][y] + move.radial[1] - distance[x][y] / 3;
608 animation.dist = distance[x][y];
609 animation.offset_x = move.linear[1];
610 float show2 = render_value(animation);
613 3 * polar_theta[x][y] + move.radial[2] - distance[x][y] / 3;
614 animation.dist = distance[x][y];
615 animation.offset_x = move.linear[2];
616 float show3 = render_value(animation);
619 float radius = radial_filter_radius;
620 float radial_filter = (radius - distance[x][y]) / radius;
622 pixel.red = 3 * show1 * radial_filter;
623 pixel.green = show2 * radial_filter / 2;
624 pixel.blue = show3 * radial_filter / 4;
626 pixel = rgb_sanity_check(pixel);
628 setPixelColorInternal(x, y, pixel);
637 timings.master_speed = 0.01;
638 timings.ratio[0] = 1;
639 timings.ratio[1] = 1.1;
640 timings.ratio[2] = 1.2;
642 timings.offset[1] = 100;
643 timings.offset[2] = 200;
644 timings.offset[3] = 300;
646 calculate_oscillators(
649 for (
int x = 0; x < num_x; x++) {
650 for (
int y = 0; y < num_y; y++) {
654 animation.scale_x = 0.2;
655 animation.scale_y = 0.2;
656 animation.scale_z = 1;
657 animation.dist = distance[x][y];
658 animation.offset_y = -move.linear[0];
659 animation.offset_x = 0;
660 float show1 = render_value(animation);
663 animation.angle = 10;
665 animation.dist = distance[x][y];
666 animation.offset_y = -move.linear[1];
667 float show2 = render_value(animation);
670 animation.angle = 12;
672 animation.dist = distance[x][y];
673 animation.offset_y = -move.linear[2];
674 float show3 = render_value(animation);
678 pixel.green = show2 / 4;
679 pixel.blue = show3 / 4;
681 pixel = rgb_sanity_check(pixel);
683 setPixelColorInternal(x, y, pixel);
692 timings.master_speed = 0.01;
693 timings.ratio[0] = 2;
694 timings.ratio[1] = 2.1;
695 timings.ratio[2] = 1.2;
697 timings.offset[1] = 100;
698 timings.offset[2] = 200;
699 timings.offset[3] = 300;
701 calculate_oscillators(
704 for (
int x = 0; x < num_x; x++) {
705 for (
int y = 0; y < num_y; y++) {
708 animation.angle = polar_theta[x][y];
709 animation.scale_x = 0.1;
710 animation.scale_y = 0.1;
711 animation.scale_z = 0.1;
712 animation.dist = distance[x][y];
713 animation.offset_y = 0;
714 animation.offset_x = 0;
715 animation.z = 2 * distance[x][y] - move.linear[0];
716 float show1 = render_value(animation);
718 animation.angle = polar_theta[x][y];
719 animation.dist = distance[x][y];
720 animation.z = 2 * distance[x][y] - move.linear[1];
721 float show2 = render_value(animation);
728 pixel = rgb_sanity_check(pixel);
730 setPixelColorInternal(x, y, pixel);
735 void Center_Field() {
739 timings.master_speed = 0.01;
740 timings.ratio[0] = 1;
741 timings.ratio[1] = 1.1;
742 timings.ratio[2] = 1.2;
744 timings.offset[1] = 100;
745 timings.offset[2] = 200;
746 timings.offset[3] = 300;
748 calculate_oscillators(
751 for (
int x = 0; x < num_x; x++) {
752 for (
int y = 0; y < num_y; y++) {
755 animation.angle = polar_theta[x][y];
756 animation.scale_x = 0.07;
757 animation.scale_y = 0.07;
758 animation.scale_z = 0.1;
759 animation.dist = 5 * sqrtf(distance[x][y]);
760 animation.offset_y = move.linear[0];
761 animation.offset_x = 0;
763 float show1 = render_value(animation);
765 animation.angle = polar_theta[x][y];
766 animation.scale_x = 0.07;
767 animation.scale_y = 0.07;
768 animation.scale_z = 0.1;
769 animation.dist = 4 * sqrtf(distance[x][y]);
770 animation.offset_y = move.linear[0];
771 animation.offset_x = 0;
773 float show2 = render_value(animation);
780 pixel = rgb_sanity_check(pixel);
782 setPixelColorInternal(x, y, pixel);
787 void Distance_Experiment() {
791 timings.master_speed = 0.01;
792 timings.ratio[0] = 0.2;
793 timings.ratio[1] = 0.13;
794 timings.ratio[2] = 0.012;
796 timings.offset[1] = 100;
797 timings.offset[2] = 200;
798 timings.offset[3] = 300;
800 calculate_oscillators(
803 for (
int x = 0; x < num_x; x++) {
804 for (
int y = 0; y < num_y; y++) {
807 animation.dist = powf(distance[x][y], 0.5);
808 animation.angle = polar_theta[x][y] + move.radial[0];
809 animation.scale_x = 0.07;
810 animation.scale_y = 0.07;
811 animation.scale_z = 0.1;
812 animation.offset_y = move.linear[0];
813 animation.offset_x = 0;
814 animation.offset_z = 0;
816 float show1 = render_value(animation);
818 animation.dist = powf(distance[x][y], 0.6);
819 animation.angle = polar_theta[x][y] + move.noise_angle[2];
820 animation.scale_x = 0.07;
821 animation.scale_y = 0.07;
822 animation.scale_z = 0.1;
823 animation.offset_y = move.linear[1];
824 animation.offset_x = 0;
825 animation.offset_z = 0;
827 float show2 = render_value(animation);
830 pixel.red = show1 + show2;
834 pixel = rgb_sanity_check(pixel);
836 setPixelColorInternal(x, y, pixel);
845 timings.master_speed = 0.003;
846 timings.ratio[0] = 0.02;
847 timings.ratio[1] = 0.03;
848 timings.ratio[2] = 0.04;
849 timings.ratio[3] = 0.05;
850 timings.ratio[4] = 0.6;
851 timings.offset[0] = 0;
852 timings.offset[1] = 100;
853 timings.offset[2] = 200;
854 timings.offset[3] = 300;
855 timings.offset[4] = 400;
857 calculate_oscillators(
860 for (
int x = 0; x < num_x; x++) {
861 for (
int y = 0; y < num_y; y++) {
864 animation.dist = distance[x][y] * (2 + move.directional[0]) / 3;
865 animation.angle = 3 * polar_theta[x][y] +
866 3 * move.noise_angle[0] + move.radial[4];
867 animation.scale_x = 0.1;
868 animation.scale_y = 0.1;
869 animation.scale_z = 0.1;
870 animation.offset_y = 2 * move.linear[0];
871 animation.offset_x = 0;
872 animation.offset_z = 0;
873 animation.z = move.linear[0];
874 float show1 = render_value(animation);
876 animation.dist = distance[x][y] * (2 + move.directional[1]) / 3;
877 animation.angle = 4 * polar_theta[x][y] +
878 3 * move.noise_angle[1] + move.radial[4];
879 animation.offset_x = 2 * move.linear[1];
880 animation.z = move.linear[1];
881 float show2 = render_value(animation);
883 animation.dist = distance[x][y] * (2 + move.directional[2]) / 3;
884 animation.angle = 5 * polar_theta[x][y] +
885 3 * move.noise_angle[2] + move.radial[4];
886 animation.offset_y = 2 * move.linear[2];
887 animation.z = move.linear[2];
888 float show3 = render_value(animation);
890 animation.dist = distance[x][y] * (2 + move.directional[3]) / 3;
891 animation.angle = 4 * polar_theta[x][y] +
892 3 * move.noise_angle[3] + move.radial[4];
893 animation.offset_x = 2 * move.linear[3];
894 animation.z = move.linear[3];
895 float show4 = render_value(animation);
899 pixel.green = show3 * distance[x][y] / 10;
900 pixel.blue = (show2 + show4) / 2;
902 pixel = rgb_sanity_check(pixel);
904 setPixelColorInternal(x, y, pixel);
913 timings.master_speed = 0.002;
914 timings.ratio[0] = 0.02;
915 timings.ratio[1] = 0.03;
916 timings.ratio[2] = 0.04;
917 timings.ratio[3] = 0.05;
918 timings.ratio[4] = 0.6;
919 timings.offset[0] = 0;
920 timings.offset[1] = 100;
921 timings.offset[2] = 200;
922 timings.offset[3] = 300;
923 timings.offset[4] = 400;
925 calculate_oscillators(
928 for (
int x = 0; x < num_x; x++) {
929 for (
int y = 0; y < num_y; y++) {
932 animation.dist = distance[x][y] * (2 + move.directional[0]) / 3;
933 animation.angle = 2 * polar_theta[x][y] +
934 3 * move.noise_angle[0] + move.radial[4];
935 animation.scale_x = 0.1;
936 animation.scale_y = 0.1;
937 animation.scale_z = 0.1;
938 animation.offset_y = 2 * move.linear[0];
939 animation.offset_x = 0;
940 animation.offset_z = 0;
941 animation.z = move.linear[0];
942 float show1 = render_value(animation);
944 animation.dist = distance[x][y] * (2 + move.directional[1]) / 3;
945 animation.angle = 2 * polar_theta[x][y] +
946 3 * move.noise_angle[1] + move.radial[4];
947 animation.offset_x = 2 * move.linear[1];
948 animation.z = move.linear[1];
949 float show2 = render_value(animation);
951 animation.dist = distance[x][y] * (2 + move.directional[2]) / 3;
952 animation.angle = 2 * polar_theta[x][y] +
953 3 * move.noise_angle[2] + move.radial[4];
954 animation.offset_y = 2 * move.linear[2];
955 animation.z = move.linear[2];
956 float show3 = render_value(animation);
958 animation.dist = distance[x][y] * (2 + move.directional[3]) / 3;
959 animation.angle = 2 * polar_theta[x][y] +
960 3 * move.noise_angle[3] + move.radial[4];
961 animation.offset_x = 2 * move.linear[3];
962 animation.z = move.linear[3];
963 float show4 = render_value(animation);
967 pixel.green = show3 * distance[x][y] / 10;
968 pixel.blue = (show2 + show4) / 2;
970 pixel = rgb_sanity_check(pixel);
972 setPixelColorInternal(x, y, pixel);
981 timings.master_speed = 0.004;
982 timings.ratio[0] = 0.02;
983 timings.ratio[1] = 0.03;
984 timings.ratio[2] = 0.04;
985 timings.ratio[3] = 0.05;
986 timings.ratio[4] = 0.6;
987 timings.offset[0] = 0;
988 timings.offset[1] = 100;
989 timings.offset[2] = 200;
990 timings.offset[3] = 300;
991 timings.offset[4] = 400;
993 calculate_oscillators(
996 for (
int x = 0; x < num_x; x++) {
997 for (
int y = 0; y < num_y; y++) {
1000 animation.dist = distance[x][y] * (2 + move.directional[0]) / 3;
1001 animation.angle = 2 * polar_theta[x][y] +
1002 3 * move.noise_angle[0] + move.radial[4];
1003 animation.scale_x = 0.1;
1004 animation.scale_y = 0.1;
1005 animation.scale_z = 0.1;
1006 animation.offset_y = 2 * move.linear[0];
1007 animation.offset_x = 2 * move.linear[1];
1008 animation.offset_z = 0;
1009 animation.z = move.linear[0];
1010 float show1 = render_value(animation);
1012 animation.dist = distance[x][y] * (2 + move.directional[1]) / 3;
1013 animation.angle = 2 * polar_theta[x][y] +
1014 3 * move.noise_angle[1] + move.radial[4];
1015 animation.offset_x = 2 * move.linear[1];
1016 animation.offset_y = show1 / 20.0;
1017 animation.z = move.linear[1];
1018 float show2 = render_value(animation);
1020 animation.dist = distance[x][y] * (2 + move.directional[2]) / 3;
1021 animation.angle = 2 * polar_theta[x][y] +
1022 3 * move.noise_angle[2] + move.radial[4];
1023 animation.offset_y = 2 * move.linear[2];
1024 animation.offset_x = show2 / 20.0;
1025 animation.z = move.linear[2];
1026 float show3 = render_value(animation);
1028 animation.dist = distance[x][y] * (2 + move.directional[3]) / 3;
1029 animation.angle = 2 * polar_theta[x][y] +
1030 3 * move.noise_angle[3] + move.radial[4];
1031 animation.offset_x = 2 * move.linear[3];
1032 animation.offset_y = show3 / 20.0;
1033 animation.z = move.linear[3];
1034 float show4 = render_value(animation);
1037 float radius = radial_filter_radius;
1039 pixel.red = show1 * (y + 1) / num_y;
1040 pixel.green = show3 * distance[x][y] / 10;
1041 pixel.blue = (show2 + show4) / 2;
1042 if (distance[x][y] > radius) {
1048 pixel = rgb_sanity_check(pixel);
1050 setPixelColorInternal(x, y, pixel);
1059 timings.master_speed = 0.0015;
1060 timings.ratio[0] = 4;
1061 timings.ratio[1] = 1;
1062 timings.ratio[2] = 1;
1063 timings.ratio[3] = 0.05;
1064 timings.ratio[4] = 0.6;
1065 timings.offset[0] = 0;
1066 timings.offset[1] = 100;
1067 timings.offset[2] = 200;
1068 timings.offset[3] = 300;
1069 timings.offset[4] = 400;
1071 calculate_oscillators(
1074 for (
int x = 0; x < num_x; x++) {
1075 for (
int y = 0; y < num_y; y++) {
1078 animation.dist = distance[x][y] * 0.8;
1079 animation.angle = polar_theta[x][y];
1080 animation.scale_x = 0.15;
1081 animation.scale_y = 0.12;
1082 animation.scale_z = 0.01;
1083 animation.offset_y = -move.linear[0];
1084 animation.offset_x = 0;
1085 animation.offset_z = 0;
1087 float show1 = render_value(animation);
1089 animation.offset_y = -move.linear[1];
1090 animation.scale_x = 0.15;
1091 animation.scale_y = 0.12;
1092 animation.offset_x = show1 / 100;
1093 animation.offset_y += show1 / 100;
1095 float show2 = render_value(animation);
1097 animation.offset_y = -move.linear[2];
1098 animation.scale_x = 0.15;
1099 animation.scale_y = 0.12;
1100 animation.offset_x = show2 / 100;
1101 animation.offset_y += show2 / 100;
1103 float show3 = render_value(animation);
1106 float linear = (y) / (num_y - 1.f);
1108 pixel.red = linear * show2;
1109 pixel.green = 0.1 * linear * (show2 - show3);
1112 pixel = rgb_sanity_check(pixel);
1114 setPixelColorInternal(x, y, pixel);
1123 timings.master_speed = 0.000001;
1124 timings.ratio[0] = 4;
1125 timings.ratio[1] = 3.2;
1126 timings.ratio[2] = 10;
1127 timings.ratio[3] = 0.05;
1128 timings.ratio[4] = 0.6;
1129 timings.offset[0] = 0;
1130 timings.offset[1] = 100;
1131 timings.offset[2] = 200;
1132 timings.offset[3] = 300;
1133 timings.offset[4] = 400;
1135 calculate_oscillators(
1138 for (
int x = 0; x < num_x; x++) {
1139 for (
int y = 0; y < num_y; y++) {
1142 animation.dist = 0.3 * distance[x][y] * 0.8;
1143 animation.angle = 3 * polar_theta[x][y] + move.radial[2];
1144 animation.scale_x = 0.1 + (move.noise_angle[0]) / 10;
1146 0.1 + (move.noise_angle[1]) /
1148 animation.scale_z = 0.01;
1149 animation.offset_y = 0;
1150 animation.offset_x = 0;
1151 animation.offset_z = 100 * move.linear[0];
1153 float show1 = render_value(animation);
1155 animation.angle = 3;
1156 float show2 = render_value(animation);
1159 pixel.red = show1 * dist;
1160 pixel.green = (show1 - show2) * dist * 0.3;
1161 pixel.blue = (show2 - show1) * dist;
1163 if (distance[x][y] > 16) {
1169 pixel = rgb_sanity_check(pixel);
1171 setPixelColorInternal(y, x, pixel);
1182 timings.master_speed = 0.001;
1183 timings.ratio[0] = 3;
1184 timings.ratio[1] = 2;
1185 timings.ratio[2] = 1;
1186 timings.ratio[3] = 0.13;
1187 timings.ratio[4] = 0.15;
1188 timings.ratio[5] = 0.03;
1189 timings.ratio[6] = 0.025;
1190 timings.offset[0] = 0;
1191 timings.offset[1] = 100;
1192 timings.offset[2] = 200;
1193 timings.offset[3] = 300;
1194 timings.offset[4] = 400;
1195 timings.offset[5] = 500;
1196 timings.offset[6] = 600;
1198 calculate_oscillators(
1201 for (
int x = 0; x < num_x; x++) {
1202 for (
int y = 0; y < num_y; y++) {
1204 animation.dist = distance[x][y];
1206 polar_theta[x][y] + 2 * PI + move.noise_angle[5];
1207 animation.scale_x = 0.08;
1208 animation.scale_y = 0.08;
1209 animation.scale_z = 0.08;
1210 animation.offset_y = -move.linear[0];
1211 animation.offset_x = 0;
1212 animation.offset_z = 0;
1214 float show1 = render_value(animation);
1216 animation.dist = distance[x][y];
1218 polar_theta[x][y] + 2 * PI + move.noise_angle[6];
1220 animation.scale_x = 0.08;
1221 animation.scale_y = 0.08;
1222 animation.scale_z = 0.08;
1223 animation.offset_y = -move.linear[1];
1224 animation.offset_x = 0;
1225 animation.offset_z = 0;
1227 float show2 = render_value(animation);
1229 animation.angle = polar_theta[x][y] + show1 / 100 +
1230 move.noise_angle[3] + move.noise_angle[4];
1231 animation.dist = distance[x][y] + show2 / 50;
1232 animation.offset_y = -move.linear[2];
1234 animation.offset_y += show1 / 100;
1235 animation.offset_x += show2 / 100;
1237 float show3 = render_value(animation);
1239 animation.offset_y = 0;
1240 animation.offset_x = 0;
1242 float show4 = render_value(animation);
1245 pixel.green = show3 * show4 / 255;
1248 pixel = rgb_sanity_check(pixel);
1249 setPixelColorInternal(y, x, pixel);
1258 timings.master_speed = 0.0011;
1259 timings.ratio[0] = 1.5;
1260 timings.ratio[1] = 2.3;
1261 timings.ratio[2] = 3;
1262 timings.ratio[3] = 0.05;
1263 timings.ratio[4] = 0.2;
1264 timings.ratio[5] = 0.03;
1265 timings.ratio[6] = 0.025;
1266 timings.ratio[7] = 0.021;
1267 timings.ratio[8] = 0.027;
1268 timings.offset[0] = 0;
1269 timings.offset[1] = 100;
1270 timings.offset[2] = 200;
1271 timings.offset[3] = 300;
1272 timings.offset[4] = 400;
1273 timings.offset[5] = 500;
1274 timings.offset[6] = 600;
1276 calculate_oscillators(
1279 for (
int x = 0; x < num_x; x++) {
1280 for (
int y = 0; y < num_y; y++) {
1282 animation.dist = distance[x][y];
1283 animation.angle = 2 * polar_theta[x][y] + move.noise_angle[5] +
1284 move.directional[3] * move.noise_angle[6] *
1285 animation.dist / 10;
1286 animation.scale_x = 0.08;
1287 animation.scale_y = 0.08;
1288 animation.scale_z = 0.02;
1289 animation.offset_y = -move.linear[0];
1290 animation.offset_x = 0;
1291 animation.offset_z = 0;
1292 animation.z = move.linear[1];
1293 float show1 = render_value(animation);
1295 animation.angle = 2 * polar_theta[x][y] + move.noise_angle[7] +
1296 move.directional[5] * move.noise_angle[8] *
1297 animation.dist / 10;
1298 animation.offset_y = -move.linear[1];
1299 animation.z = move.linear[2];
1301 float show2 = render_value(animation);
1303 animation.angle = 2 * polar_theta[x][y] + move.noise_angle[6] +
1304 move.directional[6] * move.noise_angle[7] *
1305 animation.dist / 10;
1306 animation.offset_y = move.linear[2];
1307 animation.z = move.linear[0];
1308 float show3 = render_value(animation);
1312 pixel.red = f * (show1 + show2);
1313 pixel.green = f * (show1 - show2);
1314 pixel.blue = f * (show3 - show1);
1316 pixel = rgb_sanity_check(pixel);
1317 setPixelColorInternal(x, y, pixel);
1326 timings.master_speed = 0.0015;
1327 timings.ratio[0] = 1.5;
1328 timings.ratio[1] = 2.3;
1329 timings.ratio[2] = 3;
1330 timings.ratio[3] = 0.05;
1331 timings.ratio[4] = 0.2;
1332 timings.ratio[5] = 0.05;
1333 timings.ratio[6] = 0.055;
1334 timings.ratio[7] = 0.06;
1335 timings.ratio[8] = 0.027;
1336 timings.offset[0] = 0;
1337 timings.offset[1] = 100;
1338 timings.offset[2] = 200;
1339 timings.offset[3] = 300;
1340 timings.offset[4] = 400;
1341 timings.offset[5] = 500;
1342 timings.offset[6] = 600;
1344 calculate_oscillators(
1347 for (
int x = 0; x < num_x; x++) {
1348 for (
int y = 0; y < num_y; y++) {
1350 animation.dist = distance[x][y];
1351 animation.angle = 5 * polar_theta[x][y] + move.noise_angle[5] +
1352 move.directional[3] * move.noise_angle[6] *
1353 animation.dist / 10;
1354 animation.scale_x = 0.08;
1355 animation.scale_y = 0.08;
1356 animation.scale_z = 0.02;
1357 animation.offset_y = -move.linear[0];
1358 animation.offset_x = 0;
1359 animation.offset_z = 0;
1360 animation.z = move.linear[1];
1361 float show1 = render_value(animation);
1363 animation.angle = 6 * polar_theta[x][y] + move.noise_angle[7] +
1364 move.directional[5] * move.noise_angle[8] *
1365 animation.dist / 10;
1366 animation.offset_y = -move.linear[1];
1367 animation.z = move.linear[2];
1369 float show2 = render_value(animation);
1371 animation.angle = 6 * polar_theta[x][y] + move.noise_angle[6] +
1372 move.directional[6] * move.noise_angle[7] *
1373 animation.dist / 10;
1374 animation.offset_y = move.linear[2];
1375 animation.z = move.linear[0];
1376 animation.dist = distance[x][y] * 0.8;
1377 float show3 = render_value(animation);
1381 pixel.red = f * (show1 + show2);
1382 pixel.green = f * (show1 - show2);
1383 pixel.blue = f * (show3 - show1);
1385 pixel = rgb_sanity_check(pixel);
1386 setPixelColorInternal(y, x, pixel);
1395 run_default_oscillators();
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.03;
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);