FastLED 3.9.15
Loading...
Searching...
No Matches

◆ Caleido3()

void animartrix_detail::ANIMartRIX::Caleido3 ( )
inline

Definition at line 996 of file animartrix_detail.hpp.

996 {
997
998 get_ready();
999
1000 timings.master_speed = 0.004; // speed ratios for the oscillators
1001 timings.ratio[0] = 0.02; // higher values = faster transitions
1002 timings.ratio[1] = 0.03;
1003 timings.ratio[2] = 0.04;
1004 timings.ratio[3] = 0.05;
1005 timings.ratio[4] = 0.6;
1006 timings.offset[0] = 0;
1007 timings.offset[1] = 100;
1008 timings.offset[2] = 200;
1009 timings.offset[3] = 300;
1010 timings.offset[4] = 400;
1011
1013 timings); // get linear movers and oscillators going
1014
1015 for (int x = 0; x < num_x; x++) {
1016 for (int y = 0; y < num_y; y++) {
1017
1018 // describe and render animation layers
1019 animation.dist = distance[x][y] * (2 + move.directional[0]) / 3;
1020 animation.angle = 2 * polar_theta[x][y] +
1021 3 * move.noise_angle[0] + move.radial[4];
1022 animation.scale_x = 0.1; // + (move.directional[0] + 2)/100;
1023 animation.scale_y = 0.1; // + (move.directional[1] + 2)/100;
1024 animation.scale_z = 0.1;
1025 animation.offset_y = 2 * move.linear[0];
1026 animation.offset_x = 2 * move.linear[1];
1027 animation.offset_z = 0;
1028 animation.z = move.linear[0];
1029 float show1 = render_value(animation);
1030
1031 animation.dist = distance[x][y] * (2 + move.directional[1]) / 3;
1032 animation.angle = 2 * polar_theta[x][y] +
1033 3 * move.noise_angle[1] + move.radial[4];
1034 animation.offset_x = 2 * move.linear[1];
1035 animation.offset_y = show1 / 20.0;
1036 animation.z = move.linear[1];
1037 float show2 = render_value(animation);
1038
1039 animation.dist = distance[x][y] * (2 + move.directional[2]) / 3;
1040 animation.angle = 2 * polar_theta[x][y] +
1041 3 * move.noise_angle[2] + move.radial[4];
1042 animation.offset_y = 2 * move.linear[2];
1043 animation.offset_x = show2 / 20.0;
1044 animation.z = move.linear[2];
1045 float show3 = render_value(animation);
1046
1047 animation.dist = distance[x][y] * (2 + move.directional[3]) / 3;
1048 animation.angle = 2 * polar_theta[x][y] +
1049 3 * move.noise_angle[3] + move.radial[4];
1050 animation.offset_x = 2 * move.linear[3];
1051 animation.offset_y = show3 / 20.0;
1052 animation.z = move.linear[3];
1053 float show4 = render_value(animation);
1054
1055 // colormapping
1056 float radius = radial_filter_radius; // radial mask
1057
1058 pixel.red = show1 * (y + 1) / num_y;
1059 pixel.green = show3 * distance[x][y] / 10;
1060 pixel.blue = (show2 + show4) / 2;
1061 if (distance[x][y] > radius) {
1062 pixel.red = 0;
1063 pixel.green = 0;
1064 pixel.blue = 0;
1065 }
1066
1068
1070 }
1071 }
1072 }
int y
Definition simple.h:93
int x
Definition simple.h:92
fl::HeapVector< fl::HeapVector< float > > distance
float render_value(render_parameters &animation)
void calculate_oscillators(oscillators &timings)
virtual void setPixelColorInternal(int x, int y, rgb pixel)=0
fl::HeapVector< fl::HeapVector< float > > polar_theta

References animation, calculate_oscillators(), distance, get_ready(), move, num_x, num_y, pixel, polar_theta, radial_filter_radius, render_value(), rgb_sanity_check(), setPixelColorInternal(), show1, show2, show3, show4, timings, x, and y.

+ Here is the call graph for this function: