top of page

Generative Design For a Lampshade Lattice

Video of Process

Here is an image of the final product of the project. This tree design was programmed in Openscad to be customizable. This was 3D printed with clear acrylic filament and designed to fit in the slot of the LED base. The customizable parameters are as follows: the height, the width of the trunk, the thickness of the hollow inside, the number of "twigs" on each branch, the thickness of each twig, how much each twig tapers to a point, the number of holes throughout the tree and the diameter of the holes on the tree.

Description of Parts of the Code

This design is made up of 6 different modules and 8 different for loops. For model complexity, we first created a hollow tree trunk using a linear extrude with a twist made up of slices. The same was done for the 3 large open branches as well, they however being lower scale, rotated, and transposed. The second major pattern is the twigs on the trunk and branches, we used the code here as the based for all of them:

​

translate([0,0,height/2]){

            for (i=[0:step:359]) {

                angle = i;

                dx = r*3*cos(angle);

                dy = r*3*sin(angle);

                translate([dx,dy,0])rotate([0,0,angle]){

                    color("SaddleBrown") translate([0,0,-20])rotate(60, [1,1,0])cylinder(twigtall*2,twigwide,twigend);

                }

            }

Tree without holes

Diamond shape that is rotated

The leaves or tree top, which is first a repeated pattern of cylinders that form a diamond like shape, and then using the twig code we repeated the diamond like pattern about the Z-axis to form the treetop, code segment below: The code takes this diamond that is made and rotates it 8 times to make what looks like a tree topThe leaves or tree top, which is first a a repeated pattern of cylinders that form a diamond like shape, and then using the twig code we repeated the diamond like pattern about the Z-axis to form the treetop, code segment below: The code takes this diamond that is made and rotates it 8 times to make what looks like a tree top

​

​

​

​

​

​

​

​

​

 

for (i=[0:step/2:359]) {

                        angle = i;

                        dx = r*cos(angle);

                        dy = r*sin(angle);

                        translate([dx,dy,0])rotate([0,0,angle]){

                            for (x=[0: 10: 359]) {

                                translate([0,0,height])

                                    rotate(x, v=[0,1,1]) {

                                        color("green") cylinder(30, 3, 7);

                                    }

                            }

                        }

        }

 

The final significant module that we wrote in our code is the hole generation module. This module creates a spiral pattern of cylinders that goes the height of the tree and rotates 360 degrees. We repeated this pattern 4 times (1 for each side of the tree trunk). The design looks like the ones on the right.

 

​

 

 

​

​

​

​

​

Once this is complete, the command "difference" is used. This command takes the second object that is in it and subtracts it from the first. Therefore, the result is on the right.

Four Spiral Patterns Together

Single spiral pattern

Tree with hole generation

Program Code

bottom of page