Noise

Noise — Functions generating noise

Functions

void lw_noise_init ()
float lw_simplex_noise_2f ()

Description

These functions may help you to add some randomness to your live wallpapers.

Functions

lw_noise_init ()

void
lw_noise_init ();

Initializes internal tables used by the simplex noise algorithm. Make sure to call this before using the lw_simplex_noise_2f() function. The tables will only be generated once so calling this multiple times has no effect.

Since: 0.4


lw_simplex_noise_2f ()

float
lw_simplex_noise_2f (float x,
                     float y);

Calculates a noise value at the position x, y using the simplex noise algorithm.

This function cannot handle negative coordinates, so make sure that x >= 0 and y >= 0.

Parameters

x

A x coordinate

 

y

A y coordinate

 

Returns

A noise value in the interval [-1;1]

Since: 0.4

Types and Values