Advanced maths

Polyhedral solid volume centroid and inertia calculator from mesh

This calculator integrates volume, centroid and uniform-density inertia from an oriented triangular solid boundary.

Your numbers

3D rows; no unused vertices.
Zero-based indices; closed connected boundary.
Positive mass per coordinate-volume unit.

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

This calculator integrates volume, centroid and uniform-density inertia from an oriented triangular solid boundary. It sums signed tetrahedron moments about a translated origin, checks the boundary’s combinatorial closure and orientation, and converts second moments to an inertia tensor through the centroid. Nonconvex embedded solids are allowed under the stated geometry assumptions.

THE FORMULAV=Σ det(a,b,c)/6; centroid=(Σ V_t(a+b+c)/4)/V; I_c=ρ(tr(S_c)I−S_c).

A worked example

The coordinate tetrahedron with corners (0,0,0),(1,0,0),(0,1,0),(0,0,1) has volume 1/6 and centroid (1/4,1/4,1/4). At unit density, each centroidal diagonal inertia entry is 1/80 and each off-diagonal entry is 1/480. Reversing every face reverses signed volume but preserves physical mass and inertia.

Good to know

One closed connected orientable triangular manifold, consistently wound faces and positive uniform density. Assumes an embedded non-self-intersecting boundary; self-intersections are not detected. Global inward winding is normalized, mixed winding rejected. Floating-point moment integration, no variable density or separate cavity shells.

Signed tetrahedra can integrate a nonconvex solid

Each oriented boundary triangle forms a tetrahedron with a common origin. Individual signed contributions may be negative or geometrically overlap, yet their oriented sum recovers the solid integral for a valid embedded closed boundary. Taking absolute value of each contribution separately would destroy that cancellation and overcount a nonconvex shape.

The origin is shifted to an input vertex before moments are accumulated. Translation reduces cancellation when a small object is located far from the global coordinate origin. After dividing first moments by volume, the centroid is shifted back. This numerical choice changes neither the intended volume nor the physical centroid.

The coordinate tetrahedron has volume one sixth and centroid one quarter on each axisV = 1/6Centroid: (¼,¼,¼)Density: 1
The closed tetrahedron with vertices at the origin and unit coordinate axes has volume 1/6 and centroid (1/4,1/4,1/4). At density one, centroidal inertia diagonal entries are 1/80 and off-diagonal entries are 1/480.

The Convex polyhedron calculator from half space inequalities covers a related task. This page focuses on polyhedral solid volume centroid and inertia calculator from mesh with the method limits and worked example described below.

Closure and winding are necessary but not sufficient

Every edge must belong to exactly two faces, and the incident face orientations must oppose one another along that edge. The vertex-link audit additionally detects pinched configurations that edge counts alone can miss. A collection that passes those checks is a combinatorial surface, but it may still intersect itself in three-dimensional space.

The geometric embedding assumption remains the user’s responsibility. The page states that limitation before interpreting signed volume as a physical solid. A globally inward orientation is harmless after a single sign normalization, while inconsistent local winding cannot be repaired by taking an absolute total and is rejected.

Centroidal inertia differs from raw second moments

The integral of coordinate products first yields a second-moment matrix. Subtracting volume times the centroid outer product moves that matrix to centroidal coordinates. The inertia tensor then uses trace minus the second-moment matrix, with density multiplying the result. This gives the familiar negative products-of-inertia convention off the diagonal.

Inertia has mass times length squared units, while geometric second moments have length to the fifth power. The result therefore depends on density even when the centroid does not. The existing halfspace polyhedron calculator constructs convex geometry from inequalities; this page instead integrates an already supplied triangle boundary and exposes its orientation assumptions.

A few questions, answered

Can all faces be inward?

Yes. A globally consistent inward boundary gives negative signed volume, and physical moments are normalized with one overall sign.

Does this detect self-intersections?

No. The boundary must be an embedded non-self-intersecting solid surface.

Find your calculator

Start typing to explore the library.