Crane Balancing: Difference between revisions

From programming_contest
Jump to navigation Jump to search
imported>Kmk21
Created page with "Calculate the area/centroid of the polygon. Treat the crane as a point mass located at the centroid. Note we only care about location in X dimension. Masses can be combined by..."
 
imported>Kmk21
No edit summary
Line 5: Line 5:
[[Category:Geometry]]
[[Category:Geometry]]
[[Category:Math]]
[[Category:Math]]
[[Category:Algorithm Easy]]
[[Category:implementation Easy]]

Revision as of 17:45, 25 August 2016

Calculate the area/centroid of the polygon. Treat the crane as a point mass located at the centroid. Note we only care about location in X dimension. Masses can be combined by (x0*w0+x1*w1)/total_weight. Do some algebra to find the masses that put the x value of the COM (center of mass) within the base.