math docs
    Preparing search index...

    Function sample

    • Samples 2D Worley (cellular) noise: the Euclidean distance to the nearest of a set of feature points, one scattered per unit cell. Gives organic cell / scale / caustic patterns; values are roughly in [0, 1] (0 right at a feature point, rising between them). Threshold it for cracks, cells, or region masks.

      Parameters

      • generator: Permutation

        A generator created with create

      • x: number

        X coordinate

      • y: number

        Y coordinate

      Returns number

      The distance to the nearest feature point (F1)