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: "Patrick Hétroy" <>
  • To:
  • Subject: Re: [cgal-discuss] Problem with Line_walk
  • Date: Thu, 28 Jun 2007 12:02:44 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=kB32bgdnGhdX7tRnnWMJkqLC3qBkHhkTicfxVgjpUQG4+cJuADOoM8WOYn2Cdu04fPTiJTO0Am18rothhEDMEP+co49tqap7R/LrRujFg2hK+jtzQLkfTKnkTp1uk8NLD+2TZtpNSS7g/qYDnUEBSUaE3g2dBX41m2+CcUGOFH0=

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


---------- Forwarded message ----------
From: Tyver Ray <>
Date: 28 juin 2007 10:22
Subject: Problem with Line_walk
To:

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?





Archive powered by MHonArc 2.6.16.

Top of Page