# 1D Combinatorial Map - 1-Simplex

7 messages
Open this post in threaded view
|

## 1D Combinatorial Map - 1-Simplex

 Hi, I am trying to get my head around combinatorial maps, and I thought I would start with the simplest non-trivial example, a 1-simplex (#0-cells=2, #1-cells=1). So, first I tried the obvious construction helper: CGAL::Combinatorial_map<1> cm; cm.make_edge(); cm.display_characteristics(std::cout); std::cout << std::endl; However, this gives me: #Darts=2, #0-cells=2, #1-cells=2, #ccs=2 But that's not quite right (#1-cells=2). So I tried creating the 1-simplex manually: CGAL::Combinatorial_map<1> cm; auto dh1 = cm.create_dart(); auto dh2 = cm.create_dart(); cm.dart_link_beta<0>(dh1, dh2); cm.dart_link_beta<0>(dh2, dh1); cm.display_characteristics(std::cout); std::cout << std::endl; However, this gives me: #Darts=2, #0-cells=2, #1-cells=2, #ccs=1 But that's still not quite right (#1-cells=2). I tried a bunch of other things, but I never managed to get the intended result (#1-cells=1). My intuition for combinatorial maps is still very poor, which was the motivation for this exercise. At this point, I feel like I must be missing something. Please forgive me if it is something very obvious. Still, I would appreciate any hints... Cheers, Peter -- Sent from: http://cgal-discuss.949826.n4.nabble.com/-- You are currently subscribed to cgal-discuss. To unsubscribe or access the archives, go to https://sympa.inria.fr/sympa/info/cgal-discuss
Open this post in threaded view
|

## Re: 1D Combinatorial Map - 1-Simplex

Open this post in threaded view
|

## Re: 1D Combinatorial Map - 1-Simplex

Open this post in threaded view
|

## Re: 1D Combinatorial Map - 1-Simplex

Open this post in threaded view
|

## Re:[cgal-discuss] 1D Combinatorial Map - 1-Simplex

 In reply to this post by kloffy Hi Peter; If your goal is to understand the mean of the different beta, I suggest you to start in 2D, and study the examples given in the CGAL user manual. Indeed, 1D combinatorial map with boundaries (which is what you try to do) is a very special case. For this reason, it is not possible to build a 1D cmap with #Darts=2, #0-cells=2, #1-cells=1, #ccs=1 because 1 dart represents one 0-cell and one 1-cell. But this is possible in a 2D combinatorial map, as said in my previous email, by creating 2 darts linked by beta2. In my point of view, this is not a problem because 1D combinatorial map is a very special case, not really interesting. To represend 1D line segment, you can simply use a polygon representation based on vertices and edges. Best Guillaume Le 29/08/2018 à 06:13, Peter Klosowski a écrit : Hi, Just following up on this, since I am feeling quite stuck. Is there anybody who could answer the following question? 1) Should it be possible to construct a 1D combinatorial map with the following characteristics? #Darts=2, #0-cells=2, #1-cells=1, #ccs=1 Bonus questions: 1a) If yes, what is the correct code to construct such a combinatorial map? 1b) If no, what is the best representation of a 1-simplex (1d line segment)? Any advice would be greatly appreciated. Thank you in advance! Cheers, Peter On Mon, Aug 27, 2018 at 5:58 PM Peter Klosowski <[hidden email]> wrote: Hi Guillaume, Many thanks for your suggestions! However, I am still a bit confused. I tried your code:     CGAL::Combinatorial_map<1> cm;     auto dh1 = cm.create_dart();     auto dh2 = cm.create_dart();     cm.dart_link_beta<1>(dh1, dh2);     cm.display_characteristics(std::cout);     std::cout << std::endl; But it still gives me: #Darts=2, #0-cells=2, #1-cells=2, #ccs=1 Am I wrong to expect that an edge would only have a single 1-cell? My expectation comes from the faces of a 1-simplex (https://en.wikipedia.org/wiki/Simplex). Perhaps in combinatorial maps it works differently... I think the main challenge for me in terms of forming an intuition is to understand the different betas. I can see the value of combinatorial maps to represent cellular structures, and a lot of the concepts and operations make sense. I am just having trouble getting my head around why an edge is made of two darts linked by beta1, as opposed to beta0, for example? I hope some of that makes sense. Thank you again for the help! Cheers, Peter On Mon, Aug 27, 2018 at 4:43 PM Guillaume Damiand <[hidden email]> wrote: Hi Peter; Le 26/08/2018 à 13:41, kloffy a écrit : > Hi, > > I am trying to get my head around combinatorial maps, and I thought I would > start with the simplest non-trivial example, a 1-simplex (#0-cells=2, > #1-cells=1). > > > So, first I tried the obvious construction helper: > > CGAL::Combinatorial_map<1> cm; > > cm.make_edge(); > > cm.display_characteristics(std::cout); > std::cout << std::endl; > > However, this gives me: > > #Darts=2, #0-cells=2, #1-cells=2, #ccs=2 > > But that's not quite right (#1-cells=2). A 1D combinatorial map can be seen as a set of 1D curves (possibly opened). As said in the doc of make_edge (here https://doc.cgal.org/latest/Combinatorial_map/classGenericMap.html#a6f455fd64b650495392bddecedbd5afe), this method requires that the dimension of the combinatorial map n is >= 2. Indeed, an edge is made of two darts linked by beta2 and this requires n>=2. In a 1D cmap, an edge is made of two darts linked by beta1. If you want to create such an edge by hand, you must use cm.dart_link_beta<1>(dh1, dh2); To have an intuition of what is a combinatorial map, have a look at the 2 first figures in the user manual (here https://doc.cgal.org/latest/Combinatorial_map/index.html). Hope this help. Best Guillaume > > > So I tried creating the 1-simplex manually: > > CGAL::Combinatorial_map<1> cm; > > auto dh1 = cm.create_dart(); > auto dh2 = cm.create_dart(); > > cm.dart_link_beta<1>(dh1, dh2); > > cm.display_characteristics(std::cout); > std::cout << std::endl; > > However, this gives me: > > #Darts=2, #0-cells=2, #1-cells=2, #ccs=1 > > But that's still not quite right (#1-cells=2). > > > I tried a bunch of other things, but I never managed to get the intended > result (#1-cells=1). My intuition for combinatorial maps is still very poor, > which was the motivation for this exercise. At this point, I feel like I > must be missing something. Please forgive me if it is something very > obvious. Still, I would appreciate any hints... > > Cheers, > Peter > > > > -- > Sent from: http://cgal-discuss.949826.n4.nabble.com/ > -- ```-- =================================================================== Guillaume DAMIAND CNRS - LIRIS UMR 5205 Université Claude Bernard Bâtiment Nautibus (710) 43 Boulevard du 11 Novembre 1918 69622 Villeurbanne Cedex (France) ------------------------------------------------------------------- Tél: +33 (0)4.72.43.14.34 Fax: +33 (0)4.72.43.15.36 Mail: [hidden email] Web: http://liris.cnrs.fr/guillaume.damiand/ =================================================================== ``` smime.p7s (3K) Download Attachment
 Hi Guillaume, Many thanks for shedding more light on the subject. It is very helpful to get confirmation that it is impossible to construct the kind of combinatorial map that I was trying to make. It saves me a lot of trial and error!Have been reading the documentation some more, and I am actually finding generalized maps a bit easier to grasp. There everything behaves as I would expect:    CGAL::Generalized_map<1> gm1;    auto dh1 = gm1.create_dart();    auto dh2 = gm1.create_dart();    gm1.sew<0>(dh1, dh2);    gm1.display_characteristics(std::cout); std::cout << std::endl;    gm1.display_darts(std::cout); std::cout << std::endl;With the resulting:#Darts=2, #0-cells=2, #1-cells=1, #ccs=1, orientable=trueI will keep reading about it, and eventually I am sure it will all make sense. Thank you again for your guidance, it is a very interesting subject that I am only beginning to get my head around!Best,PeterOn Wed, Aug 29, 2018 at 4:02 PM Guillaume Damiand <[hidden email]> wrote: Hi Peter; If your goal is to understand the mean of the different beta, I suggest you to start in 2D, and study the examples given in the CGAL user manual. Indeed, 1D combinatorial map with boundaries (which is what you try to do) is a very special case. For this reason, it is not possible to build a 1D cmap with #Darts=2, #0-cells=2, #1-cells=1, #ccs=1 because 1 dart represents one 0-cell and one 1-cell. But this is possible in a 2D combinatorial map, as said in my previous email, by creating 2 darts linked by beta2. In my point of view, this is not a problem because 1D combinatorial map is a very special case, not really interesting. To represend 1D line segment, you can simply use a polygon representation based on vertices and edges. Best Guillaume Le 29/08/2018 à 06:13, Peter Klosowski a écrit : Hi, Just following up on this, since I am feeling quite stuck. Is there anybody who could answer the following question? 1) Should it be possible to construct a 1D combinatorial map with the following characteristics? #Darts=2, #0-cells=2, #1-cells=1, #ccs=1 Bonus questions: 1a) If yes, what is the correct code to construct such a combinatorial map? 1b) If no, what is the best representation of a 1-simplex (1d line segment)? Any advice would be greatly appreciated. Thank you in advance! Cheers, Peter On Mon, Aug 27, 2018 at 5:58 PM Peter Klosowski <[hidden email]> wrote: Hi Guillaume, Many thanks for your suggestions! However, I am still a bit confused. I tried your code:     CGAL::Combinatorial_map<1> cm;     auto dh1 = cm.create_dart();     auto dh2 = cm.create_dart();     cm.dart_link_beta<1>(dh1, dh2);     cm.display_characteristics(std::cout);     std::cout << std::endl; But it still gives me: #Darts=2, #0-cells=2, #1-cells=2, #ccs=1 Am I wrong to expect that an edge would only have a single 1-cell? My expectation comes from the faces of a 1-simplex (https://en.wikipedia.org/wiki/Simplex). Perhaps in combinatorial maps it works differently... I think the main challenge for me in terms of forming an intuition is to understand the different betas. I can see the value of combinatorial maps to represent cellular structures, and a lot of the concepts and operations make sense. I am just having trouble getting my head around why an edge is made of two darts linked by beta1, as opposed to beta0, for example? I hope some of that makes sense. Thank you again for the help! Cheers, Peter On Mon, Aug 27, 2018 at 4:43 PM Guillaume Damiand <[hidden email]> wrote: Hi Peter; Le 26/08/2018 à 13:41, kloffy a écrit : > Hi, > > I am trying to get my head around combinatorial maps, and I thought I would > start with the simplest non-trivial example, a 1-simplex (#0-cells=2, > #1-cells=1). > > > So, first I tried the obvious construction helper: > > CGAL::Combinatorial_map<1> cm; > > cm.make_edge(); > > cm.display_characteristics(std::cout); > std::cout << std::endl; > > However, this gives me: > > #Darts=2, #0-cells=2, #1-cells=2, #ccs=2 > > But that's not quite right (#1-cells=2). A 1D combinatorial map can be seen as a set of 1D curves (possibly opened). As said in the doc of make_edge (here https://doc.cgal.org/latest/Combinatorial_map/classGenericMap.html#a6f455fd64b650495392bddecedbd5afe), this method requires that the dimension of the combinatorial map n is >= 2. Indeed, an edge is made of two darts linked by beta2 and this requires n>=2. In a 1D cmap, an edge is made of two darts linked by beta1. If you want to create such an edge by hand, you must use cm.dart_link_beta<1>(dh1, dh2); To have an intuition of what is a combinatorial map, have a look at the 2 first figures in the user manual (here https://doc.cgal.org/latest/Combinatorial_map/index.html). Hope this help. Best Guillaume > > > So I tried creating the 1-simplex manually: > > CGAL::Combinatorial_map<1> cm; > > auto dh1 = cm.create_dart(); > auto dh2 = cm.create_dart(); > > cm.dart_link_beta<1>(dh1, dh2); > > cm.display_characteristics(std::cout); > std::cout << std::endl; > > However, this gives me: > > #Darts=2, #0-cells=2, #1-cells=2, #ccs=1 > > But that's still not quite right (#1-cells=2). > > > I tried a bunch of other things, but I never managed to get the intended > result (#1-cells=1). My intuition for combinatorial maps is still very poor, > which was the motivation for this exercise. At this point, I feel like I > must be missing something. Please forgive me if it is something very > obvious. Still, I would appreciate any hints... > > Cheers, > Peter > > > > -- > Sent from: http://cgal-discuss.949826.n4.nabble.com/ > -- ```-- =================================================================== Guillaume DAMIAND CNRS - LIRIS UMR 5205 Université Claude Bernard Bâtiment Nautibus (710) 43 Boulevard du 11 Novembre 1918 69622 Villeurbanne Cedex (France) ------------------------------------------------------------------- Tél: +33 (0)4.72.43.14.34 Fax: +33 (0)4.72.43.15.36 Mail: [hidden email] Web: http://liris.cnrs.fr/guillaume.damiand/ =================================================================== ```