svg-3d-simplicial-complex
Renders a simplicial complex to a list of elements in an SVG file
Example
var bunny = var mat4 = mat4var render = consoleconsoleconsole
Output svg:
Install
npm install svg-3d-simplicial-complex
API
require("svg-3d-simplicial-complex")(cells,positions,[,options])
Renders a simplicial complex as a list of elements
-
cells
is an indexed list of facets -
positions
is a list of vertex positions -
options
is an object that has the following optional properties:model
the model matrix for the cameraview
the view matrix for the cameraprojection
the projection matrix for the cameraviewport
the viewport for the rendered svg
Conventions for camera and viewport follow those from WebGL
Returns A string of <polygon>
svg elements that renders the simplicial complex.
Credits
(c) 2014 Mikola Lysenko. MIT License