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
r=numpy.arange(0,10,0.001)
theta=numpy.arange(0,4*numpy.pi,4*numpy.pi/len(r)
plt.polar(theta,r)
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!
x=r*cos(theta)
y=r*sin(theta)
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.
Dear UK Bank system,
In case you were wondering, I hate you. Your absolute refusal to even consider any piece of reasonable evidence that I am worthy of an account (aside from proof of address) is ignorant, irrational and most of all irritating. You acknowledge that I cannot obtain an apartment (and thus an address) without a bank account, yet you insist on proof of address. This is in spite of my proof of employment, proof of clean background check for entry to your national laboratory, and proof that I have paid over 1500 pounds as a deposit on an apartment, which I cannot move into until I have a bank account. Truly your stubbornness puts even retarded donkeys to shame.
Sincerely,
An employed American with a Ph.D. who has zero debt, has made one late credit card payment in 10 years, and now would prefer to put his money beneath his mattress, if only he could actually be paid without your slimy services.