tomilov / quickhull

Header-only single-class implementation of Quickhull algorithm for convex hulls finding in arbitrary dimension (>1) space.
https://habr.com/ru/articles/245221/
70 stars 8 forks source link

Is there a way to compute the centroid of the convex hull? #13

Closed wangxi0706 closed 1 year ago

wangxi0706 commented 1 year ago

Hi! It seems only the facets are readily available as outputs. Is there a way to use facets to compute the centroid of the convex hull?

tomilov commented 1 year ago

You can put all the vertices to std::unordered_set then calculate mean. This is outside of what is repo for.

wangxi0706 commented 1 year ago

Thanks!