Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] center of a given polygon in CGAL

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] center of a given polygon in CGAL


Chronological Thread 
  • From: Andreas Fabri <>
  • To:
  • Subject: Re: [cgal-discuss] center of a given polygon in CGAL
  • Date: Sun, 25 Nov 2007 14:01:48 +0100

Mahmood NT wrote:
I think it a good idea to add a function for computing the center of a given polygon (centre of gravity).

It's already provided:

http://www.cgal.org/Manual/3.3/doc_html/cgal_manual/Principal_component_analysis_ref/Function_barycenter.html#Cross_link_anchor_1303


there is a good illustration at
http://local.wasp.uwa.edu.au/~pbourke/geometry/polyarea/ <http://local.wasp.uwa.edu.au/%7Epbourke/geometry/polyarea/> about how to compute centroid of a polygon. The list of functions I saw related to polygon section, are:
CGAL::area_2
CGAL::bbox_2
CGAL::bottom_vertex_2
CGAL::bounded_side_2
CGAL::is_convex_2
CGAL::is_simple_2
CGAL::left_vertex_2
CGAL::orientation_2
CGAL::oriented_side_2
CGAL::polygon_area_2
CGAL::right_vertex_2
CGAL::top_vertex_2
/ <http://www.cgal.org/Manual/3.3/doc_html/cgal_manual/Polygon_ref/Function_area_2.html#Cross_link_anchor_658>
/I am not expert in coding with CGAL style, but I think it is not hard for CGAL developers that implement more difficult algorithms.
*Mahmood NT*


------------------------------------------------------------------------
Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See how. <http://us.rd.yahoo.com/evt=51732/*http://overview.mail.yahoo.com/>



Archive powered by MHonArc 2.6.16.

Top of Page