Subject: CGAL users discussion list
List archive
- From: Andreas Fabri <>
- To:
- Subject: Re: [cgal-discuss] center of a given polygon in CGAL
- Date: Sun, 25 Nov 2007 18:44:26 +0100
I think what I wrote is wrong. We have a function to compute the
centroid of points, but that wouldn't give you the centroid of
a polygon.
Imagine you have an equilateral triangle with additional
points on one edge. The additional points would pull the
centroid towards the edge, although the triangle is unchanged.
andreas
Alejandro M. Aragón wrote:
I think there should be a link to that in the Polygon documentation page
because I also tried to find it in the Polygon_2 class and I ended up
implementing my own function.
Regards,
a²
On Sun, 2007-11-25 at 07:58 -0800, Mahmood NT wrote:
Thanks for info, I was looking in polygon section
Mahmood NT
----- Original Message ----
From: Andreas Fabri
<>
To:
Sent: Sunday, November 25, 2007 4:31:48 PM
Subject: Re: [cgal-discuss] center of a given polygon in CGAL
Mahmood NT wrote:
I think it a good idea to add a function for computing the center ofa
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/> abouthowto compute centroid of a polygon. The list of functions I sawrelated to
polygon section, are:<http://www.cgal.org/Manual/3.3/doc_html/cgal_manual/Polygon_ref/Function_area_2.html#Cross_link_anchor_658>
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
/
/I am not expert in coding with CGAL style, but I think it is nothard
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/>
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
______________________________________________________________________
Get easy, one-click access to your favorites. Make Yahoo! your
homepage.
- Re: [cgal-discuss] center of a given polygon in CGAL, Mahmood NT, 11/25/2007
- Re: [cgal-discuss] center of a given polygon in CGAL, Alejandro M., 11/25/2007
- Re: [cgal-discuss] center of a given polygon in CGAL, Andreas Fabri, 11/25/2007
- RE: [cgal-discuss] center of a given polygon in CGAL, peter heppel, 11/26/2007
- Re: [cgal-discuss] center of a given polygon in CGAL, Andreas Fabri, 11/25/2007
- Re: [cgal-discuss] center of a given polygon in CGAL, Alejandro M., 11/25/2007
Archive powered by MHonArc 2.6.16.