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

◆ Parametric_Water()

void animartrix_detail::ANIMartRIX::Parametric_Water ( )
inline

Definition at line 3334 of file animartrix_detail.hpp.

3334 {
3335
3336 get_ready();
3337
3338 timings.master_speed = 0.003; // master speed
3339
3340 timings.ratio[0] = 0.025; // speed ratios for the oscillators, higher
3341 // values = faster transitions
3342 timings.ratio[1] = 0.027;
3343 timings.ratio[2] = 0.029;
3344 timings.ratio[3] = 0.033; // speed ratios for the oscillators, higher
3345 // values = faster transitions
3346 timings.ratio[4] = 0.037;
3347 timings.ratio[5] = 0.15; // wave speed
3348 timings.ratio[6] = 0.41;
3349
3351
3352 for (int x = 0; x < num_x; x++) {
3353 for (int y = 0; y < num_y; y++) {
3354
3355 float s = 4;
3356 float f = 10 + 2 * move.directional[0];
3357
3358 animation.dist = (f + move.directional[0]) *
3359 FL_SIN_F(-move.radial[5] + move.radial[0] +
3360 (distance[x][y] / (s)));
3361 animation.angle = 1 * polar_theta[x][y];
3362 animation.z = 5;
3363 animation.scale_x = 0.1;
3364 animation.scale_y = 0.1;
3365 animation.offset_z = -10;
3366 animation.offset_y = 20 * move.linear[0];
3367 animation.offset_x = 10;
3368 animation.low_limit = 0;
3370
3371 animation.dist = (f + move.directional[1]) *
3372 FL_SIN_F(-move.radial[5] + move.radial[1] +
3373 (distance[x][y] / (s)));
3374 animation.angle = 1 * polar_theta[x][y];
3375 animation.z = 500;
3376 animation.scale_x = 0.1;
3377 animation.scale_y = 0.1;
3378 animation.offset_z = -10;
3379 animation.offset_y = 20 * move.linear[1];
3380 animation.offset_x = 10;
3381 animation.low_limit = 0;
3383
3384 animation.dist = (f + move.directional[2]) *
3385 FL_SIN_F(-move.radial[5] + move.radial[2] +
3386 (distance[x][y] / (s)));
3387 animation.angle = 1 * polar_theta[x][y];
3388 animation.z = 5000;
3389 animation.scale_x = 0.1;
3390 animation.scale_y = 0.1;
3391 animation.offset_z = -10;
3392 animation.offset_y = 20 * move.linear[2];
3393 animation.offset_x = 10;
3394 animation.low_limit = 0;
3396
3397 animation.dist = (f + move.directional[3]) *
3398 FL_SIN_F(-move.radial[5] + move.radial[3] +
3399 (distance[x][y] / (s)));
3400 animation.angle = 1 * polar_theta[x][y];
3401 animation.z = 2000;
3402 animation.scale_x = 0.1;
3403 animation.scale_y = 0.1;
3404 animation.offset_z = -10;
3405 animation.offset_y = 20 * move.linear[3];
3406 animation.offset_x = 10;
3407 animation.low_limit = 0;
3409
3410 show6 = screen(show4, show5);
3411 show7 = screen(show2, show3);
3412
3413 float radius = 40; // radius of a radial brightness filter
3414 float radial = (radius - distance[x][y]) / radius;
3415
3416 // pixel.red = show6;
3417 // pixel.blue = show7;
3418
3419 pixel.red = pixel.blue - 40;
3420 pixel.green = 0;
3421 pixel.blue = (0.3 * show6 + 0.7 * show7) * radial;
3422
3424
3426 }
3427 }
3428 }
int y
Definition simple.h:93
int x
Definition simple.h:92
#define FL_SIN_F(x)
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, FL_SIN_F, 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: