Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mikolalysenko/simplicial-layout
Generalized graph layout for simplicial complexes
https://github.com/mikolalysenko/simplicial-layout
Last synced: about 2 months ago
JSON representation
Generalized graph layout for simplicial complexes
- Host: GitHub
- URL: https://github.com/mikolalysenko/simplicial-layout
- Owner: mikolalysenko
- Created: 2013-03-22T06:25:56.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-05-10T14:56:19.000Z (over 11 years ago)
- Last Synced: 2024-10-10T21:40:16.275Z (3 months ago)
- Language: JavaScript
- Size: 115 KB
- Stars: 2
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
simplicial-layout
=================
Code for drawing simplicial complexes in arbitrary dimensions. Basically a generalized version of graph drawing for meshes and tetrahedra which works in 2D, 3D, and higher dimensions.Usage
=====
First install the library like this:npm install simplicial-layout
Then you can create a graph layout as follows:```javascript
var MeshLayout = require("simplicial-layout")var l = new MeshLayout([[0, 1, 2], [2, 3], [3,4,5]], 2)
l.solve()
console.log(l.positions)
```API
===### `var MeshLayout = require("simplicial-layout")(cells[, dimension, options])`
* `cells` - A simplicial complex
* `dimension` - The dimension of the space to embed the complex in (default 2)
* `options` - Extra options for the layout. Currently supports the following:
+ `radius` - Radius for each edge. Default 2
### `layout.step(dt)`
Steps the mesh solver a finite amount### `layout.solve()`
Solves the mesh layout completely### `layout.positions`
Positions of the verticesCredits
=======
(c) 2013 Mikola Lysenko. BSD