Some interesting maths from working on the dissertation. Yes, maths. I have to get used to the Queen's proper manner of speech.

I study a material that is readily exfoliated into sheets. The sides of each sheet are not the same. This dissimilarity causes the sheet to roll up. You might be wanting a figure right about now. Me too. The sheet structure is easy - that's just a matter of getting the crystal structure from some published source (e.g. ICSD). But how to turn this into a scroll? I tried Illustrator's spiral tool to create a path, but got lazy trying to re-create the brush that would represent the structure. Plus, a friend noticed that when the diamond patterns get too close to one another, illustrator puts white space between them (makes one or both of them thinner). That won't do for representations of reality!

So, I turned to the dark, non-artistic side: maths. You can draw a spiral pretty easily using polar coordinates. Check it out: if you have a line of length X, you can make a spiral by setting 2 things:

radius = x+inner radius of spiral
theta(angle) = some range of angles - how many times you want the spiral to make a complete circle.

In python with numpy and matplotlib:

import numpy as np
import matplotlib.pyplot as plt


and you get

2 circles, no offset from 0.

Well, cool, but I need the spacing between layers to be some well-defined value. You can play with starting radii and/or number of times around the circle (and I did, before I got tired of it). Mathematically, you can set the either of these, and determine the other based on the spacing you want.

Spacing = length of line / number of times around.

So, when I want a spiral with 5 unit spacing, and I start with an initial radius of 100, I get 20 spins around the circle:

And you want Cartesian coordinates, because what good molecular modeling software recognizes polar coordinates? The nearest plot already shows this, but here's how I got them. See how bumpy my lines are? Those are atoms! OOOO!


Basic geometry, I know, but I was proud of myself. Especially since I've been intending to figure this out for nearly a year and finally did it. And it only took me a day.