HOME GUIDE OPERATIONS DOCS FAQ TECHNIQUES FORMATS INSTALL NEW TIPS WEB LINKS WADSWORTH

CG PH - Center of Gravity - Phase approximation ||

(3/17/05)

PURPOSE

Compute center of gravity using phase approximation. The operation works for a 2-D or 3-D density distribution.

SEE ALSO

CG [Center of Gravity]
CG 3 [Center of Gravity - Radius of gyration]
SH [Shift - using bilinear interpolation ||]

USAGE

.OPERATION: CG PH X11,X12,X21,X22

or:
CG PH X11,X12, X13,X21,X22,X23

.INPUT FILE: FIL001
[Enter name of file containing the 2-D or 3-D density distribution.]

NOTES

  1. Register variables X11, X12 (and X13 in 3-D case) contain integer approximation of the center of gravity coordinates. Registers X21, X22 (and X23 in 3-D case) contain real number coordinates of the center of gravity. Coordinates are given in the X, Y, Z order.
    To place the center of gravity at the origin one has to use 'SH' ('SH 3') operation and reverse the signs of the shifts.

  2. Implemented by P. Penczek.

  3. This operation sometimes reports incorrect center (at the upper left corner) for rotationally symmetric objects. The error is sporadic even when given the same input file. The implementor states: 'The code is correct. The operation is not foolproof; it sometimes fails'.

SUBROUTINES

CENT, CENT_3, CENT_D

CALLER

UTIL1

© Copyright Notice /       Enquiries: spider@wadsworth.org

BACK TO SPIDER BACK TO WADSWORTH