Lego Picture
February 23, 2025

Overview
This project brings together 4 of my hobbies: software development, 3D printing, woodworking and travel.
Many people make pixel art images from lego blocks. Most of these are designed so that the image is viewed when looking top-down on the bricks. This makes the design much easier since the tops of lego bricks are made of square pegs and thus can easily be mapped to the pixels in an image. In this project, I wanted to construct an image from lego bricks that would reveal itself when viewed from the side, where the bricks were layered in a standard brick wall pattern and to do so without distorting the image.
The final image is a picture I took in Kyoto, Japan. 🇯🇵
Software
I developed a java program that will take an image file as input and convert it to the lego brick representation. The output includes a part list (the number, size, and color of lego bricks) as well as a preview image that shows what the final build will look like. In addition to the input image, the program takes various parameters like a color pallette (the list of brick colors you have available) and output image size (essentially the “resolution”)
View the program on my GitHub
Challenges
- How to reduce the image resolution without distoration. Since lego “pegs” are taller than they are wide, the original image needs to be mapped to non-square pixels so that the image doesn’t get stretched.
- Color mapping: Most legos come in a limited set of standard colors which don’t accurately represent the full color spectrum of most photos. To accommodate this, the software allows for custom color palettes as well as parameters to tweak how the original image colors get mapped to the limited colors in the pallete. By 3D printing the lego bricks, I also got access to much wider and more natural color set than is typically available in standard lego bricks.
- Determining how to overlay the bricks so that they would neatly overlay in a “brick” pattern without the brick seems lining up across bricks of the same color.
3D Printed Lego Bricks
I 3D printed Lego-style bricks based on the openSCAD designs by Chris Finke
Frame
I built the frame using padauk and cherry wood. The frame is a few inches wide padauk with an inset cherry back. On top of the back, There are riser blocks so that the final image appears to float in front of the background panel. The final lego image is attached to these riser blocks using 3M command strips.
Photos