diff --git a/undocumented_features/in_shape_demo.scad b/undocumented_features/in_shape_demo.scad new file mode 100644 index 00000000..21547bac --- /dev/null +++ b/undocumented_features/in_shape_demo.scad @@ -0,0 +1,32 @@ +include ; +include ; + +/* +points = [ + [10, 0], + [10, 10], + [-10, 10], + [-10, -10] +];*/ + + +points = shape_taiwan(30); +%polygon(points); +pt = [-10, 9]; + +n = 200; +xs = rands(-10, 10, n); +ys = rands(-18, 18, n); + +pts = [ + for(i = [0:n]) + let(p = [xs[i], ys[i]]) + if(in_shape(points, p, true)) + p + ]; + +for(p = pts) { + translate(p) circle(.2); +} + + \ No newline at end of file diff --git a/undocumented_features/midpt_smooth_demo.scad b/undocumented_features/midpt_smooth_demo.scad new file mode 100644 index 00000000..769d0411 --- /dev/null +++ b/undocumented_features/midpt_smooth_demo.scad @@ -0,0 +1,14 @@ +include ; +include ; +include ; +include ; + + + +taiwan = shape_taiwan(100, .5); +sm = midpt_smooth(taiwan, 1, true); + +*translate([10, 0, 0]) hull_polyline2d(shape_taiwan(100), .1); +translate([10, 0, 0]) hull_polyline2d(sm, .1); + +echo(len(taiwan)); \ No newline at end of file diff --git a/undocumented_features/trim_shape_demo.scad b/undocumented_features/trim_shape_demo.scad new file mode 100644 index 00000000..0112d88e --- /dev/null +++ b/undocumented_features/trim_shape_demo.scad @@ -0,0 +1,14 @@ +include ; +include ; +include ; +include ; +include ; + +taiwan = shape_taiwan(50); +offseted = bijection_offset(taiwan, -2); +trimmed = trim_shape(offseted, 3, len(offseted) - 6); +smoothed = midpt_smooth(trimmed, 3); + +#hull_polyline2d(taiwan, .1); +%translate([25, 0, 0]) hull_polyline2d(offseted, .2); +hull_polyline2d(smoothed, .1); diff --git a/undocumented_features/undocumented_note.md b/undocumented_features/undocumented_note.md new file mode 100644 index 00000000..80a7bf2a --- /dev/null +++ b/undocumented_features/undocumented_note.md @@ -0,0 +1,18 @@ +voronoi, bend_extrude: + https://www.thingiverse.com/thing:3650115 + +voronoi3d + 3d version of voronoi, slow but workable + +in_shape, in_line + in_shape_demo.scad + +midpt_smooth + midpt_smooth.scad + +trim_shape + trim_shape_demo.scad + +shape_taiwan: new `dt` parameter + +bijection_offset: new `epsilon` parameter