{"_id":"simplify-2d-complex","_rev":"7-27eb4b9314627c736fd1fa504e6539d5","name":"simplify-2d-complex","description":"Simplifies a 2D polygonal region","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.0":{"name":"simplify-2d-complex","version":"0.0.0","description":"Simplifies a 2D polygonal region","main":"simplify.js","directories":{"test":"test"},"dependencies":{"robust-orientation":"^1.0.1","simplicial-complex":"^0.3.3"},"devDependencies":{"tape":"~2.12.3"},"scripts":{"test":"tape test/*.js"},"repository":{"type":"git","url":"git://github.com/mikolalysenko/simplify-2d-complex.git"},"keywords":["polygon","simplify","region","vertex","collapse"],"author":{"name":"Mikola Lysenko"},"license":"MIT","bugs":{"url":"https://github.com/mikolalysenko/simplify-2d-complex/issues"},"homepage":"https://github.com/mikolalysenko/simplify-2d-complex","_id":"simplify-2d-complex@0.0.0","dist":{"shasum":"fb5c7382e877a49fbbfc7dc30477f32e18726ed0","tarball":"https://registry.npmjs.org/simplify-2d-complex/-/simplify-2d-complex-0.0.0.tgz","integrity":"sha512-CjzCQk8rYDn+pj4WUYJi3F8G/Ky2e8aNE8ur80pMNj8hhbW2uB4O4xa+soP7/AGUzt2YH4aF01oCqC1JFbCnPw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDhzoYTAO2SlgmNG9PDQR+tkLo/c7AkXRq89iMp+S3VvAIgautYaPExVKdmiCl4DuCdNEowDSp0/Vuj3sEopex1OC0="}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}],"deprecated":"Moved to simplify-planar-graph"},"1.0.0":{"name":"simplify-2d-complex","version":"1.0.0","description":"Simplifies a 2D polygonal region","main":"simplify.js","directories":{"test":"test"},"dependencies":{"robust-orientation":"^1.0.1","simplicial-complex":"^0.3.3"},"devDependencies":{"tape":"~2.12.3"},"scripts":{"test":"tape test/*.js"},"repository":{"type":"git","url":"git://github.com/mikolalysenko/simplify-2d-complex.git"},"keywords":["polygon","simplify","region","vertex","collapse"],"author":{"name":"Mikola Lysenko"},"license":"MIT","bugs":{"url":"https://github.com/mikolalysenko/simplify-2d-complex/issues"},"homepage":"https://github.com/mikolalysenko/simplify-2d-complex","_id":"simplify-2d-complex@1.0.0","dist":{"shasum":"59080b6d874ac088ddd84971b5666ba0825771f0","tarball":"https://registry.npmjs.org/simplify-2d-complex/-/simplify-2d-complex-1.0.0.tgz","integrity":"sha512-E27QONj+Ukucpun74SpIZ8WW6ZjqywdPhoDeE5Y7TMf0rXHOfiEbDOsQeJenU1TxDyaIv+0OcdEwC7fIW8FWAQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCcRoqI2lu2dqgtXD2BmFlnoHXUmn8GX8Jl3utahV/PZwIhAOGGP137EU+AV4OPjnEuocMG/C/lV3tYe+7vna8j9JF0"}]},"_from":".","_npmVersion":"1.4.3","_npmUser":{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"},"maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}],"deprecated":"Moved to simplify-planar-graph"}},"readme":"simplify-2d-complex\n===================\nSimplifies a 2D simplicial complex by removing small or nearly flat corners.\n\n# Example\n\n```javascript\nvar simplify = require(\"simplify-2d-complex\")\n\n//Create a circle\nvar points = []\nvar cells = []\nfor(var i=0; i<100; ++i) {\n  var theta = i / 100 * Math.PI * 2.0\n  points.push([Math.cos(theta), Math.sin(theta)])\n  cells.push([i, (i+1)%100])\n}\n\n//Simplify it\nconsole.log(simplify(points, cells, 0.1))\n```\n\nOutput:\n\n```javascript\n{ positions:\n   [ [ 0.6845471059286886, 0.7289686274214116 ],\n     [ 0.24868988716485496, 0.9685831611286311 ],\n     [ -0.6374239897486897, 0.7705132427757893 ],\n     [ -0.9297764858882513, 0.36812455268467814 ],\n     [ -0.9510565162951535, -0.30901699437494773 ],\n     [ -0.7705132427757893, -0.6374239897486896 ],\n     [ -0.2486898871648553, -0.968583161128631 ],\n     [ 0.6374239897486893, -0.7705132427757896 ],\n     [ 0.9980267284282716, -0.06279051952931326 ] ],\n  cells:\n   [ [ 0, 1 ],\n     [ 1, 2 ],\n     [ 2, 3 ],\n     [ 3, 4 ],\n     [ 8, 0 ],\n     [ 4, 5 ],\n     [ 5, 6 ],\n     [ 6, 7 ],\n     [ 7, 8 ] ] }\n```\n\n# Install\n\n```\nnpm install simplify-2d-complex\n```\n\n# API\n\n#### `require(\"simplify-2d-complex\")(cells, positions, minArea)`\nSimplies the 2D mesh to a fixed tolerance\n\n* `cells` is a collection of edges in the 2D mesh represented as pairs of indices into the vertices\n* `positions` is a list of vertex coordinates encoded as an array of 2D arrays\n* `minArea` is the area of the smallest corner in the resulting polygonal region\n\n**Returns** A simplicial complex with two properties:\n\n* `positions` is an array of positions for the simplicial complex\n* `cells` is an array of edges encoding the cells of the mesh\n\n# Credits\n(c) 2014 Mikola Lysenko. MIT License","maintainers":[{"name":"mikolalysenko","email":"mikolalysenko@gmail.com"}],"time":{"modified":"2022-06-26T20:07:44.642Z","created":"2014-04-10T22:07:18.226Z","0.0.0":"2014-04-10T22:07:18.226Z","1.0.0":"2014-04-11T03:13:39.464Z"},"homepage":"https://github.com/mikolalysenko/simplify-2d-complex","keywords":["polygon","simplify","region","vertex","collapse"],"repository":{"type":"git","url":"git://github.com/mikolalysenko/simplify-2d-complex.git"},"author":{"name":"Mikola Lysenko"},"bugs":{"url":"https://github.com/mikolalysenko/simplify-2d-complex/issues"},"license":"MIT","readmeFilename":"README.md"}