PolyObjectArea

Section: C Library Functions (3)
Updated: IRIT Version 6.0
Index Return to Main Contents
 

NAME

PolyObjectArea()  

SYNOPSIS

geom_lib/geomvals.c:51

double PolyObjectArea(IPObjectStruct *PObj)
 

DESCRIPTION

Routine to evaluate the Area of the given geom. object, in object unit.
 Algorithm (for each polygon):                                 V3
 1. Set Polygon Area to be zero.                              /\
    Make a copy of the original polygon                     /    \
    and transform it to a XY parallel plane.              /        \V2
    Find the minimum Y value of the polygon           V4/           |
    in the XY plane.                                    \           |
 2. Let V(0) be the first vertex, V(n) the last one.      \         |
    For i goes from 0 to n-1 add to Area the area           \_______|
    below edge V(i), V(i+1):                                V0      V1
    PolygonArea += (V(i+1)x - V(i)x) * (V(i+1)y' - V(i)y') / 2
    where V(i)y' is V(i)y - MinY, where MinY is polygon minimum Y value.
 3. The result of step 2 is the area of the polygon itself.
    However, it might be negative, so take the absolute result of step 2
    and add it to the global ObjectArea. Note step 2 is performed by another auxiliary routine: PolygonXYArea.  

PARAMETERS:

PObj: A polyhedra object to compute its surface area.  

FUNCTION RETURN VALUE

double: The area of object PObj.

 

ORIGIN

(C) Copyright 1989/90-95 Gershon Elber, Technion, IIT


 

Index

NAME
SYNOPSIS
DESCRIPTION
PARAMETERS:
FUNCTION RETURN VALUE
ORIGIN

This document was created by man2html, using the manual pages.
Time: 07:26:53 GMT, July 20, 2024