How can I construct the centroid of a quadrilateral?

$\begingroup$

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.

$\endgroup$ 1

3 Answers

$\begingroup$

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.

$\endgroup$ 1 $\begingroup$

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

$\endgroup$ $\begingroup$

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
{ // 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
}
$\endgroup$

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like