convex-minkowski-sum
Computes the Minkowski sum of two convex polytopes encoded as sets of points
Example
var msum = //A is a triangle in 3Dvar A = 100 010 110 //B is a line segmentvar B = 0-10 010 console
Install
npm install convex-minkowski-sum
API
var msum =
msum(A,B)
Computes the Minkowski sum of A
and B
A
andB
are both arrays of vertices encoded as d-tuples of points
Returns A set of points representing the Minkowski sum of A
and B
msum.pairs(A,B)
Computes a set of pairs representing the vertices of the Minkowski sum of A
and B
A
andB
are arrays of points
Returns An array of pairs representing the vertices on the convex hull of the Minkowski sum of A
and B
msum.faces(A,B)
Computes the faces of the Minkowski sum of A
and B
A
andB
are arrays of points
Returns An array of the faces of the Minkowski sum of A
and B
represented as pairs of lists of vertices in A
and B
respectively.
Credits
(c) 2014 Mikola Lysenko. MIT License