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

◆ Parametric_Water()

void animartrix_detail::ANIMartRIX::Parametric_Water ( )
inline

Definition at line 3313 of file animartrix_detail.hpp.

3313 {
3314
3315 get_ready();
3316
3317 timings.master_speed = 0.003; // master speed
3318
3319 timings.ratio[0] = 0.025; // speed ratios for the oscillators, higher
3320 // values = faster transitions
3321 timings.ratio[1] = 0.027;
3322 timings.ratio[2] = 0.029;
3323 timings.ratio[3] = 0.033; // speed ratios for the oscillators, higher
3324 // values = faster transitions
3325 timings.ratio[4] = 0.037;
3326 timings.ratio[5] = 0.15; // wave speed
3327 timings.ratio[6] = 0.41;
3328
3330
3331 for (int x = 0; x < num_x; x++) {
3332 for (int y = 0; y < num_y; y++) {
3333
3334 float s = 4;
3335 float f = 10 + 2 * move.directional[0];
3336
3337 animation.dist = (f + move.directional[0]) *
3338 sinf(-move.radial[5] + move.radial[0] +
3339 (distance[x][y] / (s)));
3340 animation.angle = 1 * polar_theta[x][y];
3341 animation.z = 5;
3342 animation.scale_x = 0.1;
3343 animation.scale_y = 0.1;
3344 animation.offset_z = -10;
3345 animation.offset_y = 20 * move.linear[0];
3346 animation.offset_x = 10;
3347 animation.low_limit = 0;
3349
3350 animation.dist = (f + move.directional[1]) *
3351 sinf(-move.radial[5] + move.radial[1] +
3352 (distance[x][y] / (s)));
3353 animation.angle = 1 * polar_theta[x][y];
3354 animation.z = 500;
3355 animation.scale_x = 0.1;
3356 animation.scale_y = 0.1;
3357 animation.offset_z = -10;
3358 animation.offset_y = 20 * move.linear[1];
3359 animation.offset_x = 10;
3360 animation.low_limit = 0;
3362
3363 animation.dist = (f + move.directional[2]) *
3364 sinf(-move.radial[5] + move.radial[2] +
3365 (distance[x][y] / (s)));
3366 animation.angle = 1 * polar_theta[x][y];
3367 animation.z = 5000;
3368 animation.scale_x = 0.1;
3369 animation.scale_y = 0.1;
3370 animation.offset_z = -10;
3371 animation.offset_y = 20 * move.linear[2];
3372 animation.offset_x = 10;
3373 animation.low_limit = 0;
3375
3376 animation.dist = (f + move.directional[3]) *
3377 sinf(-move.radial[5] + move.radial[3] +
3378 (distance[x][y] / (s)));
3379 animation.angle = 1 * polar_theta[x][y];
3380 animation.z = 2000;
3381 animation.scale_x = 0.1;
3382 animation.scale_y = 0.1;
3383 animation.offset_z = -10;
3384 animation.offset_y = 20 * move.linear[3];
3385 animation.offset_x = 10;
3386 animation.low_limit = 0;
3388
3389 show6 = screen(show4, show5);
3390 show7 = screen(show2, show3);
3391
3392 float radius = 40; // radius of a radial brightness filter
3393 float radial = (radius - distance[x][y]) / radius;
3394
3395 // pixel.red = show6;
3396 // pixel.blue = show7;
3397
3398 pixel.red = pixel.blue - 40;
3399 pixel.green = 0;
3400 pixel.blue = (0.3 * show6 + 0.7 * show7) * radial;
3401
3403
3405 }
3406 }
3407 }
uint32_t x[NUM_LAYERS]
Definition Fire2023.ino:82
uint32_t y[NUM_LAYERS]
Definition Fire2023.ino:83
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
float screen(float &a, float &b)

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

+ Here is the call graph for this function: