commit 03a5b649cf08cd1476de5aa6ee8116f669328d15 Author: Andrew Davidson Date: Wed Oct 11 08:50:36 2023 -0700 initial lamp commit diff --git a/insert.3mf b/insert.3mf new file mode 100644 index 0000000..2256f77 Binary files /dev/null and b/insert.3mf differ diff --git a/insert.scad b/insert.scad new file mode 100644 index 0000000..4cde444 --- /dev/null +++ b/insert.scad @@ -0,0 +1,68 @@ +// Insert for table lamp + + +$fn = $preview? 12 : 128; + +// Input Values +led_ring_dia = 75; +led_ring_height = 10; +led_arc = 185; +led_width = 11; +led_length = 110; +led_mount_thickness = 3; +pedestal_insert_width = 99.5; +pedestal_insert_height = 10; +pedestal_base_width = 120; +pedestal_base_height = 10; +dimple_radius=2; + +// Calculated Values +led_arc_angle_rad = (led_length/led_arc); +led_arc_angle_deg = led_arc_angle_rad * (180/PI); +led_arc_angle = led_arc_angle_deg; + +module led_mount() { + rotate([90,0,0]) + translate([led_ring_dia/2-led_arc, led_ring_height, -led_width/2]) + linear_extrude(height=led_width) + intersection() { + difference() { + circle(r=led_arc); + circle(r=led_arc-led_mount_thickness); + } + polygon([ + [0,0], + [2*led_arc,0], + [2*led_arc*cos(led_arc_angle), 2*led_arc*sin(led_arc_angle)], + ]); + } + +}; + +/* for (i = [1:4]) { */ +/* rotate([0,0,i*90+45]) */ +/* led_mount(); */ +/* } */ +difference() { + union() { + cylinder(h=pedestal_insert_height,d=pedestal_insert_width); + translate([0,0,-10]) + cylinder(h=pedestal_base_height,d=pedestal_base_width); + } + rotate([0,5,0]) + translate([20,-6.25,0]) + cube([100,12.5,20]); +} + +module mirror_copy(vector) { + children(); + mirror(vector) + children(); +}; + +mirror_copy([0,1,0]) + translate([0, (pedestal_insert_width/2)-dimple_radius/2, pedestal_insert_height-dimple_radius]) + #sphere(r=dimple_radius); +rotate([0,0,90]) + translate([0, (pedestal_insert_width/2)-dimple_radius/2, pedestal_insert_height-dimple_radius]) + #sphere(r=dimple_radius); diff --git a/insert.stl b/insert.stl new file mode 100644 index 0000000..ba538fc Binary files /dev/null and b/insert.stl differ diff --git a/swirl.3mf b/swirl.3mf new file mode 100644 index 0000000..ecc8a54 Binary files /dev/null and b/swirl.3mf differ diff --git a/swirl.scad b/swirl.scad new file mode 100644 index 0000000..c4ce26b --- /dev/null +++ b/swirl.scad @@ -0,0 +1,64 @@ + +// Lampshade + + +$fn=128; + +function f(z) = 0.25 + .1 * sin(1.5 * z) + .05 * cos(1.9 * z); + +vase_height = 170; +vase_radius = 200; +step = 1; +twist = 1.4; + +sh3_nodes = 4; + + + +//sh3 = [0,30,60,90,120,180,210,240,270,300,330,360]; // polygon being extruded +sh3 = [ for (i = [1:sh3_nodes]) i*(360/sh3_nodes) ]; + + +p = [ + for (z = [0:step:vase_height], angle = sh3) [ + vase_radius*cos(angle+twist*z)*f(z), + vase_radius*sin(angle+twist*z)*f(z), + z + ] +]; + + +module shape(p,m,n) { + fcs = [for (j = [1:m], i = [0:n-2])[(n*j)+i,(n*j)+1+i,(n*(j-1))+i+1,(n*(j-1))+i]]; + + top = [for (i = [n*m:(n*m)+n-1]) i]; //connect points to create the top face + + bottom = [for (i = [0:n-1]) i]; //connect points to create the bottom + + stitches = [for (j = [0:m-1]) [j*n,((j+1)*n)-1,(((j+2)*n)-1),(j+1)*n]]; //connect points between the first and the last face per row + + //now connect all + //reverse is used to reverse normal of top face + fcsc = concat([bottom],fcs,stitches,[reverse(top)]); //concatenate the bottom, body and top + + color("blue") polyhedron(points=p, faces=fcsc); +} + +function reverse(lt) = [for(i = len(lt) - 1; i > -1; i = i - 1) lt[i]]; + +m = floor(vase_height/step); //numbers of rows of the matrix +n = len(sh3); //number of columns in the matrix + + +for ( i = [0 : 23] ) { + rotate([0,0,15*i]) + shape(p,m,n); +}; + + +mirror([1,0,0]) +for ( i = [0 : 23] ) { + rotate([0,0,15*i]) + shape(p,m,n); +}; + diff --git a/swirl.stl b/swirl.stl new file mode 100644 index 0000000..02aec3d Binary files /dev/null and b/swirl.stl differ diff --git a/teardrop.scad b/teardrop.scad new file mode 100644 index 0000000..9b10a41 --- /dev/null +++ b/teardrop.scad @@ -0,0 +1,64 @@ + +// Lampshade + + +$fn=128; + +function f(z) = 0.15 + .1 * sin(1.5 * z) + .06 * cos(1 * z); + +vase_height = 160; +vase_radius = 200; +step = 1; +twist = 1.4; + +sh3_nodes = 4; + + + +//sh3 = [0,30,60,90,120,180,210,240,270,300,330,360]; // polygon being extruded +sh3 = [ for (i = [1:sh3_nodes]) i*(360/sh3_nodes) ]; + + +p = [ + for (z = [0:step:vase_height], angle = sh3) [ + vase_radius*cos(angle+twist*z)*f(z), + vase_radius*sin(angle+twist*z)*f(z), + z + ] +]; + + +module shape(p,m,n) { + fcs = [for (j = [1:m], i = [0:n-2])[(n*j)+i,(n*j)+1+i,(n*(j-1))+i+1,(n*(j-1))+i]]; + + top = [for (i = [n*m:(n*m)+n-1]) i]; //connect points to create the top face + + bottom = [for (i = [0:n-1]) i]; //connect points to create the bottom + + stitches = [for (j = [0:m-1]) [j*n,((j+1)*n)-1,(((j+2)*n)-1),(j+1)*n]]; //connect points between the first and the last face per row + + //now connect all + //reverse is used to reverse normal of top face + fcsc = concat([bottom],fcs,stitches,[reverse(top)]); //concatenate the bottom, body and top + + color("blue") polyhedron(points=p, faces=fcsc); +} + +function reverse(lt) = [for(i = len(lt) - 1; i > -1; i = i - 1) lt[i]]; + +m = floor(vase_height/step); //numbers of rows of the matrix +n = len(sh3); //number of columns in the matrix + + +for ( i = [0 : 23] ) { + rotate([0,0,15*i]) + shape(p,m,n); +}; + + +mirror([1,0,0]) +for ( i = [0 : 23] ) { + rotate([0,0,15*i]) + shape(p,m,n); +}; +