NAME
get_ordered_polygon_CM_and_area - Finds the CM and area of a polygon
SYNOPSIS
#include "g/g_geometry.h"
Example compile flags (system dependent):
-DLINUX_X86_64 -DLINUX_X86_64_OPTERON -DGNU_COMPILER
-I/home/kobus/include
-L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
-lKJB -lfftw3 -lgsl -lgslcblas -ljpeg -lSVM -lstdc++ -lpthread -lSLATEC -lg2c -lacml -lacml_mv -lblas -lg2c -lncursesw
int get_ordered_polygon_CM_and_area
(
const Matrix *points_mp,
Vector **cm_vpp,
double *area_ptr
);
DESCRIPTION
This routine finds the center of mass and area of a polygon. The polygon is
specified by a list of points in cyclacle order placed in the rows of the
matrix point_mp. The points can be of any dimension, but this routine assumes
that they lie in a 2-D subspace. Either output argument can be set to NULL,
in which case, that output is not returned.
RETURNS
NO_ERROR on success, and ERROR on failure, with an error message being
set.
NOTE
If the points are out of order, then this routine will not work! If the
points are not known to be in order, then it is best to use
get_polygon_CM_and_area().
DISCLAIMER
This software is not adequatedly tested. It is recomended that
results are checked independantly where appropriate.
AUTHOR
Kobus Barnard
DOCUMENTER
Kobus Barnard
SEE ALSO
get_polygon_CM_and_area
,
is_point_in_segment
,
is_point_in_polygon
,
order_planer_points