diff --git a/undocumented_features/triangulate_demo.scad b/undocumented_features/triangulate_demo.scad new file mode 100644 index 00000000..3eb96a7d --- /dev/null +++ b/undocumented_features/triangulate_demo.scad @@ -0,0 +1,22 @@ +include ; + +shape = [ + [0, 0], + [10, 0], + [12, 5], + [5, 10], + [10, 15], + [0, 20], + [-5, 18], + [-8, 3], + [-4, 10] +]; + +tris = triangulate(shape); + +polygon(shape); +for(tri = tris) { + #offset(-.1) + polygon([for(idx = tri) shape[idx]]); + +} \ No newline at end of file diff --git a/undocumented_features/undocumented_note.md b/undocumented_features/undocumented_note.md index 80a7bf2a..8b9b9543 100644 --- a/undocumented_features/undocumented_note.md +++ b/undocumented_features/undocumented_note.md @@ -13,6 +13,9 @@ midpt_smooth trim_shape trim_shape_demo.scad +triangulate + triangulate_demo.scad + shape_taiwan: new `dt` parameter bijection_offset: new `epsilon` parameter