# alpha-complex

Computes the alpha complex of a point set in any dimension

## Stats

StarsIssuesVersionUpdatedCreatedSize
alpha-complex
1.0.07 years ago7 years ago alpha-complex
Alpha shapes are a generalization of Delaunay triangulations. Given a parameter `alpha` and a point set, they compute a simplicial complex which covers the point set in simplices whose circum radii are less than `1/alpha`.
To see this in action, try out the demo Example
``````var alphaComplex = require('alpha-complex')

var points = []
for(var i=0; i<100; ++i) {
points.push([Math.random(), Math.random()])
}

console.log(alphaComplex(0.1, points))``````
Install
This module works in node.js/iojs/browserify and supports point sets in any dimension.
``npm i alpha-complex``
API

#### `var cells = require('alpha-complex')(alpha, points)`

Constructs the alpha complex of the given set of points.
• `alpha` is the curvature of the alpha complex
• `points` is a list of points encoded as arrays

Returns The alpha-complex of the point set.
{"ft_lang_label":"__label__en","ft_lang_prob":0.65853655,"math_prob":0.9753242,"size":853,"snap":"2022-27-2022-33","text_gpt3_token_len":211,"char_repetition_ratio":0.17078917,"word_repetition_ratio":0.0,"special_character_ratio":0.22977726,"punctuation_ratio":0.11949685,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9873494,"pos_list":[0,1,2,3,4],"im_url_duplicate_count":[null,2,null,2,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-08-10T08:10:39Z\",\"WARC-Record-ID\":\"<urn:uuid:215225ba-5b48-4893-a2c7-9d1e6c953c5a>\",\"Content-Length\":\"30354\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:4d2edf85-e68c-4eaa-83a9-1e08e6da30de>\",\"WARC-Concurrent-To\":\"<urn:uuid:c9184a9f-3c7d-4dcb-8b39-f589a2d5372b>\",\"WARC-IP-Address\":\"76.76.21.21\",\"WARC-Target-URI\":\"https://npmtrends.com/alpha-complex\",\"WARC-Payload-Digest\":\"sha1:UXA2GCDIMRTS3LDAZ3VGPA3ZH3NZQZR5\",\"WARC-Block-Digest\":\"sha1:XWVN5VIJPD6BEJCN6GOQJOJ3WI5YKHOH\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-33/CC-MAIN-2022-33_segments_1659882571150.88_warc_CC-MAIN-20220810070501-20220810100501-00022.warc.gz\"}"}