Subject: CGAL users discussion list
List archive
- From: "Wesley Smith" <>
- To:
- Subject: Re: [cgal-discuss] 3D Delaunay Triangulation
- Date: Fri, 14 Sep 2007 13:57:33 -0700
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=PEj0vosp4VtgodT7S0xZSThAmXWmMO8mnOSR4cb1JoXa7oLx8N6LZyGcsfh6R1py4AbLpyWrylYEg0cJpxVWB+JIaFjCwKgWOBhmY/wv8hVoE8p3YqQ1/RJS2tTOzauBlARVTb99bQ47HuGc51pdUOyVc5C+4argjgayAi72JlI=
Hi Andreas,
Thanks so much for the help. Indeed you're right. I feel retarded.
I had modified the same source but forgot to change one number. I had
this:
// insertion from a vector :
std::vector<Point> V(3);
V[0] = Point(0,0,1);
n = n + T->insert(V.begin(), V.end());
instead of what should've been this:
// insertion from a vector :
std::vector<Point> V(1);
V[0] = Point(0,0,1);
n = n + T->insert(V.begin(), V.end());
Seems the extra vector components added duplicate (0, 0, 0) entries
creating the degenerate cells. On the bright side I have read the
docs a number of times now and have a better grasp of the software.
best,
wes
On 9/14/07, Andreas Fabri
<>
wrote:
> Wesley Smith wrote:
> > So here's a question. If I'm iterating over all of the finite cells
> > and the reason I'm getting 4 cells instead of 1 for 4 points in a
> > triangulation_3 is that the convex hull of the triangulation has faces
> > with cells going to the "fictional" infinite point, then shouldn't
> > those cells not be accessible via the finite iterator?
>
> I just modified the example file simple.cpp slighlty,
> and can't reproduce your finding.
>
> Are you sure to iterator over finite_cells and not over finite_faces,
> because for the latter there should be 4.
>
> andreas
>
>
> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
> #include <CGAL/Triangulation_3.h>
>
> #include <iostream>
> #include <fstream>
> #include <cassert>
> #include <list>
> #include <vector>
>
> typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
>
> typedef CGAL::Triangulation_3<K> Triangulation;
>
> typedef Triangulation::Cell_handle Cell_handle;
> typedef Triangulation::Vertex_handle Vertex_handle;
> typedef Triangulation::Locate_type Locate_type;
> typedef Triangulation::Point Point;
>
> int main()
> {
> // construction from a list of points :
> std::list<Point> L;
> L.push_front(Point(0,0,0));
> L.push_front(Point(1,0,0));
> L.push_front(Point(0,1,0));
>
> L.push_front(Point(0,0,1));
> Triangulation T(L.begin(), L.end());
>
> for(Triangulation::Finite_cells_iterator it = T.finite_cells_begin();
> it != T.finite_cells_end();
> ++it){
> std::cout << "oops" << std::endl;
> }
>
> return 0;
> >
> > wes
> >
> > On 9/14/07, Andreas Fabri
> > <>
> > wrote:
> >> Wesley Smith wrote:
> >>>> Then you will se that entire R^3 gets triangulated which
> >>>> means that there is one additional tetrahedron per face
> >>>> of the convex hull that has as fourth vertex the, unique,
> >>>> infinite vertex.
> >>> Thanks for pointing this out. I've been reading through the manual
> >>> and reference manual quite thoroughly but haven't found a way to
> >>> filter these out. Is there a function such as is_infinite for the
> >>> cells? I don't see anything like this. I just need a simple test for
> >>> this. Any help is greatly appreciated.
> >> ok, so my rtfm doesn't apply here ==:>-
> >>
> >>
> >> As we use derivation, much of the functionality of the Delaunay
> >> triangulation is documented in the base class Triangulation_2
> >>
> >> Go to section "Refines" and click.
> >>
> >> Note that even this class has a further base class.
> >>
> >> Some of the documentation is also in the Vertex and Cell class.
> >>
> >> Also note that there is a user manual which explains things
> >> and gives examples, and the reference manual which is just the
> >> documentation of the API.
> >>
> >> best,
> >>
> >> andreas
> >>
> >>
> >>> thanks,
> >>> wes
> >> --
> >> You are currently subscribed to cgal-discuss.
> >> To unsubscribe or access the archives, go to
> >> https://lists-sop.inria.fr/wws/info/cgal-discuss
> >>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://lists-sop.inria.fr/wws/info/cgal-discuss
>
- 3D Delaunay Triangulation, Wesley Smith, 09/14/2007
- Re: [cgal-discuss] 3D Delaunay Triangulation, Andreas Fabri, 09/14/2007
- Re: [cgal-discuss] 3D Delaunay Triangulation, Wesley Smith, 09/14/2007
- Re: [cgal-discuss] 3D Delaunay Triangulation, Andreas Fabri, 09/14/2007
- Re: [cgal-discuss] 3D Delaunay Triangulation, Wesley Smith, 09/14/2007
- Re: [cgal-discuss] 3D Delaunay Triangulation, Andreas Fabri, 09/14/2007
- Re: [cgal-discuss] 3D Delaunay Triangulation, Wesley Smith, 09/14/2007
- Re: [cgal-discuss] 3D Delaunay Triangulation, Andreas Fabri, 09/14/2007
- Re: [cgal-discuss] 3D Delaunay Triangulation, Wesley Smith, 09/14/2007
- Re: [cgal-discuss] 3D Delaunay Triangulation, Andreas Fabri, 09/14/2007
- Re: [cgal-discuss] 3D Delaunay Triangulation, Wesley Smith, 09/14/2007
- Re: [cgal-discuss] 3D Delaunay Triangulation, Andreas Fabri, 09/14/2007
Archive powered by MHonArc 2.6.16.