Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I (also) propose a two step approach.</p> <p><strong>1. Find the intersection points of all triangle sides.</strong> </p> <p>As pointed out in the comments, this is a well-researched problem, typically approached with line sweep methods. Here is a <a href="http://geomalgorithms.com/a09-_intersect-3.html" rel="nofollow">very nice overview</a>, look especially at the Bentley-Ottmann algorithm.</p> <p><strong>2. Triangulate with Constrained Delaunay.</strong></p> <p>I think Polygon Triangulation as suggested by @Claudiu cannot solve your problem as it cannot guarantee that all original edges are included. Therefore, I suggest you look at <a href="http://en.wikipedia.org/wiki/Constrained_Delaunay_triangulation" rel="nofollow">Constrained Delaunay triangulations</a>. These allow you to specify edges that <em>must</em> be included in your triangulation, even if they would not be included in an unconstrained Delaunay or polygon triangulation. Furthermore, there are implementations that allow you to specify a non-convex border of your triangulation outside of which no triangles are generated. This also seems to be a requirement in your case. </p> <p>Implementing Constrained Delaunay is non-trivial. There is however, a somewhat dated but <a href="http://www.cs.cmu.edu/~quake/triangle.html" rel="nofollow">very nice C implementation</a> of available from a CMU researcher (including a command line tool). See <a href="http://www.cs.cmu.edu/~quake/triangle.research.html" rel="nofollow">here</a> for the theory of this specific algorithm. This algorithm also supports specification of a border. Note that the linked algorithm can do more than just Constrained Delaunay (namely quality mesh generation), but it can be configured not to add new points, which amounts to Constrained Delaunay.</p> <p><strong>Edit</strong> See comments for another implementation. </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload