The CENTROID command lets you calculate the accumulated area and overall centroid coordinates of close polylines, ellipses and circles from the drawing in a way of successive pickups. It provides three modes of centroid/area calculation; namely, they are:
Entity Mode Calculate the centroid and area of a single entity only. This is the initial default mode. The total centroid and area will be reset by the next single entity pickup. This mode is reset by the sub-command option "E".
Add Mode Add the area of the next single entity pickup to the total area. The overall centroid is also calculated. This mode is entered by the sub-command option "A".
Subtract Mode Subtract the area of the next single entity pickup from the total area. The overall centroid is also calculated. This mode is entered by the sub-command option "S".
Once the CENTROID command is entered, it will prompt
asking you to pick up the entity for the area and centroid calculation. Valid entities are polylines, circles and close ellipses. If the polyline is not closed, it will be taken as a close polyline made by adding an additional line joining its start point and end point. You may enter the sub-command option "A" and "S" to switch to the Add mode and Subtract mode, respectively. CENTROID will change the prompt to
Once a valid object is picked up, CENTROID will calculate the total area and overall centroid result and report them in the command area in the form as
and continue the prompt again, until you press space bar or <Ctrl/C> to terminate it.
As the area and centroid report message implies, the resulted area and centroid are stored in system register V0 and P0, respectively. This would help you in successive operations that may require these two values.