Class Halton2DSequence
Index
Constructors
constructor
-
new Halton2DSequence(
numSamples: number,
baseX?: number,
baseY?: number,
width?: number,
height?: number,
): Halton2DSequenceCreates 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
- numSamples: number
Properties
Readonlyx
x: 0
The x coordinate of the current sample.
Readonlyy
y: 0
The y coordinate of the current sample.
Methods
next
-
Advances to the next sample in the sequence.
Returns void
regenerate
-
Regenerates the sequence with a new number of samples.
Parameters
- numSamples: number
Number of samples in the sequence.
Returns void
- numSamples: number
set Dimensions
-
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
- width: number
Class for generating 2D Halton sequences. From https://observablehq.com/@jrus/halton