Socket
Socket
Sign inDemoInstall

convex-minkowski-sum

Package Overview
Dependencies
16
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    convex-minkowski-sum

Any dimensional Minkowski sums of convex polytopes


Version published
Maintainers
1
Install size
141 kB
Created

Readme

Source

convex-minkowski-sum

Computes the Minkowski sum of two convex polytopes encoded as sets of points

Example

var msum = require('convex-minkowski-sum')

//A is a triangle in 3D
var A = [[1,0,0], [0,1,0], [1,1,0]]

//B is a line segment
var B = [[0,-1,0], [0,1,0]]

console.log(msum(A,B))

Install

npm install convex-minkowski-sum

API

var msum = require('convex-minkowski-sum')
msum(A,B)

Computes the Minkowski sum of A and B

  • A and B 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 and B 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 and B 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

Keywords

FAQs

Last updated on 08 Dec 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc