Check out the video here.
In the fall of my senior year in high school, I took a class called Design Technology 2. For my final project, I constructed a three-dimensional model of a certain irregular solid out of cross-sections, using the laser cutter. It would have been impossible to design the schematics by hand, so I wrote this library to generate them for me. You can see a making-of video at my website here.
The functions of each of the files in
src/layerize are as follows:
appletis a Quil applet that visualizes cross sections of the solid and shows the tracing process; it is interactive and requires keyboard input
beziercontains an algorithm for drawing smooth (Bézier) curves through points; it is unused
coreis the main namespace and contains routines for generating the schematics
equationcontains the equations that define the solid
problemscontains some routines for identifying places where the generated pieces would intersect (and might need to be filed down or recut); it was written in a panic when I realized that such intersections could happen
schematiccontains the logic for placing grooves in the cross-sectional pieces
svgconverts schematics to SVG code for the laser cutter
traceconverts a collection of points representing a cross section into an ordered list of points that can be used as a path
utilcontains general utility functions, including the algorithm used to group cross sections into disjoint pieces as well as the routines used to deal with viewing frames in the applet
This is relatively old code. Also, it was written pretty quickly, in a shorter amount of time than MazeGen. As a consequence, it doesn't have nice, easy-to-use endpoints. Also, there are a number of problems that I handled by adjusting the output manually. Unlike MazeGen, it is probably not suitable for use by anyone other than me. However, if you are interested in this project, please feel free to contact me at firstname.lastname@example.org and I would be happy to answer any questions you might have.
- To generate the schematics, I think you have to call
core/piecesand pass the result to
- The pieces are not arranged neatly on the canvas as in MazeGen. You will have to arrange them manually.
- This project requires significant improvements to the grooving
schematic. Without them, it generates a number of the pieces so that they intersect with other pieces. I had to manually adjust and recut quite a few pieces.
- The solid can be viewed in Grapher using the file