How to find centroid or center of a 3D irregular shape

63 views (last 30 days)
I would like find the centroid or center of a 3D irregular shape from its data set of x,y,z coordinates. How do i go about it?

Accepted Answer

Star Strider
Star Strider on 24 May 2019
The centroid is defined as the arithmetic mean of the points, so just do that in each (x,y,z) dimension.
  4 Comments
Arto
Arto on 21 Feb 2022
I think this is not the correct answer if the xyz coords. describe the vertices of the irregular 3D shape.
Use polygonCentroid3d in stead.
Joseph Olson
Joseph Olson on 21 Feb 2022
I agree with Arto. The mean is not appropriate to use if the points defining the object are not uniformly sampled and distributed such that the mean will be the same as the centroid. Think of a cube-ish shape where there are many points/vertices on one face but very few on the opposite face. The mean will give a value biased towards the dense face.

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!