1.0.0 • Published 11 years ago
planar-graph-to-svg v1.0.0
planar-graph-to-svg
Converts a planar graph to an SVG string
Example
var toSVG = require('planar-graph-to-svg')
var ch = require('convex-hull')
var points = []
for(var i=0; i<100; ++i) {
points.push([Math.random(), Math.random()])
}
console.log(toSVG(ch(points), points))Output:
Install
npm i planar-graph-to-svgAPI
var svg = require('planar-graph-to-svg')(edges,positions[,options])
edgesis an array of oriented edges for the planar graphpositionsis an array of vertex positionsoptionsis an array of options for the planar graph
Returns An SVG string encoding the planar graph
License
(c) 2015 Mikola Lysenko. MIT License
1.0.0
11 years ago