0

I am looking for some way how I could use CGAL to extract a 2D silhouette from a 2D graph. The 2D graph can have cycles and therefore holes.

Just imagine something like a stick figure. The Input information would be pairs of points (defining segments that build up this (kind of) graph structure). Ideally these segments don’t have to be ordered in some specific way. Every point has got a “thickness” attribute attached to it so that I know the amount of extrusion that needs to be applied to form the silhouette. As a result I would hope for something like a doubly linked edge list which allows me to cycle through the constructed silhouettes. The most difficult part I guess are crossings. I have been trying to construct these silhouettes by my self for days. But I never came up with something that works.

The following picture shows what I am aiming for (copied out of a publication I am trying to implement).

https://dl.dropboxusercontent.com/u/2500073/triangulation.PNG

Having simulated bark fractures I need to reconstruct a mesh. Therefore the triangulation step needs the silhouettes of my fractures. I have been able to extract segments defining the centerline of the fractures but when it comes to creating the fracture contours I am always failing at speacial cases like crossings etc.

Is that possible in some way?

Thank you, Merlin.

  • Try considering the extruded segments and put everything in a constrained triangulation allowing intersection of constraints. See [this example](http://doc.cgal.org/latest/Triangulation_2/index.html#Subsection_2D_Triangulations_Polygon_triangulation). – sloriot Jan 28 '14 at 06:28
  • If I do so CGAL will have to create new points on the positions where segments are intersecting. Since everything is just getting saved within a triangulation data structure I would loose all the information about the silhouette itself. If I can't traverse the contour lines I lose the possibility to create correct texture coordinates. Also I need to flag the triangles that define the interior of the fractures since they will get different settings (texture etc.) for the final rendering. – HesselKRaymond Jan 28 '14 at 09:17
  • Is there maybe a chance to use 2D boolean operations using Nef Polygons? I maybe could define Nef Polys by my segments (as half spaces) than apply something like an intersection operation and get as a final result something like the complete contour as a list of edges?!? I don't know ... just brainstorming ... – HesselKRaymond Jan 28 '14 at 09:21

0 Answers0