nonuniformRSeq

fun IMeshData.nonuniformRSeq(count: Int, shuffle: Boolean = true, random: Random = Random.Default, weightFunction: WeightFunction): List<Vector3>(source)

Generates a non-uniform sequence of 3D points based on the provided weight function, using a combination of randomized values and the R2 low-discrepancy quasirandom sequence.

Return

A list of Vector3 objects representing the generated sequence of 3D points.

Parameters

count

The number of points to generate.

shuffle

Determines whether the resulting R2 sequence should be shuffled. Default is true.

random

The source of randomness used for shuffling and random value generation. Default is Random.Default.

weightFunction

A function that computes the weight for a given vertex data and indexed polygon. This influences the distribution of points across the mesh.