4

How can I construct the centroid of a quadrilateral?

I suppose that it is the intersection between the lines that join the middles of opposite sides.

4 Answers4

7

You can easily convince yourself that it is not so.

Take an isoceles trapezoid. Your construction yields a point which is at half the height, though the centroid must be shifted towards the largest base.


As is shown in the animation pointed to by Dietrich Burde, you can split the quadrilateral in two triangles, two ways, construct the centroids of the triangles (intersection of the medians) and the intersection of the two segments that join them.

  • 3
    The validity of the construction depends upon the particular definition of "centroid". The "vertex centroid" is (coordinate-wise) the average of the four vertices; this point does, indeed, lie at the intersection of the bimedians. The "area centroid" is the more complicated case constructed via the centroids ("vertex" or "area", since they match) of sub-triangles. See, for instance, the "Remarkable points and lines in a convex quadrilateral" section of Wikipedia's "Quadrilateral" entry. – Blue Oct 22 '17 at 19:49
  • @Blue is right, when it comes to say finding the centroid for a non-rectangular dam and the position of the average pressure, you want the average position of the vertices, hence the point of intersection. – ch4rl1e97 Oct 20 '22 at 22:56
  • @Blue Is there a "perimeter centroid"? – Akiva Weinberger Dec 07 '23 at 07:24
  • @AkivaWeinberger: "Is there a 'perimeter centroid'?" Sure. For a polygon, it's the weighted average of the midpoints of the sides; the weights are the corresponding lengths of those sides. Wikipedia's "List of Centroids" entry gives formulas for centroids of circular arcs. Calculus exercises generally describe such a thing as "the center of mass of a thin wire of uniform density". – Blue Dec 07 '23 at 07:37
4

Draw the diagonals and find the center of triangles. enter image description here

Seyed
  • 8,933
4

Quad Centriod

(Fig1. Construction of the Centroid of a Quadrilateral - original image from this page)

Step 1: Get triangles from the quad

Get 4 triangles (red, blue, yellow, green) from the quad like the Fig1 above.

Step 2: Get centroid of the triangle

Get the centroids of 4 triangles.

Formula to get centroid I of triangle ABC

A (aX, aY) // A is the name of the point, aX and aY is the coordinate of the point A
B (bX, bY)
C (cX, cY)   
I (iX, iY)

iX = (aX + bX + cX) / 3
iY = (aY + bY + cY) / 3

Step 3: Get intersection point

Now just calculate the point of intersection between two lines which formed by the 4 centroids from step 2. That point is the centroid of the quadrilateral.

The formula to do that can be found here. But if you can read C++, check this code (I get it from github, so all credit goes to the author of that code):

///Calculate intersection of two lines.
///\return true if found, false if not found or error
bool LineLineIntersect(double x1, double y1, //Line 1 start
    double x2, double y2, //Line 1 end
    double x3, double y3, //Line 2 start
    double x4, double y4, //Line 2 end
    double &ixOut, double &iyOut) //Output 
{
    //http://mathworld.wolfram.com/Line-LineIntersection.html

    double detL1 = Det(x1, y1, x2, y2);
    double detL2 = Det(x3, y3, x4, y4);
    double x1mx2 = x1 - x2;
    double x3mx4 = x3 - x4;
    double y1my2 = y1 - y2;
    double y3my4 = y3 - y4;

    double xnom = Det(detL1, x1mx2, detL2, x3mx4);
    double ynom = Det(detL1, y1my2, detL2, y3my4);
    double denom = Det(x1mx2, y1my2, x3mx4, y3my4);
    if(denom == 0.0)//Lines don't seem to cross
    {
        ixOut = NAN;
        iyOut = NAN;
        return false;
    }

    ixOut = xnom / denom;   
    iyOut = ynom / denom;
    if(!isfinite(ixOut) || !isfinite(iyOut)) //Probably a numerical issue
        return false;

    return true; //All OK
}
0

Wittenbauer's theorem states: "Given a quadrilateral ABCD, a parallelogram is formed by dividing the sides of the quadrilateral into three equal parts, and connecting and extending adjacent points on either side of each vertex. The (area) centroid of ABCD is the center of Wittenbauer's parallelogram, i.e. the intersection of its' diagonals." (Source: Encyclopedia of Mathematics)

Another alternative way is by Behzad Khorshidi in Vol. 38 No. 3,May 2007 The College Mathematics Journal:

"Let ABCD be a quadrilateral with diagonals BD & AC intersecting at E, and take F on the line AC with CF congruent to AE. Theorem: The center of gravity of ABCD is the centroid of ∆ DBF."