Skip to Content.
Sympa Menu

cgal-discuss - Problem with Line_walk

Subject: CGAL users discussion list

List archive

Problem with Line_walk


Chronological Thread 
  • From: "Tyver Ray" <>
  • To:
  • Subject: Problem with Line_walk
  • Date: Thu, 28 Jun 2007 11:22:40 +0200
  • 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:references; b=oixldhIHiQ29fGU/IdaiCvA3TQG2wfQqkS9ICNX5eVycpw2TBbA3VglmRNuQQdI67cEhsfe7Tm1dxky8A7y0P60Sg/Zbv+e1T/GLlw6DXfeN5UjWPZPdf3SlaDZRyhTx5PP6R9jFisb31KtYxE3oG3w+WuqCDaFIHy2QRibJxSU=



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

Attachment: square.JPG
Description: JPEG image




Archive powered by MHonArc 2.6.16.

Top of Page