Problem 1264. Center of mass

Created by Marco Castelli

Given a matrix M(m,n), where m is the number of vertices of the geometrical element and n is 2 or 3 (2D-plane figure or 3D-solid). M contains coordinates of the vertices C=[x,y,z].

Find C, the center of mass of the element.

Tags

Problem Group

26 solvers submitted 30 solutions (1.15 solutions/solver).

Solution Comments