```
off_align -F z4.off,0,1,0 cube | off_align -F z4.off,4,1,2 | \
off_align -F z4.off,1,1,1 | off_align -F z4.off,2,1,3 | \
off_align -F z4.off,0,1,2 | off_align -F z4.off,0,1,3 | antiview
```

And then that’s subtracted from six J_{91} surrounding a cube (essentially) because, yes, six J_{91 }will fit around a cube:

off_align -F J91,1,1,0 z4_6.off | off_util -M b | off_align -F J91,21,1,0 | \ off_util -M b | off_align -F J91,83,1,0 | \ off_util -M b | off_align -F J91,103,1,0 | \ off_util -M b | off_align -F J91,41,1,0 | \ off_util -M b | off_align -F J91,61,1,0 | \ off_util -M b | antiview

So, yeah, a regular faced polyhedron with three mutually perpendicular tunnels passing through its center.

]]>

off_align -F z4.off,1,1,4 j91 | off_util -M b | antiview

You see it here after off_color -f S:and here it is with some outer faces removed so you can see the Z_{4 }tunnel:

]]>

off_align -F J2,5,0,5 J63 > piece1.off off_align -F piece1.off,5,6,9 J91 | off_util -M b -M a -x V | \ off_align -F piece1.off,8,6,6 | off_util -M b -M a -x V | antiview

I checked out *Adventures Among the Toroids* again. Not sure when the library stopped stamping due dates in books but the last and (I think) only stamped date after the book’s acquisition in 1982 was June 2, 2008, which presumably was me. It’s mine again for the next year if it’s not recalled.

]]>

```
off_align -F oct,0,0,0 oct | off_align -F J27,2,0,3 | \
off_util -D f19,8 | antiview
```

(which stacks and merges two octahedra, stacks them inside a triangular orthobicupola and subtracts them from it, removes the two additional coincident faces which off_align doesn’t, and then displays the result). If you don’t have Antiprism but you have something that’ll display OFF files, here it is: https://drive.google.com/open?id=1M_a474kL95XMdTl4qHHfH6AfCrm2Tnfw. And if you have neither, here’s a static image of it:And no, I am not planning on doing the same for J_{91}/Z_{4} anytime soon. Feel free to take that on yourself.

]]>

And what are the Archimedean solids? They’re polyhedra, as you can presumably figure out from the pictures; like the Platonic solids (or regular polyhedra), they are convex polyhedra, their faces are regular polygons, and all the vertices are congruent. Unlike the Platonic solids, their faces are not congruent. The prisms and antiprisms (take two congruent polygons with unit length sides, place them in parallel planes a unit apart, and connect each vertex of one to the corresponding vertex of the other, making squares all around; that’s a prism. Do the same but rotate one of the polygons and put it a little closer, so you can connect each vertex of one polygon to two vertices of the other with unit length lines, making equilateral triangles all around; that’s an antiprism. There’s an infinite number of each, corresponding to all possible polygons — though a square prism is just a cube, and a triangular antiprism is an octahedron.) satisfy these requirements but are regarded separately. And the (deep breath) elongated square gyrobicupola or pseudorhombicuboctahedron satisfies them too, but isn’t usually counted: Archimedes didn’t (he may not have known about it), and its vertices are congruent but not transitive — which means it lacks the kind of rotational symmetry the other Archimedean solids (and the prisms and antiprisms) have. There turn out to be thirteen Archimedean solids, and Archimedes enumerated them all.

How? Well, he was a friggin genius, wasn’t he?

But also, you don’t have to pull them out of thin air. You can construct them all using the regular polyhedra as a starting point. I’m not saying it’s easy, but you can.

What’s easier, and gives you the general idea of how it would work for polyhedra, is to do the analogous thing with tilings of the plane — which, in a way, are like degenerate polyhedra.

For instance, start with a regular tiling of the plane — one with congruent convex regular polygons and congruent vertices, such as:

This tiling has 4 squares around each vertex, so we’ll call it 4444. Now we truncate the vertices. What that means is to remove each vertex and replace it with a polygon whose vertices lie on the edges that met at that vertex, like so:

In this case since there are 4 edges at each vertex, the polygon is a square. If you make the new squares just the right size, then what’s left of the original squares is regular octagons. The result is:

A uniform, but not regular, tiling using octagons and squares — all convex regular polygons, and all the vertices are congruent, but the polygons aren’t. There are 2 octagons and a square at each vertex, so we call this 884.

If you make the new squares larger and larger, then the diagonal edges of the octagons get longer and longer and the vertical and horizontal edges get shorter and shorter, and eventually (when the new squares’ vertices are the midpoints of the edges of the original squares), the vertical and horizontal edges of the octagons vanish and the octagons become squares… which are congruent to the new squares, so you end up with:

Which is just the 4444 tiling we started out with, rescaled and reoriented. This operation is known as rectification.

What happens if you truncate or rectify 884? Under rectification the octagons become smaller, re-oriented octagons; the squares become smaller, re-oriented squares, and the vertices become triangles:

This is a tiling, but not a uniform one. For one thing the triangles are not regular — they aren’t equilateral. For another thing the vertices aren’t all congruent. Truncation similarly doesn’t work out.

So let’s move on. Another regular tiling is the beastly 666:

Of course there is also 333333:

but that’s dual to 666 and it turns out we can’t get anything from 333333 we can’t get from 666.

Truncating 666 turns the hexagons into dodecagons, with the vertices replaced by triangles:

Two dodecagons and a triangle at each vertex, so it’s 12-12-3.

If we rectify 666, we still get triangles at the vertices but the hexagons become smaller, re-oriented hexagons:

Which is 6363.

Let’s start with that, now, and try truncating it. (The resulting polygons get pretty small on the same scale, so I’ll enlarge it.)

Well, that’s not good. The hexagons become regular dodecagons, but then the triangles become irregular hexagons, and the vertices become rectangles, not squares. But! Unlike the rectified 884, this one can be salvaged: push things around a bit and the rectangles can be made square, the hexagons regular:

And that’s uniform, 12-4-6.

Likewise if you rectify 6363 the vertices become rectangles, but you can move stuff around to make them into squares, like this:

6434.

Now for something completely different. Look at 884. What happens if you remove every other vertex of each octagon, thereby turning the octagons into squares? Leave the original squares alone. Like so:

You create lozenge-shaped gaps between the squares. They could be divided on a diagonal to make two very non equilateral triangles. That would be a tiling but not a uniform one.

But again, you can adjust the positions and sizes and angles of the squares to make the triangles come out equilateral. The result is this:

This is 43433.

You can do a similar thing with 12-12-3. Alternate the dodecagons to make them hexagons, leaving the triangles alone; divide the remaining space into triangles; adjust to make the polygons regular:

This is 63333. Alone of the uniform tilings, it is not mirror symmetric. That is, there’s another form of it which can’t be obtained from the first by translation or rotation:43433 and 63333 are called snub tilings. Another way to think of them is you start with the regular tilings 4444 or 666 and pull them apart in all directions, creating gaps between the squares or hexagons, which you then fill with triangles, twisting the squares or hexagons as needed to make them fit.

There’s one more uniform tiling and you could think of it as a sort of half snub: Take 4444 and pull it apart in the vertical direction only, filling in the horizontal gaps with triangles:

It’s 44333. You can also think of this as 333333 pulled apart in the vertical direction with the gaps filled in with squares. It’s a planar analog of antiprisms and prisms, kind of.

That’s the lot. There are other transformations you can apply to create a new tiling from an existing one, and we haven’t tried applying all the transformations discussed here to all the tilings, but if you do you get either non uniform tilings or uniform tilings we’ve already found.

Left to the reader as an exercise: Do the same thing starting with regular polyhedra. Construct all the Archimedean solids. Extra credit: Uniform honeycombs of 3-space and uniform 4-polytopes.

]]>

There’s some similarity between calculating the phase of the moon for a given date and calculating the day of the week for a given date. Also some differences.

Similarly, how one does it depends on whether one’s doing it in one’s head or on a computer. (And how one does it on a computer depends on the software environment. Modern software libraries tend to make calculating the day of the week a complete non-problem, for instance. Whereas if you were programming in FORTRAN in the 1970s, it was on you.)

Differently, though, in terms of accuracy. The phase of the moon varies continually and slowly enough that getting it right to within a day or so is probably good enough, at least if you’re doing a mental calculation; if more precision matters, you probably want to do it in software anyway. Whereas if you want to know if June 17 is a Monday, finding out it’s probably within a day or so of Monday isn’t likely to be good enough. For the day of the week, either it’s right or it isn’t.

Anyway, if you were to do it, how would you do it?

We’ll specify a date with century, year, month, and day numbers. The day number *D* is just the number from 1 to 31 denoting which day of the month it is. Now, for month numbers, *M*, because leap years make things so complicated, let’s use years that start on March 1 and end on February 28 or 29. Within a March-to-February year we can figure out the number of days between any two dates without having to worry about whether it’s a leap year or not. So instead of *M* running from 1 (January) through 12 (December) we’ll use 3 (March) through 14 (February). January and February will be regarded as belonging to the preceding calendar year. For March through December the year number *Y* is the last two digits of the year (AD) and the century number *C* is the preceding digits. For January and February, use the same *Y* and *C* as for the preceding March.

What about BC years? Forget ’em. We’re dealing with Gregorian calendar only here because otherwise, ow. You can develop formulas for Julian calendar and BC and whatever else on your own, if you insist.

Okay. For 10 Apr 1937 we have *C* = 19, *Y* = 37, *M* = 4, *D* = 10. For 2 Feb 1600 we have *C* = 15, *Y* = 99, *M* = 14, *D* = 2. Got it?

If you know (*x*+1) mod 7, the weekday (encoded as an integer from 0, for Sunday, through 6, for Saturday) of the 1st of the month, then the formula for any other day in that month is simple: (*x *+ *D*) mod 7.

How do you get *x*? If every month were 30 days then it’d be (*y* + 30(*M*–3)) mod 7 = (*y* + 2*M *+ 1) mod 7, and therefore the weekday of month *M* day *D *would be (*y* + 2*M *+ 1 + *D*) mod 7, where (*y* + 1) mod 7 is the weekday of 1 Mar. But unfortunately it’s more complicated. “Thirty days hath September…” (Or do you know this trick? Make a fist with your left hand. You have four knuckles, and three valleys between the knuckles. Label the knuckles and valleys with the month names starting from January; that and March and May and July are knuckles, February and April and June are valleys. Continue on the right fist: August, October, and December are knuckles and September and November are valleys, with a knuckle and a valley left over. The knuckle months have 31 days, the valley months don’t. You can get “JMMJ AONx” tattooed on your knuckles, if you want a good conversation starter.)

1 Mar is day 1 of the year, or 0 days more than (3–3) x 30 + 1. 1 Apr is the 32nd day, or 1 day more than (4–3) x 30 + 1. 1 May is the 62nd day, or 1 day more than (5–3) x 30 + 1. And so on. The whole table for the number of days more than 30 x (*M*–3) + *D* days past the last day of the preceding year is:

March | 0 |

April | 1 |

May | 1 |

June | 2 |

July | 2 |

August | 3 |

September | 4 |

October | 4 |

November | 5 |

December | 5 |

January | 6 |

February | 7 |

So now if you know *y*, and you’ve memorized that table (call those numbers *m _{M}*) then the formula becomes:

(*y* + 2*M +* 1 + *m _{M}* +

Memorizing that table’s a pain, but what else can you do? (Well, see below.) Note we can absorb additive constant values into *y*, so let’s just use

(*y* + 2*M* + *m _{M}* +

and just define *y* as whatever works.

Now, if you know the weekday of a date in some century, and if there were no leap years, then you could get the weekday for any date in that century just by using

(*z* + *Y* + 2*M* + *m _{M}* +

because in any year the weekday for a given date is one later than it was the previous year. (365 mod 7 = 1.) Here *z* is, well, it’s what makes the formula come out right for the date you know.

But there are leap years, which add another 1 day shift from one year to the next. So we have to add 1 for each leap year from year 0 through *Y*–1, inclusive. Recall that *Y* = 0 is *not* a leap year, in any century, because by *Y* = 0 we mean 1 Mar of calendar year 0 through 28 Feb of calendar year 1. On the other hand *Y* = 3 is 1 Mar 03 through 29 Feb 04, and *is* a leap year! It won’t shift any days in that year but it’ll shift days starting in *Y* = 4. So — ignoring the century leap year rule for a moment — the number of leap years to take into account is just floor(*Y*/4). We have to add that number to our tally.

So for dates in that century we use:

(*z* + *Y* + floor(*Y*/4) + 2*M* + *m _{M}* +

How about dates in the next century? Well, in most cases a century year (our *Y* = 99 year) is *not* a leap year so there are 24 leap years and 76 standard years in a century, or 24 x 2 + 76 x 1 mod 7 = 5 weekdays shift. If all centuries were like that it’d be

(*z* + 5*C* + *Y* + floor(*Y*/4) + 2*M* + *m _{M} *+

I’m still calling the constant *z*, but it’s whatever makes things work.

But every 400 years we *do* have a leap year. So we have to add 1 day back in for every four centuries:

(*z* + 5*C* + floor(*C*/4) + *Y* + floor(*Y*/4) + 2*M* + *m _{M}* +

Now we just need to determine *z*. Pick a day at random, oh let’s say Tuesday, 2 Jan 2018. Then it’s (remembering *Y* = 17 and *M* = 13 for January 2018)

(*z* + 5 x 20* *+ floor(20/4) + 17 + floor(17/4) + 2 x 13 + 7 + 2) mod 7

= (*z* + 2* *+ 5 + 3 + 4 + 5 + 6 + 2) mod 7

= (*z* + 6) mod 7

But this should equal 2 for Tuesday, so *z* = 3.

And now we can do any date. 17 Apr 2733 is:

(3 + 5 x 27 + floor(27/4) + 33* * + floor(33/4) + 2 x 4 + 1 + 17) mod 7

= (3 + 2* *+ 6 + 5 + 1 + 1 + 1 + 3) mod 7 = 1 = Monday. Right, cal(1)?

```
$ cal 4 2733
April 2733
Su Mo Tu We Th Fr Sa
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
```

Right!

Oh, one more thing:

The red dots are the values of *m _{M}* plotted versus

(3 + 5*C* + floor(*C*/4) + *Y* + floor(*Y*/4) + 2*M* + *m _{M}* +

if you’d rather you could use

(3 + 5*C* + floor(*C*/4) + *Y* + floor(*Y*/4) + 2*M* + floor((6*M* – 13)/10) + *D*) mod 7

So just memorize the first formula and *m _{M}*, or memorize the second formula, and keep in mind you have to use

… Either way, the lunar phase is easier.

]]>

It’s *mostly* fairly obvious once you start thinking about it. For instance, suppose you know the age of the moon on a given day. Then its age a day later is, kind of obviously, one day more. Except when you hit new moon and it resets, every 29.53… days, and doing modulo 30 approximately accounts for that. So it makes sense for the formula to be something like (*x*+*D*) mod 30, where *D* is the day number and *x* doesn’t depend on the day (it’s approximately the age, minus 1, on the first of the month).

Now suppose you know the age of the moon on the first day of a given month. Then its age a month later is…? Well, in a 30 day month it’s about 0.47 days more, that is, 30–29.53; in a 31 day month it’s 1.47 days more. Or in an average month of about 365.25/12 = 30.52 days it’s *very* close to 1 day more. (Actually, since we’re working within the 2000 to 2018 Metonic cycle, the average year length that counts is 1/19 of five leap years and 14 normal years, which comes out to 365.263 days, not that the difference matters much.) If it weren’t for February it’d make sense for the formula to be something like *(y+M+D)* mod 30, where *M* is the month number and *y* doesn’t depend on the day or month (it’s the age at the start of the year, minus 2).

February’s short, though. How to deal with that? Hang on, we’ll get there.

Now suppose you know the age of the moon on the first day of a given year. Then its age a year later is… well, 365.25 days is 12.36 synodic months, so the age advance is 0.36 x 29.53 = 10.9 days. For a decent approximation, 11 days age advance per year, so a formula something like (*z*+(*Y* x 11)+*M*+*D*) mod 30, where *Y* is (last two digits of) the year number and *z* is a constant (the age on 1 Jan 2000, minus 2), would seem reasonable. If it weren’t for February.

It’s too bad February isn’t the last month of the year, then you wouldn’t have to deal with its shortness. Well, *make* it the last month of the year! Let’s pretend the year begins on March 1. Now within a month each day is a day greater age than the previous; within a (March-to-February) year each month is a day greater age than the previous; and each year is 11 days greater age than the previous. Looked at like this, we don’t have to worry especially about the age advance from February to March. So we could use a formula like the above, if we said March was month 1, April month 2, … January month 11, February month 12, and if we used the preceding year number in January and February. That is, for months March through December use

(*z*+(*Y* x 11)+(*M–2)*+*D*) mod 30

(here *M* is still 3 for March, et cetera) and for January and February use

(*z*+((*Y–1)* x 11)+(*M+10)*+*D*) mod 30 .

That gets a little complicated, though. But we haven’t defined *z* yet; we can absorb additive constants into it. That is, redefine *z*–2 as *z* so we have for March to December

(*z*+(*Y* x 11)+*M*+*D*) mod 30

and for January and February

(*z*+((*Y–1)* x 11)+*M+12*+*D*) mod 30 .

But now notice the latter is equal to

(*z*+(*Y* x 11)–11+*M+12*+*D*) mod 30

or

(*z*+(*Y* x 11)+*M+1*+*D*) mod 30

which means we don’t have to mess around with the year number or with month numbers like 13 and 14; just use the same formula for all months, except add 1 in January and February!

Nearly there. We just need to establish *z*. The age of the Moon at 00:00 UTC on 1 Jan 2000 was 23.882 days, so *z* is 20.882 or about 21. Or more conveniently, about 22, so we can replace *z*+(*Y* x 11) with ((*Y*+2)x 11), and that’s the formula. There are enough approximations here that one can justifiably worry about their accumulating to large errors, but in fact they tend to cancel out. (1 day per month is nearly exact, modulo 30 arithmetic gives you age increases that are too small, 11 days per year gives you age increases that are too large for non leap years and too small for leap years, *z*=22 means you start out the cycle with an age that’s too large. Sticking with *z*=21 would have made 1 Jan 2000 more accurate but would have led to too large errors later in the cycle.)

What’s the phase of the moon on [insert date here]? Do it in your head.

This is something I found on the Internet once, don’t know where; I learned it but eventually forgot it. Having put it back together again I’m posting it here for future reference. It’s more or less similar to the method, attributed to John Conway, described at much greater length at http://gmmentalgym.blogspot.com/2013/01/moon-phase-for-any-date.html. The two are not mathematically equivalent, though, giving slightly different results for some dates. See below.

To start with, assume the required date is in the range from 1 Jan 2000 to 31 Dec 2018. Take the last two digits of the year, add 2, and multiply by 11.

(Good thing multiplying by 11 is easy. You just add the two digits to the same two digits shifted one place left: e.g. 17 x 11 = 17 + 170 = 187. Or another way to think of it: the last digit of the result is the same as the last digit of the original number, the first digit of the result is the same as the first digit of the original number, and the middle digit of the result is the sum of the two digits of the original number. Of course if that sum exceeds 9, you have to add 1 to the first digit of the result.)

Now add the number of the month — 1 for January, 2 for February, and so on, 12 for December. *If the month is January or February, add another 1.*

Now add the day of the month.

Now divide that number by 30 and take the remainder. The result is, approximately, the age of the moon — the number of days since the new moon. 0 or 29 would be new moon, 14 or 15 would be full moon, about 7 would be first quarter, about 21 would be third quarter. It might be off a day or so (again, see below), but close enough for mental calculation, right?

What about dates outside that range? The moon returns to the same phase every 19 years exactly — or almost exactly; actually more like 19 years plus 2 hours. This is called a Metonic cycle. So add or subtract a multiple of 19 years to get into the 2000–2018 range and then proceed as above. Obviously for dates far in the past or future this breaks down, but for dates in the past or future few decades it’s fine.

**Example:** July 20, 1969. This is outside our 2000–2018 range but if you add 2×19=38 years you have July 20, 2007. So: for year 2007, (7+2)x11 = 99; for month 7 add 99+7=106; for day 20 add 106+20=126. To get the remainder when divided by 30, subtract the multiple of 30: 126-120=6. Age of the moon is 6 days, corresponding to just about first quarter. Of course July 20, 1969 is the date of the Apollo 11 landing. If you do the same for the other moon landing dates you get ages in the range 5 to 9. For reasons having to do with the angle of the Sun, NASA chose to do all the moon landings at about first quarter.

**Example:** January 1, 2018. (18+2)x11 + (1+1) + 1 = 223; 223-210=13. The moon is (about) 13 days old on New Year’s Day, so is close to full. In fact full moon occurs at about 2:00 UTC on January 2, or evening of January 1 in the United States. We get two full moons in January *and* March, none in February!

How well does this work? It depends on how you define “how well”. You’re getting an integer estimate of the age of the moon, which you can compare to the actual age of the moon… when? At 00:00 UTC? Noon?

Choosing to compare to the age at 00:00 UTC, here’s a plot of the error in this calculation for the years 2000 to 2018. There are just two dates where it’s more than 1.6 days off and most dates — 6269 out of 6940 —are less than 1 day off.

For years outside this range but within the nearest 4 Metonic cycles each way (i.e. from 1 Jan 1924 to 31 Dec 2094) I find there are only two dates where the error is (slightly) larger than 2 days, and average errors in each cycle are under 0.35 days. Outside that 171 year range it gets worse.

And here’s a comparison to the results of the method from gmmentalgym. The blue line is the same as above and the red line is gmmentalgym; they coincide for the first 10 years so you see only the red there. After that they differ by 1 day.

You can see gmmentalgym is systematically high in the second half of the cycle, so does worse. Note, though, that if we compared to the age at noon UTC, it would shift this whole graph down by half a day and the red line would be better than the blue.

On the other hand, here’s the 1962–1980 cycle (comparing at 00:00):

Here it looks like the gmmentalgym method is a little better, but would be much worse if comparing at noon UTC. On balance, I wouldn’t say either method has the clear upper hand — they’re both decent approximations, easily done in one’s head.

]]>