Wouldn’t it be cool if you could hold the Universe in your hands? Now you can!

This project is at the crossroads of science, specifically cosmology, and 3D printing with a little python escape route. The way might get bumpy, but I will try to make it as smooth as possible, so buckle up!

If you want to take a short cut click here to download the .stl file and start 3D printing your own Universe right away.

3D printed universe

What you might look like, holding the Universe in your hands.

The part about cosmology

The early Universe

Our Univers is in expansion. What we mean by this is that, at each second that passes, the space is growing, and the matter that fills the Universe gets ever more diluted. The matter is us, the Earth and the Moon, the Sun, our galaxy the Milky Way, but mainly it is a gas made of hydrogen and helium that fills every corner of the Universe with a density of less than one atom per cubic meter.

Let’s travel backwards in time for a moment. The Universe is now getting smaller and smaller. This means that the gas filling the Universe gets denser, we have more and more atoms per cubic meter. As there are more atoms, they are more likely to interact, meaning that the temperature is also getting higher.

We are familiar with what happens when the temperature gets higher and higher: when the temperature goes from negative to positive, water turns from ice to liquid. When the temperature crosses a hundred degrees Celsius, water evaporates. These events, called phase transition, always happen at a given temperature.

As the temperature gets higher in our Universe (remember that we are still going backwards in time), the hydrogen transitions from a gas to a plasma. Plasma is the fourth state of matter, the one that we are less familiar with. Although it is common in nature (the Sun is a plasma) and in our daily lives (in some of our screens and lights).

There is something particularly remarkable about the transition from a plasma to a gas. It is that plasmas are opaque, but gases are transparent. Light is made of particules called photons. In a plasma, photons keep interacting with atoms, so they cannot travel far. This is why plasmas are opaque. In a gas however, photons are really unlikely to interact with atoms. Photons can thus travel very long distances in a gas. This is why we don’t see the air we breath.

Let’s summarise what we have learned so far. The early Universe was smaller, denser, hotter, and filled with an opaque plasma of hydrogen. As the Universe expanded, it got bigger, less dense and cooler. Up to a point at which the hydrogen filling the Universe transitioned from a state of a plasma to a gas. At this time, the Universe went from opaque to transparent. All the photons trapped in the plasma were released at the same time. These photons are still traveling through the Universe today. We call them the Cosmic Microwave Background (CMB).

The Cosmic Microwave Background

The first thing to understand is that the phase transition (the change from plasma to gas) happened everywhere at the same time. It means that the photons of the CMB were also released everywhere at the same time. Where ever you sit in the Universe today, you can observe photons of the CMB that travelled through the Universe since they have been released more than 13 billion years ago. And you can observe them coming from every directions. Of course the photons are not visible by eye. as you might have guess from their name, they are microwaves, a wavelength that the human eye cannot perceive. But using sophisticated technology such as ESA Planck telescope, you can make a sky map of the CMB as seen from earth.

3D printed universe

The cosmic microwave background as captured by ESA Planck telescope.

The map above shows the CMB as seen by Planck. Although it appears flat on your screen, it is a sky map, so you can really think of it as a sphere surrounding you in every directions such as the night sky does. Now there are a lots of processing that needs to be done to go from raw observations to the map you see above that I won’t go into. If you would like to get the feel of it, here is where you could click.

As the speed of light is finite, it takes time for the light to travel through the Universe. Because of that, there is a relation between the object you perceive in the sky and the time at which you see them. For instance it takes 8 minutes for the light to travel from the Sun to the Earth. Because of this the Sun as you see it in the sky is actually the Sun as it was 8 minutes ago. Similarly the further away you look in the Universe, the earlier in time you look. And because the CMB is the oldest light observable in the Universe, it is also the further we can look at. Thus the CMB represents the limit of what we call the observable Universe. It is the frontier of what we can observe, so that everything we know of is contained within the sky map above.

What you will have noticed, looking at the map of the CMB, is that there are structures in it. Some places are redder, some places are bluer. These differences in colors you see are actually temperature fluctuations of the CMB. Meaning that the CMB is hotter in certain directions than others. These temperature fluctuations can in turn be interpreted as density fluctuations, meaning that the early Universe was denser in some regions and sparser in others. The densest spots are the seeds that initiated structure formations, eventually forming galaxies.

Knowing that the CMB represent the limit of our observable Universe, and that the fluctuations we see in it corresponds to density fluctuations in the early Universe, why not 3D print these density fluctuations on a sphere so that you can hold the observable Universe in your hands, touching the primordial fluctuations that would eventually form galaxies, stars, planets and life?

The part where we do the math

The idea is to 3D print a sphere that reproduce the temperature fluctuations of the CMB. There are two constraints: to be able to see the fluctuations while illuminating the sphere and to be able to feel the fluctuations when touching the sphere.

To turn this cool idea into reality, we need the CMB map as measured by Planck. You can freely download the actual map from the ESA website. There are several maps available corresponding to different data processing, I took the NILC full mission CMB maps for the only reason that it seemed to have the less visible artefacts that could show on a 3D print.

The map comes in an healpix format in a fits file. Now, if you are not an astronomer I will save you some pain by giving you the command to load the data:

from astropy.io import fits
import healpy as hp

hdu = fits.open('COM_CMB_IQU-nilc_2048_R3.00_full.fits')
map = hdu[1].data['I_STOKES']

We now have the map we are looking for. Because the map comes at a very high resolution (the data file is 1.6Go), we start by lowering the resolution of the map:

# Lower resolution
lowres_map = hp.ud_grade(map, FINAL_NSIDE, order_in='NESTED', order_out='NESTED')

# Remove outliers
lowres_map[lowres_map > 0.0004] = 0.0004
lowres_map[lowres_map < -0.0004] = -0.0004

The FINAL_NSIDE variable indicates the resolution we want. The lower it gets, the lower the resolution, and it must be a power of 2. A value of 64 is actually rather low, meaning that we are loosing a non negligible amount of informations doing so. The reason for going that low is that the 3D printer does not have an infinite precision and tests showed that the output is better with this resolution. As you see I have also removed some outliers in the data that if left would create weird spikes on our beautiful Universe.

To be able to see and feel the fluctuations of the CMB, we will print a spherical shell who’s thickness varies according to the temperature fluctuations. We will make the shell thiner where the temperature was higher, so that the shell appears brighter, and we will make the shell thicker where the temperature is lower, so that the shell appears darker. This means that hotter regions will appear sparser and cooler regions denser. The reality of things is much more complicated: the relation between the temperature of the CMB and the density of the early Universe is non-linear and scale dependent. So we will treat our approximation as good enough…

Lets create 2 files containing the cartesian (X,Y,Z) coordinates respectively for the outside and the inside of the shell. The inside of the shell will be purely spherical while the outside one will vary in radius:

SPHERE_RADIUS = 50  # In mm
MIN_WIDTH = 0.8     # In mm

# Convert to (r,theta,phi)
# Inverted so that luminous spots correspond to hot spots:
r = SPHERE_RADIUS - (BLOW_UP_FACTOR * lowres_map)
theta, phi = hp.pix2ang(
# Convert (r,theta,phi) to (x,y,z)
x = r * np.sin(theta) * np.cos(phi)
y = r * np.sin(theta) * np.sin(phi)
z = r * np.cos(theta)

radius = SPHERE_RADIUS + np.min(lowres_m) * BLOW_UP_FACTOR - MIN_WIDTH
sphere_x = radius * np.sin(theta) * np.cos(phi)
sphere_y = radius * np.sin(theta) * np.sin(phi)
sphere_z = radius * np.cos(theta)

# Write coordinates
with open('cmb_nside64_8layers_outside_blowup8000.xyz', 'w') as f:
    for ix, iy, iz in zip(x, y, z):
        f.write('{x} {y} {z}\n'.format(x=ix, y=iy, z=iz))
with open('cmb_nside64_8layers_inside_blowup8000.xyz', 'w') as f:
    for ix, iy, iz in zip(inside_x, inside_y, inside_z):

We start by defining the radius of the sphere. I chose 50mm so that it feels big enough when holding it but small enough to fit in the 3D printer. We also define the minimum width of the shell. This impacts the sturdiness of the universe and its brightness when lighted up. The blow up factor is there to enhance the fluctuations, as they are extremely small, and we would not see or feel anything otherwise. From there we can compute the spherical coordinates of both the inside and outside of the shell and turn them into cartesian coordinates.

The part where we do the 3D printing

Using the free software meshlab we can convert our .xyz files into .stl files that can be used for 3D printing. Starting from the .xyz file we need to use the compute normals for point sets function followed by the screend Poisson surface reconstruction. Once done we can export the result as .stl files.

We now have one .stl file for the outside of the shell and one for the inside. These .stl files represent surfaces. To create an actual shell with a given thickness we can load the two files into the free software meshmixer. First we need to invert the normals of the inside sphere so that the software understands it needs to fill in between the two surfaces. Then we can select the two surfaces, combined them and save the results as a new .stl file and Voila! We have our 3D model ready for printing!

If you really want to 3D print your own little Universe but can’t bother to reproduce all of this, I’ve got you covered. You can download my .stl file ready for printing.

I 3D printed my CMB on a printrbot 3D printer at Pangloss Labs. I divided the print into 2 halves that I glued together to obtain a good finish everywhere. Below you can see a time laps of the printing of one half.

To light my Universe I used a LED spot with a custom 3D printed lamp base. Here is the final result, hope you like it!

3D printed universe lamp

The resulting 3D printed Universe lamp on its stand.

To close this post I want to say huge thanks to Paul Bristow that helped me begin my 3D printing journey. As usual, I would love to receive your feedback so do comment below or contact me.

Categories: 3D printingScience

Leave a Reply

Your email address will not be published. Required fields are marked *