![@thi.ng/geom-accel](https://media.thi.ng/umbrella/banners-20230807/thing-geom-accel.svg?34deae23)
![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)
This project is part of the
@thi.ng/umbrella monorepo and anti-framework.
About
n-D spatial indexing data structures with a shared ES6 Map/Set-like API.
Some implementations were ported from the Clojure version of
thi.ng/geom.
Currently available:
Status
STABLE - used in production
Search or submit any issues for this package
Installation
yarn add @thi.ng/geom-accel
ES module import:
<script type="module" src="https://cdn.skypack.dev/@thi.ng/geom-accel"></script>
Skypack documentation
For Node.js REPL:
const geomAccel = await import("@thi.ng/geom-accel");
Package sizes (brotli'd, pre-treeshake): ESM: 4.40 KB
Dependencies
Usage examples
Several demos in this repo's
/examples
directory are using this package.
A selection:
Screenshot | Description | Live demo | Source |
---|
![](https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/boid-basics.png) | Basic 2D boid simulation and spatial indexing neighbor lookups | Demo | Source |
![](https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/geom-knn.jpg) | Doodle w/ K-nearest neighbor search result visualization | Demo | Source |
![](https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/geom-knn-hash.jpg) | K-nearest neighbor search in an hash grid | Demo | Source |
![](https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/examples/geom-voronoi-mst.jpg) | Poisson-disk shape-aware sampling, Voronoi & Minimum Spanning Tree visualization | Demo | Source |
![](https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/poisson/poisson.jpg) | 2D Poisson-disc sampler with procedural gradient map | Demo | Source |
![](https://raw.githubusercontent.com/thi-ng/umbrella/develop/assets/poisson/stratified-grid.png) | 2D Stratified grid sampling example | Demo | Source |
API
Generated API docs
TODO
Authors
If this project contributes to an academic publication, please cite it as:
@misc{thing-geom-accel,
title = "@thi.ng/geom-accel",
author = "Karsten Schmidt",
note = "https://thi.ng/geom-accel",
year = 2013
}
License
© 2013 - 2023 Karsten Schmidt // Apache License 2.0