A halton sequence implementation in js.
- haltonSequence
A 2D halton sequence generator.
- vanDerCorput
A Van der Corput sequence generator.
A 2D halton sequence generator.
Kind: global class
Constructor
| Param | Type | Default | Description |
|---|---|---|---|
| [bases] | Array |
[2,3] |
A Vector representing the bases of the sequence. |
| [seed] | Number |
1 |
The seed to start the sequence index with. |
Get the next 2d element from the halton sequence.
Kind: instance method of haltonSequence
Returns: Object - The element in form {x,y}.
A Van der Corput sequence generator.
Kind: global class
- vanDerCorput
- new vanDerCorput([base], [index])
- .compute(i, b) ⇒
Number - .getNext() ⇒
Number
Constructor
| Param | Type | Default | Description |
|---|---|---|---|
| [base] | Number |
2 |
The base. |
| [index] | Number |
1 |
The index to start the sequence with. |
Compute the given result at an index and base.
Kind: instance method of vanDerCorput
Returns: Number - The computed value of the element at the index and base.
| Param | Type | Description |
|---|---|---|
| i | Number |
The index. |
| b | Number |
The base. |
Get the next element from the sequence.
Kind: instance method of vanDerCorput
Returns: Number - The next element.