Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] question about edge/boundary of convex hull

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] question about edge/boundary of convex hull


Chronological Thread 
  • From: "Vincent Wolowski" <>
  • To:
  • Subject: Re: [cgal-discuss] question about edge/boundary of convex hull
  • Date: Fri, 30 Nov 2007 16:18:25 +0100
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=tRLTUmvUQP1VOfTYibYklNrwltsz4I05uQXHkY2aRJ18JJ7cFGf29L4qoux44xkEFRNyWTXAE5F3K+zv4nZUlYs+YaKw/XnNFbXQXdx7xt9nE3A2FD0c3cais7QxRwoXrrntUP4r5omV/h3aVGyEGuVIS2lYZDWBW4pHahgiu3M=

Hello Ash,

thanks a lot for your comments!
I guess, I got confused about the convex hull (sigh).

As you said,
[...]
std::vector<K::Point_3> points;
points.push_back(K::Point_3(4.0, 11.0, 0.0));
points.push_back(K::Point_3(5.0, 6.0, 0.0));
[...]
Polyhedron_3 polyhedron;
CGAL::convex_hull_3(points.begin(), points.end(), polyhedron);
for (Vertex_iterator v = polyhedron.vertices_begin(); v !=
polyhedron.vertices_end(); ++v) {
std::cout << v->point() << std::endl;
}
[...]
works just fine to get the vertices of the convex hull.

> Since you mention the points are in 3D, I'm guessing you want the volume
> when you mention "area they are all part of". I don't know if CGAL
> provides the volume of a polyhedron. OTOH if you want the area of the
> boundary, you could sum up the areas of the boundary facets.

I will project them into 2D and then calculate the area.
That will fit what I need.
But thank you for your comment.

Best regards,
Vincent


On Nov 29, 2007 12:17 PM, Ashwin Nanjappa
<>
wrote:
> Vincent Wolowski wrote:
> [...]
> > I have a set of points in 3D, for which I would like to calculate an
> > area, they are all part of, and determine which points are on the
> > edge/boundary of the area.
> > In CGAL I found an implementation for convex hull which could be suitable.
> > But I cannot find any method that would allow to determine the
> > edge/boundary of the convex hull.
>
> Vincent, after you construct the convex hull, assign it to a Polyhedron_3
> object. You should be able to iterate through the vertices and facets of
> the polyhedron. This is the boundary you want.
>
> Since you mention the points are in 3D, I'm guessing you want the volume
> when you mention "area they are all part of". I don't know if CGAL
> provides the volume of a polyhedron. OTOH if you want the area of the
> boundary, you could sum up the areas of the boundary facets.
>
> ~ash
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://lists-sop.inria.fr/wws/info/cgal-discuss
>



Archive powered by MHonArc 2.6.16.

Top of Page