# You're reading: Posts Tagged: 3d printing

### Geogebra to Cake in Five Steps

In the Aperiodical’s Big Internet Math-Off 2019, Becky Warren posted an entry about Geogebra’s ‘reflect object in circle’ tool (it’s the second article in the post). I enjoyed playing with the tool and, after making a few colourful designs, it occurred to me that one of them would make a great cake for the MathsJam bake-off. It would only work if the curves were accurate; sadly this would be beyond my drawing abilities, and definitely beyond my piping abilities. But with some help from 3D printing I thought I might be able to manage it.

Here are the steps I used to transfer the design to a cake.

## Step 1 (Geogebra) – Save as an image

I started by simplifying the design. Squares are straightforward, so I only needed the part within the centre circle. I hid all the squares and removed all the colours, then thickened the lines to make them easier to see. Finally, I took a screenshot and saved it as a bitmap image.

## Step 2 (Inkscape) – Convert image to path and generate scad

The next step was to use Inkscape to convert the image into an OpenSCAD file that can be used for 3D printing. If you google ‘Inkscape OpenSCAD’ you’ll find several extensions that will do this; I used Paths2OpenSCAD.

To generate the scad, start by importing the image into Inkscape. Then, with the image selected, go to Path > Trace Bitmap. This opens up a window with lots of options; accept the default and click OK, then close the window. Inkscape has now converted the image into a vector path; this means that it has coordinates for each point on the path.

Now go to Extensions > Generate from Path > Paths to OpenSCAD. This opens up another window. In the output file box, enter the location to save the scad file, then click OK. Now you can open the file in OpenSCAD.

## Step 3 (OpenSCAD) – Scale design

The generated OpenSCAD file starts like this.

It has a method called ‘poly_path854’ (a new number is generated for each file). This method uses the coordinates of the points on the path from Inkscape to make a polygon in OpenSCAD.

Pressing F5 to preview shows a replica of the image, rendered as a 3D model.

At the very end of the file is a line that calls the ‘poly_path854’ method, passing in a number. The number is the height of the object when printed – you can change this to suit your needs.

The part that I found difficult was to work out the size the model would be when it was printed. The axes on the OpenSCAD preview window give some indication, but it’s not possible to read accurate values from it. I wanted my model sized appropriately to match a square cutter that I already owned. In the end, I printed out a 1 mm high model so that I could measure the original size without wasting too much plastic, then I scaled the entire model to match the square cutter. The final line of the file became

scale([6/(4.2*sqrt(2)),6/(4.2*sqrt(2)),1]){
poly_path854(5);
}

## Step 4 – Print

I sent the model to the printer, and a few hours later I had my cutter!

## Step 5 – Imprint on cake

Once I had baked the cake and covered it in fondant, I used the cutter to make an imprint of the design on the icing.

Now it only remained to cut the squares around the edges and give it some colour. I used a small amount of vodka to thin out paste food colouring so that I could paint on the fondant icing. (Honestly, it was a tiny amount of vodka – less than 5 ml over the entire cake.)

That’s it! Geogebra to cake in five steps. Here’s the finished cake, alongside the original design in Geogebra.

### My adventures in 3D printing: Seven Triples puzzle

At work we’ve got a 3D printer. In this series of posts I’ll share some of the designs I’ve made.

There are seven kinds of shape. There are three copies of each shape. The pieces like to group together in threes.

Can you arrange the pieces into seven groups of three so that for each possible pair of shapes, there is one group containing that pair?

Try to do it without paying attention to colours first, then try to rearrange the pieces so each group has a piece of each colour in it.

### My adventures in 3D printing: Prime number sieve

At work we’ve got a 3D printer. In this series of posts I’ll share some of the designs I’ve made.

This is something I’ve wanted to make for a long time: a literal sieve of Eratosthenes.

This is a collection of trays which stack on top of each other.

Each tray has a grid of holes, with some holes filled in. The tray with a “2” on it has every second hole filled in; the tray with a “3” has every third hole filled in; and so on.

When the trays are stacked together, the holes you can see through correspond to prime numbers: every other number is filled in on one of the trays.

I went through quite a few iterations of this design. The first version was a series of nesting trays. After printing it, I realised that you might want to put the trays in a different order. After that, I did a lot of fiddling with different ways of making the plates stack on top of each other. The final version has sticky-outy pegs at each corner, and corresponding holes on the other side. I had to add a fair bit of margin around the holes so the wall didn’t go wiggly when printed.

You can download .scad and .stl files for the prime number sieve at Thingiverse.

### My adventures in 3D printing: Wallis’ Sheldonian theatre roof

At work we’ve got a 3D printer. In this series of posts I’ll share some of the designs I’ve made.

The roof of the Sheldonian theatre in Oxford, built from 1664 to 1669, is constructed from timber beams which are unsupported apart from at the walls, and held together only by gravity.

### My adventures in 3D printing: Spherical pseudo-cuboctahedron

At work we’ve got a 3D printer. In this series of posts I’ll share some of the designs I’ve made.

This shape is a “spherical pseudo-cuboctahedron”, prompted by a request from Jim Propp on the math-fun mailing list.

It has 24 vertices, 12 edges and 14 faces. That doesn’t satisfy Euler’s formula $V – E + F = 2$, so it can’t be a proper polyhedron – hence “pseudo-cuboctahedron”.

However, if you push all the vertices onto the surface of a sphere, all the edges are spherical arcs, it sort of works.

While designing this object, I got fed up with OpenSCAD‘s awkward control syntax, and switched to Python. I wrote Python code to produce the coordinates of points along the edges, which the SolidPython library turned into something that OpenSCAD can cut out of a sphere.

### My adventures in 3D printing: Write Angles Cube

At work we’ve got a 3D printer. In this series of posts I’ll share some of the designs I’ve made.

This is one of the first ‘proper’ things I’ve designed – I wanted to have a go at making something based on an object I already had. A colleague asked if I could make some props to explain coordinate systems, and I was holding a whiteboard pen at the time, so I decided to make a set of orthogonal axes out of whiteboard pens.

### Make your own bauble with icosahedral symmetry with Shapeways

Internet 3D printing emporium Shapeways has released a nifty little tool to create your own unique Christmas bauble, which they’ll print out and send to you in time for the festive season.

It works by mapping a triangular design onto a blown-out icosahedron, and applying some “kaleidoscope effects”. As far as I can tell, that means they expand and rotate the patterns so they overlap.

There’s a selection of built-in patterns you can choose from, or you can upload your own pattern to make a really unique decoration. However, because the resulting object needs to exist in the real world, you need to take care to make sure it all comes out in one connected piece. Shapeways have written some very clear instructions about how to achieve that.

Play: Ornament Creator from Shapeways

via Vladimir Bulatov on Google+, who seems to work for Shapeways now. Exciting!