Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Problem with Line_walk

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Problem with Line_walk


Chronological Thread 
  • From: "Tyver Ray" <>
  • To:
  • Subject: Re: [cgal-discuss] Problem with Line_walk
  • Date: Fri, 29 Jun 2007 16:27:59 +0200

Thanks Andreas, but do CGAL provides a function to permute the vertices of a triangle without changing the Delaunay construction?


2007/6/29, Patrick Hétroy <>:
Ok so Tyver should permute manually the vertices of the triangles ?


2007/6/28, Andreas Fabri <>:

The face doesn't know that you walk from top to bottom.
Imagine if at the bottom left was a triangle like this


     *
     *
    u**
     *  *
     *    *
     *  f   *
     **************
    v        w

and you first walk down, and then from left to right along
the lower edge. You can't expect that f->vertex(0) is once u
and the next time v, only because you do another walk.


The vertices can be in a cyclic permutation, they are always
in counterclockwise order, so that the interior is to the left.


andreas



Patrick Hétroy wrote:
> I don't have any idea to resolve your problem but I think that :
>
> The Delaunay triangulation doesn't care about the order of point insertion.
> But, the function line_walk depends on the order of the insertion...
>
> If you can change your points order :p ^^
>
> Patrick
>
>
> 2007/6/28, Tyver Ray < <mailto:>>:
>
>
>
>     ---------- Forwarded message ----------
>     From: *Tyver Ray* < <mailto:>>
>     Date: 28 juin 2007 10:22
>     Subject: Problem with Line_walk
>     To:
>     <mailto: >
>
>     Hello!
>
>     I'm trying to get all the vertices on the left side of my square
>     surface with line_walk but it seems to be a problem...
>
>     I use Delaunay transformation with these points :
>         int step = 25;
>         dt.insert(Point3(0*step, 0, 3));
>         dt.insert(Point3(1*step, 0, 6));
>         dt.insert (Point3(2*step, 0, 13));
>         dt.insert(Point3(3*step, 0, 9));
>         dt.insert(Point3(4*step, 0, 6));
>         dt.insert(Point3(0*step, 1*step, 3));
>         dt.insert(Point3(1*step, 1*step, 7));
>         dt.insert(Point3(2*step, 1*step, 8));
>         dt.insert(Point3(4*step, 2*step, 8));
>         dt.insert(Point3(0*step, 3*step, 13));
>         dt.insert(Point3(1*step, 3*step, 17));
>         dt.insert(Point3(2*step, 3*step, 13));
>         dt.insert(Point3(3*step, 3*step, 18));
>         dt.insert(Point3(4*step, 3*step, 18));
>         dt.insert(Point3(0*step, 4*step, 13));
>         dt.insert(Point3(1*step, 4*step, 7));
>         dt.insert(Point3(2*step, 4*step, 3));
>         dt.insert(Point3(3*step, 4*step, 1));
>         dt.insert(Point3(4*step, 4*step, 1));
>         dt.insert (Point3(12.5, 12.25, 7));
>         dt.insert(Point3(62.5, 12.25, 7));
>         dt.insert(Point3(90, 25, 1));
>         dt.insert(Point3(87.5, 87.5, 1));
>
>     After I use the line_walk function to get the vertices which are in
>     the up to down direction of my squre surface with:
>     (the bottom left of the squre is the point (0, 0) and the up right
>     is (100, 100))
>
>         const Point3& start = Point3(0, 100, 0);
>         const Point3& end = Point3(0, 0, 0);
>
>         Line_face_circulator lfc = dt.line_walk(start, end), done(lfc);
>         if (lfc != (CGAL_NULL_TYPE) NULL)
>         {
>             do
>             {
>                 //Show the coordinates of all triangles on he left sife
>     of my square
>                 if( !dt.is_infinite(lfc) )
>                 {
>                     showCoordinates(lfc, 0);
>                     showCoordinates(lfc, 1);
>                     showCoordinates(lfc, 2);
>
>                 }
>             }
>             while (++lfc != done);
>         }
>
>     The result are :
>
>     //Triangle 1
>     Vertex Point : 0
>     x: 25
>     y: 75
>     z: 17
>     Vertex Point : 1
>     x: 0
>     y: 100
>     z: 13
>     Vertex Point : 2
>     x: 0
>     y: 75
>     z: 13
>
>     //Triangle 2
>     Vertex Point : 0
>     x: 25
>     y: 25
>     z: 7
>     Vertex Point : 1
>     x: 0
>     y: 75
>     z: 13
>     Vertex Point : 2
>     x: 0
>     y: 25
>     z: 3
>
>     //Triangle 3
>     Vertex Point : 0
>     x: 0
>     y: 0
>     z: 3
>     Vertex Point : 1
>     x: 12.5
>     y: 12.25
>     z: 7
>     Vertex Point : 2
>     x: 0
>     y: 25
>     z: 3
>
>
>     The triangle 3 has not the same count of the vertices. It doesn't
>     display first the vertex opposed to the edge which is on the
>     direction up to down as the Triangle 1 and 2.
>     I would like the same order of display for each point.
>     How can I fix the problem?
>
>

--
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