relax

This curve-fitting thingy is one of several projects on which I’ve made progress in rare fits over several years. It ran into two big snags. I haven’t found how to determine which gridpoints are within the pen-width of a blending arc; two methods that ought to work don’t. (What would help: tutoring in drawing pictures in a MacOS display, so that I might have a better idea where they go wrong. And a pony.)

The other snag is this: For each pair of arcs, there is an infinite family of blending arcs; how to choose the osculation points to minimize rapid changes in curvature, while meeting the gridpoint constraints? ( . . more . . )

love or nothing

In *Watch on the Rhine* (1943; screenplay by Dashiell Hammett from a play by Lillian Hellman) the penniless Count remarks,

Blecher, we do not like each other.

The Nazi to whom he hopes to sell information replies,

But that will not stand in the way of our doing business.

To link such a sentiment to fascism implies a remarkable kind of snobbery.

dream geography

In a dream, while strolling among bookshops and the like, I chance to meet someone who hates me but is constrained to be polite. With a venomous smile that person asks, the better to avoid them, on what streets one is most likely to meet me. I name two streets in Oakland, one in Berkeley and one in San Francisco.

On waking, I remember that none of those streets exists.

models of the 35 smallest fullerenes

I noticed that Shapeways had 13 models of the roundest of the fullerenes (one of the 1812 forms of C60), but none of the less regular forms; so I made some.

Each of the white pieces has mirror symmetry; the red pieces are chiral. Not shown (because it hasn’t been printed yet): the blue set, which is a reflection of the red set. The idea is that you buy both red and blue if and only if you count reflected chiral forms separately.

These figures have 12 pentagons and up to 8 hexagons. They include the two smallest forms with no nontrivial symmetries, and the two smallest with no ‘peaks’ where three pentagons meet.

FCC cube generator

I could have used this a week ago.

def fccstack():
newlimit = 0
while True:
oldlimit = newlimit
newlimit += 1
# extend z
for x in xrange(oldlimit):
for y in xrange((x+newlimit+1)&1, oldlimit, 2):
yield (x,y,oldlimit)
# extend y
for x in xrange(oldlimit):
for z in xrange((x+newlimit+1)&1, newlimit, 2):
yield (x,oldlimit,z)
# extend x
for y in xrange(newlimit):
for z in xrange((y+newlimit+1)&1, newlimit, 2):
yield (oldlimit,y,z)
g = fccstack()
for dummy in xrange(512):
p,q,r = g.next()
print "%d %d %d\t%d" % (p,q,r, p+q+r)

This lists coordinates of sites in a face-centred cubic lattice, filling the smallest cube that contains the number of sites required.

some thoughts about packing

My bundle of 19 fullerenes is arranged in a face-centred cubic lattice, each ball occupying one of the 24 even-numbered cells of a 4×4×3 array (and parts of the adjacent cells). The spacing of the grid planes is determined by the sums of the radii of the circumspheres of nearest-neighbor balls.

There appears to be much more ‘daylight’ between balls than there needs to be. That’s not a problem here, as the size of the bounding box is not near the limits of the process; but still it got me thinking about how to tighten the packing. ( . . more . . )

in which I curse my lack of omniscience

I want to push several hundred greyscale images through a threshold filter, so that an output pixel is black or white according to whether the corresponding input pixel is less or more than 1/2 bright. (My goal is a ‘woodcut’ effect.)

ImageMagick can apparently do this with one command, but I lack a library that it needs.

GIMP has a menu command with this function, but to do it from a script it seems I’d need to learn Scheme.

I could write a program using Python Imaging Library (which I’ve used to output most of my mathematical designs in recent years), but so far in RTFM I can’t tell how to, y’know, access the pixels it reads in. **Later:** Found a better FM.

Wish me luck.