diff --git a/examples/ms_paperclip_meme.scad b/examples/ms_paperclip_meme.scad index 3a7d3409..94ce27e1 100644 --- a/examples/ms_paperclip_meme.scad +++ b/examples/ms_paperclip_meme.scad @@ -2,7 +2,6 @@ use ;; use ; use ; use ; -use ; use ; use ; @@ -12,18 +11,18 @@ t_step = 0.05; ms_paperclip_meme(); module ms_paperclip_meme() { - clip_path = [[15, 15, 0], [5.75, 14.5, 1], [2, 4.5, 0], [-3.5, 8, 0.25], [-1.5, 24, 0.75], [4, 25.5, 0], [2.5, 18, 1], [1.5, 9, 0], [-1.5, 9.75, 0], [-1, 16.5, 1], [-2, 22, 1]]; + clip_path = curve(t_step, [[15, 15, 0], [5.75, 14.5, 1], [2, 4.5, 0], [-3.5, 8, 0.25], [-1.5, 24, 0.75], [4, 25.5, 0], [2.5, 18, 1], [1.5, 9, 0], [-1.5, 9.75, 0], [-1, 16.5, 1], [-2, 22, 1]]); color("Gainsboro") - path_extrude(shape_circle(.5), curve(t_step, clip_path)); + path_extrude(shape_circle(.5), clip_path); sh_eyebrow = shape_circle(.4); - eyebrow_path = [[-3, 0, 0], [0.3, .5, 0], [1.75, -0.3, 0], [1, -.15, 0]] * 2.5; + eyebrow_path = curve(t_step, [[-7.5, 0, 0], [0.75, 1.25, 0], [4.375, -0.75, 0], [2.5, -0.375, 0]]); // eyebrows color("black") translate([1, 18.5, 1.5]) { - path_extrude(sh_eyebrow, curve(t_step, eyebrow_path), scale = 0.1); + path_extrude(sh_eyebrow, eyebrow_path, scale = 0.1); translate([.75, 1.25, 0]) sphere(.4); } @@ -32,39 +31,39 @@ module ms_paperclip_meme() { translate([-.5, 20.25, 1.25]) mirror([1, 0, 0]) rotate(20) { - path_extrude(sh_eyebrow, curve(t_step, eyebrow_path), scale = 0.1); + path_extrude(sh_eyebrow, eyebrow_path, scale = 0.1); translate([.75, 1.25, 0]) sphere(.4); } // eyes + module eye() { + scale([1, .8, .75]) { + color("white") + sphere(1.75); + color("black") + translate([0, .1, 1]) + sphere(1.2); + } + } + translate([-2.75, 19.5, 1.6]) rotate(-5) - scale([1, .8, .75]) { - color("white") - sphere(1.75); - color("black") - translate([0, .1, 1]) - sphere(1.2); - } + eye(); translate([2.75, 17, 1.9]) rotate(-10) - scale([1, .8, .75]) { - color("white") - sphere(1.75); - color("black") - translate([0, .1, 1]) - sphere(1.2); - } + eye(); // base - ctrl_pts = [[[0, 0, 2], [6, 0, -3.5], [9, 0, 6], [20, 0, 0.5]], [[0, 5, 3], [10, 6, -2.5], [12, 5, 12], [20, 5, 0.5]], [[0, 10, 0], [6, 12, 3.5], [9, 10, 6], [20, 10, 4.5]], [[0, 12.3, 0], [6, 12.3, -3.5], [9, 12.3, 6], [20, 12.3, 4.5]]]; bezier = function(points) bezier_curve(t_step, points); - g = sf_splines(ctrl_pts, bezier); + g = sf_splines([ + [[-10, 1.5, 6], [-4, -4, 6], [-1, 5.5, 6], [10, 0, 6]], + [[-10, 2.5, 1], [0, -3, 0], [2, 11.5, 1], [10, 0, 1]], + [[-10, -0.5, -4], [-4, 3, -6], [-1, 5.5, -4], [10, 4, -4]], + [[-10, -0.5, -6.3], [-4, -4, -6.3], [-1, 5.5, -6.3], [10, 4, -6.3]] + ], bezier); color("Yellow") - translate([-10, -.5, 6]) - rotate([-90, 0, 0]) sf_thicken(g, .75); } \ No newline at end of file