uniformCube

fun <T : LinearType<T>> SimplexRange2D<T>.uniformCube(random: Random): T(source)

Generates a random point within the simplex represented by the SimplexRange2D, forming an interpolation of the three control points x0, x1, x2 using a weighted random combination normalized to sum to 1.

Return

A randomly interpolated point of type T within the simplex.

Parameters

random

The random number generator used to produce the random weights.


fun <T : LinearType<T>> SimplexRange3D<T>.uniformCube(random: Random): T(source)

Generates a random point within the simplex represented by the SimplexRange3D, forming an interpolation of the four control points using a weighted random combination normalized to sum to 1.

Return

A randomly interpolated point of type T within the simplex.

Parameters

random

The random number generator used to produce the random weights.


fun <T : LinearType<T>> SimplexRange4D<T>.uniformCube(random: Random): T(source)

Generates a random point within the simplex represented by the SimplexRange4D, forming an interpolation of the five control points using a weighted random combination normalized to sum to 1.

Return

A randomly interpolated point of type T within the simplex.

Parameters

random

The random number generator used to produce the random weights.