This project is part of the @thi.ng/umbrella monorepo.
n-dimensional low-discrepancy sequence generators/iterators.
This package provides the following n-dimensional low-discrepancy sequence generators, partially based on the article The Unreasonable Effectiveness of Quasirandom Sequences by Martin Roberts.
Configurable basis for each dimension:
haltonND([2,3])
Configurable basis for each dimension:
kroneckerND([1 / 2 ** 0.5, 1 / 5 ** 0.5])
Based on Kronecker with each dimension's base automatically derived from the Plastic number:
plasticND(2)
BETA - possibly breaking changes forthcoming
Search or submit any issues for this package
- @thi.ng/poisson - nD Stratified grid and Poisson-disc sampling w/ support for spatial density functions and custom PRNGs
- @thi.ng/random - Pseudo-random number generators w/ unified API, distributions, weighted choices, ID generation
yarn add @thi.ng/lowdisc
ES module import:
<script type="module" src="https://cdn.skypack.dev/@thi.ng/lowdisc"></script>
For NodeJS (v14.6+):
node --experimental-specifier-resolution=node --experimental-repl-await
> const lowdisc = await import("@thi.ng/lowdisc");
Package sizes (gzipped, pre-treeshake): ESM: 499 bytes
TODO
Karsten Schmidt
If this project contributes to an academic publication, please cite it as:
@misc{thing-lowdisc,
title = "@thi.ng/lowdisc",
author = "Karsten Schmidt",
note = "https://thi.ng/lowdisc",
year = 2020
}
© 2020 - 2021 Karsten Schmidt // Apache Software License 2.0