Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikolalysenko/signed-distance
Signed distance field computations for meshes
https://github.com/mikolalysenko/signed-distance
Last synced: about 2 months ago
JSON representation
Signed distance field computations for meshes
- Host: GitHub
- URL: https://github.com/mikolalysenko/signed-distance
- Owner: mikolalysenko
- Created: 2013-02-10T03:44:17.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-10-07T21:17:19.000Z (about 10 years ago)
- Last Synced: 2024-10-19T00:19:20.006Z (2 months ago)
- Language: JavaScript
- Size: 141 KB
- Stars: 11
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
signed-distance
===============
Signed distance field computations for meshesUsage & Install
===============
Via npm:npm install signed-distance
Here is how you can use it:
```js
var mesh = require("bunny");
var dist = require("signed-distance")(
require("spatial-grid")(mesh.cells, mesh.positions, 0.1),
require("normals").faceNormals(mesh.cells, mesh.positions),
[1.0, 0.0, 0.0]);
````require("signed-distance")(grid, faceNormals, point)`
------------------------------------------------------
Computes the signed distance to the mesh from `point`* `grid`: A spatial grid
* `faceNormals`: The normals of the mesh
* `point`: The point to queryReturns: The signed distance to the boundary of the mesh, or else NaN
Credit
======
(c) 2013 Mikola Lysenko. BSD