API

Class Halton2DSequence

Class for generating 2D Halton sequences. From https://observablehq.com/@jrus/halton

Index
x y
  • Creates a new Halton2DSequence.

    Parameters

    • numSamples: number

      Number of samples in the sequence.

    • baseX: number = 2

      The base for the x coordinate (default: 2).

    • baseY: number = 3

      The base for the y coordinate (default: 3).

    • width: number = 1

      Factor to scale the x coordinate by (default: 1). The scaling factor is 1/width.

    • height: number = 1

      Factor to scale the y coordinate by (default: 1). The scaling factor is 1/height.

    Returns Halton2DSequence

x: 0

The x coordinate of the current sample.

y: 0

The y coordinate of the current sample.

  • Sets the dimensions of the sequence.

    Parameters

    • width: number

      Factor to scale the x coordinate by. The scaling factor is 1/width.

    • height: number

      Factor to scale the y coordinate by. The scaling factor is 1/height.

    Returns void