VARKON Version 1.15 1997-12-22
section_area - Function
Geometrical function
Description
Returns the area bounded by a planar curve. If the curve is not closed VARKON automatically closes the curve by inserting a straight line between its start and end positions. Accuracy is controlled by an optional parameter.
Syntax
section_area(curve, accuracy)
REF curve; FLOAT accuracy;
Principal parameters
curve - Identity of curve or arc
Optional parameters
accuracy - Maximum relative error of the curve arclength. Default is 0.005 = 0.5 %
Return value
A FLOAT value equal to the calculated area
Example
a:=section_area(#4);
Calculates the area for curve with ID = #4. Default numerical accuracy is used.
Comments
The area is computed by numerical integration. The number of calculations (iterations) is at least two. Smaller and smaller elements (triangles with one side equal to a short straight line, which approximates the curve) are used in each iteration and the calculation is ended when the error in the approximative arclength (the sum of the short straight lines) is less than the given accuracy, i.e. ( Total arclength - approximative arclength )/ ( Total arclength ) < accuracy.The input curve must be a planar curve. The calculation is always made, but there will be a warning (with the maximum deviation from a plane) if the curve is non-planar. The criterion is 5 X Identical points criterion (default 0.01).
The maximum number of iterations is ten (10).
VARKON Homepage | Index |