VARKON Version 1.15 1997-10-24

> ## cgrav - Function

> Geometrical function
> Description
> Returns the position of the center of gravity for a planar surface bounded by lines, arcs and curves. Optional interior holes or islands are not included. Accuracy is controlled by a step parameter.
> Syntax
> cgrav(step, ref1, refn)

> FLOAT | step;
> REF | ref1;
> REF | refn;

> Principal parameters

> step | - Step length for numerical accuracy
> ref1 | - Identity of first line, arc or curve in boundary

> Optional parameters

> refn | - Identity of additional lines, arcs or curves in exterior or interior boundary

> Return value
> A VECTOR value equal to the X and Y coordinate of the center of gravity.
> Example
> cgrav(0.05, #1, #5, #9)
> Calculates the center of gravity for an area bounded by #1, #5 and #9. Step length is set to 0.05
> Comments
> A small value for step gives a more accurate result but takes longer time to compute.
> Boundary entities can be specified in any order of choice but must form one or more well defined boundaries where all entities in each boundary are connected in their endpoints. If more than one boundary is defined one of them must enclose all the other. Boundaries should not cross or touch each other.

VARKON Homepage | Index