Subject: CGAL users discussion list
List archive
[cgal-discuss] Re: Calculate volume of a convex hull (or in general of a polyhedron_3)
Chronological Thread
- From: ochyomdu <>
- To:
- Subject: [cgal-discuss] Re: Calculate volume of a convex hull (or in general of a polyhedron_3)
- Date: Thu, 8 Mar 2012 06:10:09 -0800 (PST)
Hello Dimitris.
For example, You may create mesh of Your polyhedron.
This mesh is 3D triangulation.
You may iterate over all cells
(for example with iterators triangulation.finite_cells_begin() and
triangulation.finite_cells_end())
and convert each cell into Tetrahedron
Tetrahedron tetr = triangulation.tetrahedron( Cell_handle c)
and ask for its volume
tetr.volume()
If You sum all volumes of all tetrahedrons than You get volume of
polyhedron.
I think, this solution should work.
Who knows better solution for this problem?
Regards
sgdimitris wrote
>
> Hello,
> I have used the "quickhull.cpp" example from
> "........CGAL-3.9\examples\Convex_hull_3" folder to calculate the convex
> hull of my data points.
> I want to calculate the volume of the convex hull.
> Is there any function that calculates the volume of a given Polyhedron_3?
> or any example?
> Any answer will be appreciated.
> with regard,
> Dimitris
>
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Calculate-volume-of-a-convex-hull-or-in-general-of-a-polyhedron-3-tp4455999p4456496.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Calculate volume of a convex hull (or in general of a polyhedron_3), sgdimitris, 03/08/2012
- [cgal-discuss] Re: Calculate volume of a convex hull (or in general of a polyhedron_3), ochyomdu, 03/08/2012
- [cgal-discuss] Re: Calculate volume of a convex hull (or in general of a polyhedron_3), sgdimitris, 03/08/2012
- [cgal-discuss] Re: Calculate volume of a convex hull (or in general of a polyhedron_3), hidding, 03/08/2012
- [cgal-discuss] Re: Calculate volume of a convex hull (or in general of a polyhedron_3), sgdimitris, 03/10/2012
- [cgal-discuss] Re: Calculate volume of a convex hull (or in general of a polyhedron_3), hidding, 03/08/2012
- [cgal-discuss] Re: Calculate volume of a convex hull (or in general of a polyhedron_3), sgdimitris, 03/08/2012
- [cgal-discuss] Re: Calculate volume of a convex hull (or in general of a polyhedron_3), ochyomdu, 03/08/2012
Archive powered by MHonArc 2.6.16.