What does the centroid calculator compute?
The calculator determines the geometric area centroid of any polygonal cross-section contour. The geometry is defined either graphically in the editor or through vertex coordinates. The centroid describes the area's mean position within the chosen coordinate system -- for a beam cross-section, for example, the point through which the neutral axis passes under pure bending.
What is the area centroid?
In general, the area centroid is defined through the area integrals:
x̄ = (1/A) ∫A x dAȳ = (1/A) ∫A y dAThe centroid depends only on the geometry of the area. No material property enters the calculation -- elastic modulus, density or strength play no role for x̄ and ȳ.
Centroid of a polygon from coordinates
Instead of decomposing the area into rectangles or triangles, a straight-edged contour can be evaluated directly from the ordered sequence of its vertices. For each edge from Pi to Pi+1, ci = xi·yi+1 − xi+1·yi is formed.
A = ½ Σ cix̄ = (1/6A) Σ (xi+xi+1)ciȳ = (1/6A) Σ (yi+yi+1)ciThe points must be defined in consecutive order along the boundary. The final point is connected to the first automatically.
Centroid of symmetric cross-sections
Symmetry can immediately fix one centroid coordinate, but not necessarily both:
- Rectangle → intersection of its two symmetry axes.
- Circle → centre point.
- A profile with one symmetry axis (e.g. a T-section) → the centroid lies on that axis; the second coordinate still has to be calculated.
- An unsymmetric cross-section → no simple geometric shortcut, both coordinates must be calculated.
Can the centroid lie outside the area?
For convex polygons, the centroid always lies inside the polygon. For concave cross-sections -- such as an L- or U-shaped contour -- the centroid can, however, fall in a region with no material. This is geometrically correct, not a calculation error: the area's mean position need not coincide with a point of the area itself once the contour has reflex corners.
Area centroid vs. centre of mass
The area centroid is a purely geometric property of an area. The centre of mass additionally accounts for how mass is distributed within the component. For a prismatic body of homogeneous density, the area centroid's position in the cross-section and the projection of the centre of mass onto that cross-section coincide. With spatially varying density or multiple materials -- for example a composite steel-and-concrete section -- this no longer holds; the mass distribution then has to be weighted separately.
Relation to the second moment of area
The centroid also matters because second moments of area in beam bending are usually stated about the axes running through it. Ix, Iy and Ixy for this contour are calculated by the separate second-moment-of-area calculator for arbitrary cross-sections.
Worked example: 100 × 50 mm rectangle
Contour P1 = (0, 0), P2 = (100, 0), P3 = (100, 50), P4 = (0, 50):
A = 100 · 50 = 5.000 mm²x̄ = 50 mmȳ = 25 mmFrom these, the first moments of area about the global axes shown follow:
Qx = A·ȳ = 5.000 · 25 = 125.000 mm³Qy = A·x̄ = 5.000 · 50 = 250.000 mm³These values are also used as an automated reference test.
Scope and limitations
The calculator supports exactly one closed, non-self-intersecting outer contour made of straight edges. Holes, disconnected regions, arcs and DXF are currently excluded. The area centroid alone says nothing about strength, stiffness or mass distribution -- for that, use the second moments of area or a separate centre-of-mass calculation.