Center of a irregular hexahedra given the vertices

1. Jul 9, 2015

pyroknife

I am trying to compute the center of irregular convex hexahedras (6 faced volume).

I have the 8 indices that define the hexahedra. I was reading that the center is simply the sum of the indices divided by the number of indices and this is true for all polygons and polyhedras. Is this true?

Last edited: Jul 9, 2015
2. Jul 9, 2015

Staff: Mentor

How do you define "center" in an irregular shape?

3. Jul 9, 2015

pyroknife

I am asking myself that same question. I believe I am referring to the geometrical/spatial center, but I am not positive.

Basically I have a 3-D structured mesh grid, with cells. And I am trying to find the "center" of that cell.
I believe it is a volume-based center?

Hmmmm, if it is a volume based center, then an averaging of the vertices would not yield the center of volume.

4. Jul 9, 2015

Staff: Mentor

What do you mean by "geometrical/spatial center"?

There is a center of mass with a clear definition, for example. There might be other well-defined points, but you have to decide what you are actually looking for. "The center" is too unclear.

5. Jul 9, 2015

pyroknife

I will look into this and figure out what it is that I actually want.

What "type of center" does an averaging of all the nodal points provide?

6. Jul 11, 2015

Staff: Mentor

I'm not sure if that point has any special meaning.

7. Jul 11, 2015

HallsofIvy

Staff Emeritus
The "centroid" of a triangle has coordinates equal to the average of the coordinates of the vertices. Other figures, such as a hexagon, can be divided into triangles. The coordinates of the centroid of such a figure is the weighted average of the coordinates of the centroids of the triangles, weighted by area.

8. Jul 21, 2015

stedwards

Start with a cube. Take four of the corners and bring them close together so that the cube becomes something close to a four sided pyramid in shape. The average of the eight corner z coordinates is one 1/2 half of the height, but the center of mass is only 1/4 the height.

Last edited: Jul 21, 2015