Given a 3D voxel model, I wrote an algorithm that joins voxels into larger lego bricks and optimizes the resulting brick layout towards high stability.
How to do fast prototyping without having to wait for a 3D printer to print big models? Answer: Build as much as you can with Lego! But how to find the right Lego layout for a given 3D Model?
Starting with 1x1 bricks from a voxelized 3D model, I created an algorithm inspired by Testuz. The algorithm first calculates an initial layout and tries to optimize from then on, fixing any overhanging or weak bricks. It even considers bricks of different heights in the same model (Lego plates).
About five people from my university participated in this project, with different focus points. My job was to find a layout algorithm, that would create a stable and buildable Lego grid from a voxelized 3D model. I wrote it entirely in Coffeescript and collaborated a lot with Tobias, who built the framework around the web application.