I recently came across this video: Mathematically correct breakfast, which shows how a bagel can be neatly sliced into two identical linked halves.

enter image description here

I'd like to try this with Mathematica. Here's a torus bagel and a Möbius strip cut overlaid. How can I slice the bagel along this cut to create the two halves and pry it open?

With[{opts = {Mesh -> False, Boxed -> False, Axes -> False}},
     bagel = ParametricPlot3D[{Cos[t] (3 + Cos[u]), Sin[t] (3 + Cos[u]), Sin[u]}, 
        {t, 0, 2 Pi}, {u, 0, 2 Pi}, opts, 
        PlotStyle -> Directive[Opacity[0.3], FaceForm[Orange], Lighting -> "Neutral"]];
     cut = ParametricPlot3D[{Cos[t] (3 + r Cos[t/2]), Sin[t] (3 + r Cos[t/2]), r Sin[t/2]}, 
        {r, -1, 1}, {t, 0, 2 Pi}, opts, 
        PlotStyle -> Directive[Opacity[0.9], FaceForm[Gray], Lighting -> "Neutral"]];
bagel ~Show~ cut

enter image description here

Although I've used a Möbius strip for the cut, I have a feeling it is a 2-twist strip because of the two sides — I haven't been able to fit this correctly inside a torus...

  • $\begingroup$ I saw the image of the bagel and said to myself, "I bet Professor Hart made that.." $\endgroup$ Jun 28, 2012 at 4:57

2 Answers 2


Here's one way to slice the donut. To draw one half of the sliced donut I'm using a parameterisation of a torus similar to the one on wikipedia, but with v replaced with u + v and v running from 0 to Pi instead of 2 Pi. This means that the cut is actually a double twist loop.

pl = ParametricPlot3D[{{Sin[u] (2 + Cos[u + v]), Cos[u] (2 + Cos[u + v]), Sin[u + v]},
   {Sin[u] (2 + (2 v/Pi - 1) Cos[u]), Cos[u] (2 + (2 v/Pi - 1) Cos[u]), 
    (2 v/Pi - 1) Sin[u]}}, 
  {u, 0, 2 Pi}, {v, 0, Pi}, Mesh -> False, Boxed -> False, Axes -> False]

Mathematica graphics

We could plot the other half in a similar way but to show that the two halves are identical, you can take pl and rotate it over 180 degrees around the z-axis:

Graphics3D[{pl[[1]], Rotate[pl[[1]], Pi, {0, 0, 1}]}, Boxed -> False]

Mathematica graphics

To pry the two halves open, we need to simultaneously rotate and translate one of the halves, for example

   Translate[Rotate[Rotate[pl[[1]], 180 Degree, {0, 0, 1}], -a Degree, {1, 0, 0}], 
  {1.8 a/90, 0, 0}]}, Boxed -> False], 
 {{a, 0}, 0, 90}]

Mathematica graphics

Here's an animation of the process:

enter image description here

  • 3
    $\begingroup$ As a tiny mathematical note, the derivation of the parametric equations {(c + b Cos[u + v]) Sin[u], (c + b Cos[u + v]) Cos[u], b Sin[u + v]} might be slightly clearer if seen in matrix-vector format: RotationMatrix[-u, {0, 0, 1}].({0, c, 0} + RotationMatrix[u, {1, 0, 0}].{0, b Cos[v], b Sin[v]}) $\endgroup$ Jun 28, 2012 at 15:18
  • $\begingroup$ @Heike, Marvellous!! You could perhaps also animate both ways, slicing, putting back (like after applying butter and jam)! I had earlier played with Villarceau Circles, but this one is more fun...I had also uploaded an image here or in SE Math with a Moebius partition (single twist) without showing opening up rotation of one of the two halves.. $\endgroup$
    – Narasimham
    May 18, 2016 at 19:04

(This was supposed to be a comment, but it got a bit too long.)

Heike depicted the "sliced bagel" as a composite of two surfaces. Here's how to plot it as a single surface:

With[{c = 2, b = 1}, 
         RotationMatrix[-u, {0, 0, 1}].({0, c, 0} +
         RotationMatrix[u, {1, 0, 0}].{0, b Cos[v], b UnitStep[Pi - v] Sin[v]})],
                  {u, 0, 2 Pi}, {v, 0, 2 Pi}, Axes -> False, Boxed -> False, Mesh -> False]]

sliced fake bagel

Now if only there was a way to realistically color the "bagel"...

fake bagel?

(If you think that last one is sufficiently "realistic", I'll add the Perlin noise routines needed for this coloring.)

  • $\begingroup$ That's an everything bagel right there! ;) The inside doesn't look like bready texture though :P $\endgroup$
    – rm -rf
    Jun 29, 2012 at 15:09
  • $\begingroup$ Yes, that's going to need some more thought on my end; that's why I didn't post code for the colored version for the time being. (Getting Perlin noise to do what you want can be difficult sometimes...) $\endgroup$ Jun 29, 2012 at 15:13
  • $\begingroup$ I'll wait patiently for some Perlin goodness :D $\endgroup$
    – rm -rf
    Jun 29, 2012 at 15:14
  • $\begingroup$ I could "toast" the bagel a bit more, if you guys want... or did I do okay with the current shade of brown? $\endgroup$ Jun 30, 2012 at 13:09
  • 2
    $\begingroup$ The appropriately named "Baked Goods" section of my website maths.ed.ac.uk/~aar/baked includes several references to bagel slicing, and in particular a topological analysis of the possible ways of linking/unlinking a bagel, which is related to the Maslov index. $\endgroup$ May 5, 2015 at 6:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.