What's the best way to calculate a 3D (or n-D) centroid?

后端 未结 8 470
萌比男神i
萌比男神i 2021-02-04 00:35

As part of a project at work I have to calculate the centroid of a set of points in 3D space. Right now I\'m doing it in a way that seems simple but naive -- by taking the avera

8条回答
  •  别跟我提以往
    2021-02-04 00:59

    Yes that is the correct formula.

    If you have a large number of points you can exploit the symmetry of the problem (be it cylindrical, spherical, mirror). Otherwise, you can borrow from statistics and average a random number of the points and just have a bit of error.

提交回复
热议问题