How to Draw the Koan (like a First Year Maths Student)
We’ve been using MATLAB in my Maths by Computer module recently, and in my Geometry and Motion module, we’ve parameterised loads of different curves. So when I walked past the Koan the other day, I thought it might be fun to try drawing it in MATLAB.
So, first I needed to draw the base cone shape. I used an Archimedian cone, which is basically a spiral that goes out by the same step after each rotation, while also moving the same distance along an axis perpendicular to it. I chose to cut off the point of the cone, to make it look like the real thing. I also set the background colour to black and chose a light grey for the Koan’s body.
Next, I drew the line that separates the spinny bit from the not spinny bit of the Koan (strictly technical terms). I did this by choosing a height on the Koan’s body, then drawing a dark grey circle at that height and with a radius on the surface of the Koan, perpendicular to the axis of the Koan.
And then for the ellipses around the spinny bit of the Koan! Their x and y values were parametrised in the same way as the dividing circle, but because they’re on an angle, I also played with the sine on their z axis too. To flip the white ellipses, I just took the negative direction for the radius of the circles. To turn the blue ellipse, I flipped x and y – so using sine and cosine for the opposite axes.
And there you have it! Shapes up quite well, although obviously no replacement for the real deal.
Here’s my code, if you’re interested in trying it in MATLAB for yourself. I saved an m-file called drawkoan (so I can draw Koans on the fly…), but you can also just paste into the Command Window.