Building a levitating LEGO Baby Yoda model with R

Motivation

As a kid I was fascinated with LEGO sets, and last year, with the additional free time that lockdown provided, I got back into playing around with some old pieces. Discovery of the amazing brickr R package, which allows you to create 3D models from LEGO bricks, led me to marry my interests and try to create a levitating LEGO Baby Yoda/Grogu model.

The finished product is shown in the GIF below:

 

Always pass on what you have learned.

Yoda, “Star Wars: Return of the Jedi”

Taking the true Yoda’s advice, this post contains the detailed brick requirements and building instructions for creating your own Baby Yoda/Grogu LEGO model.

 

Designing the model

The model was designed using brickr and was adapted from the LEGO Baby Yoda/Grogu model originally designed by Ryan Timpe.See here for the code for that model, and here for Ryan’s GitHub profile. Adaption was necessary, as the original model contained a number of “floating bricks” (i.e. bricks that are not supported by another brick from either above or below), which work fine when rendering the model in R but cannot be used in a physical version.

All data and code needed to reproduce the model are available from the GitHub repository for this project.See here.

 

Build pieces

The pieces you will need to build your own LEGO Baby Yoda/Grogu model are listed in the image below. These can be acquired from the Pick A Brick service on the LEGO store website.See here. The total cost for all pieces included in this model was ~£30 pounds.

 

Building instructions

The instructions below will guide you through building your own Baby Yoda, using the pieces detailed in the previous section. It can sometimes be awkward to get some of the pieces to work together when building from the bottom up, as they are supported by a brick on the next level up. In this case, a useful tip is to try building down (i.e. descending through the steps).

The finished model should look something like this:

More photos of the finished model from different angles can be found here.

 

Make him float!

As shown in the GIF at the start of this post,Jump to GIF this model was designed to work with a electromagnetic levitation display to give it a true-to-life feel. I used the Hongzer Magnetic Levitation Platform (£6-7 pounds from Amazon),See here. but it will (/should!) work with any display where the diameter of the floating magnet is <5.5cm.


Luke A McGuinness image
Luke A McGuinness

An NIHR Doctoral Research Fellow at the University of Bristol, Luke is passionate about dementia epidemiology, open science and R.