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.
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.
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.

(Fig1. Construction of the Centroid of a Quadrilateral - original image from this page)
Get 4 triangles (red, blue, yellow, green) from the quad like the Fig1 above.
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
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
}
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."