Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Wrong mirror vertex

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Wrong mirror vertex


Chronological Thread 
  • From: 400555 <>
  • To:
  • Subject: Re: [cgal-discuss] Wrong mirror vertex
  • Date: Wed, 29 Jul 2009 12:43:18 +0200
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; b=WbJZGjNkApTVR/mdnmsgrT7zbcCY6fSyJMHaiAvQZ6/yRx3+MU/Ch4sMjirifzL3We GwNm23u1av8U0CLnbW7//+l++8Qx5ocbKhKJvAPNikv3YdGAvBvAIQYDTzWCPHC6I1lv m/XAO3c2r5lmcvbdU0dGjiJIjFC5UHXEBW5aU=

Manuel, thank you for answer!

I figured out that I said wrong previous time. I do not modify position of vertexes in my DT. 
(Actually I do it but in my own data structure which does not affects to CGAL DT vertices.)

Also I don't want to keep Delaunay, just I am starting with it. During my manual modifications I need to have just triangulation.

And only modification what I am doing I what I need - flip.

So, In the beginning I have correct Delaunay. Then after several flipping I get that is_valid() != 1. By the way what exactly validity is_valid() function checks? If Delaunay - I don't need it.

If it checks for not edge crossing etc - then how is it possible that I am getting not valid structure after applying several T.flip(f, i), in manual I see that this function "guaranteed to lead to a valid triangulation".


About "square perimeter of a vertex" I meant that I have square border of my domain, all points lie inside of this square and also some of them on the border (so in fact on the sane line).

Do you have any idea what could be wrong?

Thank you.

On Wed, Jul 29, 2009 at 11:00 AM, Manuel Caroli <> wrote:
Dear 400555,


400555 wrote:
Hello !
Could you please help with my problem.

I make Delaunay_2 for set of points.

Then, on each iteration I change positions of point and accordingly to my criteria do Flip of some edges (only for finite).
(and I checked that new edge obtained after flipping also stand finite)
Note that as soon as you change point coordinates or do flips manually the triangulation is most probably not Delaunay anymore. So there are no guarantees anymore about the behavior of e.g. the insert function.


After somewhile I find that for one edge vertex(i) and vertex which is mirror_vertex to it - become the same.

Do you know how is it possible?
no, because I don't know what your code is doing. You might want to use the is_valid() functions from Triangulation_2 and Triangulation_data_structure_2 to check whether you still have a valid triangulation after each of your modifications.


There is a part of my code below. ov1 becomes equal to ov2. Someone knows why?
Your code below does not modify the triangulation. I suppose the error occurs already during modification. See above.


Can the fact that I have also square perimeter of vertices (which are lie on the line) be affected to this problem?
I'm sorry I don't understand this one. What do you mean by the square perimeter of a vertex?

About your question before about edge with info: As edges are not represented explicitly there is no possibility to store some info with it. However you could store the info in one of the incident faces, then you can look it up in constant time.

best

Manuel




for (Finite_edges_iterator2 eit = T.finite_edges_begin(); eit != T.finite_edges_end(); ++eit)
{

    Edge2 ed = *eit;

    Face_handle2 f = ed.first;
    int i = ed.second;
    Vertex_handle2 vh1 = f->vertex(T.cw(i));
    Vertex_handle2 vh2 = f->vertex(T.ccw(i));

    if ((f->vertex(i) != T.infinite_vertex()) && (f->mirror_vertex(i) != T.infinite_vertex()))
    {

         ov1 = f->vertex(i)->info();
         ov2 = T.mirror_vertex(f, i)->info();

         - - - - - -
    }

    - - - - - }

Thank you.


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