Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikolalysenko/grid-mesh
Creates a simplicial complex for a grid
https://github.com/mikolalysenko/grid-mesh
Last synced: 7 days ago
JSON representation
Creates a simplicial complex for a grid
- Host: GitHub
- URL: https://github.com/mikolalysenko/grid-mesh
- Owner: mikolalysenko
- License: mit
- Created: 2013-03-15T06:34:30.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-05-14T00:12:10.000Z (over 11 years ago)
- Last Synced: 2024-12-16T22:35:01.931Z (10 days ago)
- Language: JavaScript
- Size: 559 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
grid-mesh
=========
Creates a triangulated orthogonal grid. This is not the same as [grid-graph](https://github.com/mikolalysenko/grid-graph), since:* It only works for 2D meshes (though they can be embedded in arbitrary dimensional space)
* It fills in the facesUsage
=====
Install using npm:npm install grid-mesh
And use as follows:```javascript
console.log(require("grid-mesh")(100, 100))
````require("grid-mesh")(nx, ny[, origin, dx, dy])`
------------------------------
Creates an nx by ny sized grid mesh.* `nx` the number of subdivisions along the `dx` axis
* `ny` the number of subdivisions along the `dy` axis
* `origin` is the start coordinate for the mesh (Default: [0,0])
* `dx` the step vector along the `x` direction (Default: [1,0])
* `dy` the step vector along the `y` direction (Defulat: [0,1])**Returns** A json object with the following properties:
* `cells` the cells of the mesh
* `positions` the positions of the meshCredits
=======
(c) 2013 Mikola Lysenko. MIT License