Comments (4)
Thank you, random stranger, I've completely forgotten, what is the purpose of the library and barely remember where I've used it. I will definitely check it out later tho!
from alpha-shape.
Were you able to figure out the meaning of the return value? I'm struggling with it even with the example in README.
from alpha-shape.
No I was not able to figure out what the return value means. Sorry...
from alpha-shape.
I analyzed demo code and figured out that return values are indices of original points array.
https://github.com/mikolalysenko/alpha-shape/blob/master/viewer.js#L45-L57
alphaHull
is the return value of the algoritm here.
points
is the original array of points.
And to get array of calculated contours you can simply use this code:
for(let i=0; i<alphaHull.length; i++) {
let cell = alphaHull[i]; // cell is calculated contour (there can be many of them)
for(var j=0; j<cell.length; j++) {
console.log(points[cell[j]]); // cell[j] contains index of contour point in original array, so we should use points[cell[j]] to get coordinates
}
}
from alpha-shape.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alpha-shape.