title: How to triangulate/tesselate some shape in Java?
body: <p>I want to tessellate country shape from GeoTools to display it in 3D on Earth surface. GeoTools use JTS topology suite inside which looks feature rich. </p>
  
  <p>Does it contain utility to tessellate some shape? I see there is triangulation package, but can't figure out, how to use it for shapes with holes.</p>
  
  <p>Also I with it not just connect existing vertices like here</p>
  
  <p><img src="https://i.stack.imgur.com/a6Vzx.png" alt="enter image description here"></p>
  
  <p>it should fill shape with multiple vertices inside.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>I found, that JTS contains class <code>ConformingDelaunayTriangulationBuilder</code> which allows to make wished tessellations somehow, but it works bad. First of all it allows only constraining, which means additional code is needed to remove triangles from concaved regions. And also it tries to conserve Delaunay nature of tessellation, which leads to creating many additional sections. </p>
  
  <p>Finally it causes <code>ConstraintEnforcementException</code> for complex shapes like countries and unusable.</p>
  
  <p>Also I found <a href="http://www.cs.cmu.edu/~quake/triangle.html" rel="nofollow noreferrer">"triangle" package</a>, which is written in C and implementing <a href="https://en.wikipedia.org/wiki/Chew%27s_second_algorithm" rel="nofollow noreferrer">Chew's second algorithm</a> and works well</p>
  
  <p><img src="https://i.stack.imgur.com/OYt3h.png" alt="enter image description here"></p>
  
  <p>Now I wonder, was it ported to Java or wrapped into it?</p>