About Lew

Lifetime science geek. 'Nuf said.


The latest vistas from Curiosity put me in mind of Shelley’s sonnet.

“Look on these works, ye mighty, and despair.”

Of course, these are not the ruins of some civilization, but purely inanimate landscape. Yet, everything takes a form through a very leisurely evolution, compared to earth, and there it all sits, like some incredible junkyard.

Here is a simple panorama from the mastcam images of sol 1698.

… click to enlarge!

… Here’s the same scene on sol 1700, except for a forward displacement of Curiosity’s POV.

The very prominent knoll in the left foreground on sol 1700 can easily be located in the left middle ground on sol 1698.

The prominent features from the center to the lower right in the sol 1698 view are no longer in view on sol 1700.

The Martian Tree Stump

The “tree stump” on Mars was in the news this month, and it is indeed an interesting formation, of which there are countless examples in the Curiosity image gallery.  I don’t mind such fanciful descriptions, since it does bring attention to these images, and in fact my attention has flagged badly in the last few years, after having followed them assiduously in the early days.

I still have my PTGui panorama maker, and my “curiosity”, so I followed up on this one.

Since “You’re in the shop” I’ll share a minor glitch which vexed me greatly just yesterday, but today’s a new day and all is well.

I composed the following panorama which contains the frame from the Mast Camera that was publicized as showing a “tree stump”

Of course, it’s missing a piece! This does show that the panorama is composed of 8 separate ( overlapping ) images. But it is certainly a detraction. I spent maybe an hour trying to figure out what was wrong before I went ahead and let PTGui figure it out.

If you “click to enlarge”, then click the “+” to magnify, you will see the whole thing in the resolution of the “stump” panel that was in the news.

Well, then, today I found the following in the Raw image gallery:

So there we have it. ( This is an excerpt with the header note pasted on. ) So of course it was a simple matter to patch in and form the full panorama:

Much better! But what about this “stump” ? I looked for other images, and found the following from sol 1648, whereas this was sol 1647:

This is a panorama of 5 images from the mast cam, in color this time, as they usually are. Curiosity had moved “overnight” and you can see the large “fin” , which is to the right of the “stump” in both images, but this time the view of the “stump” shows lateral extension, indicating that the sol 1647 image was “edge on”.

Never fear, at center bottom we have a cylindrical post with some kind of runic marking! The poetry of Mars is never dead.

40 Eridani

40 Eridani is the designation of “a star” ( actually a 3 star system ) in the constellation Eridanus. One of these 3 stars is a White Dwarf, and famously the most easily accessible of this type to amateur observation.

All this became known to me in a recent conversation, and I noted, via my Starry Night software, that the current viewing window was drawing to a close this month of March, so I determined to get a photograph of it, as I have found that photography shows a lot that is undetectable at the eyepiece.

I use prime focus projection using my Nikon D5100 camera body mounted with an adapter on my Orion StarMax 127 mm, with a 1540 mm focal length. In this configuration it’s essentially a very long focal length camera lens, with an upright image through the view finder.

I have a “clocked” mount and I take a maximum 30″ exposure using a remote shutter release. This is pretty low end stuff compared to the deep sky shots you see with much more sophisticated amateur equipment and processing.

I can get good results, though, and in this case, the picture came out well.

40 Eridani

The bright yellowish star at lower right with the smaller white companion is 40 Eridani and the companion is the white dwarf. If you “click to enlarge”, you can easily see the small reddish close companion of the white dwarf, which I did not really expect to resolve, so of course I’m quite pleased with the picture.

Here’s an enlarged excerpt, just to celebrate.

40 Eridani close-up

There is a picture of 40 Eridani in Volume Two of the classic Burnham’s Celestial Handbook, called there Omicron 2, as “omicron” was the sequential designation, after alpha, beta, etc. of a pair of stars in the constellation Eridanus ( The River. ) Omicron 1 is not physically associated with the Omicron 2 system, aka 40 Eridani.

Just to complete the confusion, my Starry Night software shows Omicron 1 and Omicron 2 as “Beid” and “Keid”, which are “traditional star names”, although I read that the tradition in this case was officially adopted in 2016 ! Of course, Burnham’s does not use these names.

Anyway, the picture there is from an exposure at Lowell Observatory, of Pluto fame, taken around the same time as that discovery.

I took my photo and “pushed” the brightness and contrast to the maximum to bring out the background stars, then did a match-up with the photo illustration from Burnham’s. Here is a “blink comparison” using the Free Online Animated Gif Maker:

… click to run the animation.

It’s a little confusing at first glance, but hold your gaze on the stars above 40 Eridani ( in this orientation ) and you will see that they match almost perfectly. However, 40 Eridani “jumps up and down” .

I wasn’t looking for this and it threw me for a loop, but in reality, this is a record of the actual “proper motion” of this triple star system, relative to our solar system. In fact Burnham’s describes this motion and has a pair of illustrations showing the position circa 1934 and 1965.

I pasted these into one and added my observation ( in blue ) …

proper motion of Eridani 40

The blue imagery is a replication to scale taken from my high contrast image used in the blink comparison.

More on Proper Motion

The term “proper motion” in my experience, refers to the apparent angular movement of an object against an ideal inertial reference system centered on the sun. However, one might think that it ought to include the “third component” of the relative velocity, i.e. what is termed “radial velocity”.

Nevertheless, I think historical usage has treated these separately. This caused me some confusion in reference to a statement in Burnham’s that the “true space velocity is about 62 miles per second.”

I took this at face value at first, and assumed that the value must include the component of “radial velocity”, later mentioned. However, I don’t believe this is the case. The discussion was of “proper motion” as traditionally defined, so this “true velocity” was simply a conversion from angular to linear velocity along the apparent path in the sky.

The determination of radial velocity is a whole different question, since it involves physical analysis of the received light, and not any apparent motion of the object.

The question is mooted once we have the “proper motion” expressed in arcseconds per year, along with the “radial velocity” expressed in km/sec, or any such units for that matter.

In fact we may note that 186,000 = 62 X 3000, and I think this indicates that the value of 62 miles per second was being given as a “round number” for the transverse linear speed of 40 Eridani … i.e. c/3000 .

… but all this is a distraction! I just want to get an idea of the past and future apparent motion of 40 Eridani, and this can be based on a given specification of the proper ( angular ) motion, and the radial velocity.

With the understanding that the linear approximation won’t hold up forever, we see that we have a simple freshman physics problem of relative velocity between two objects, in this case the sun and 40 Eridani.

The trajectory of 40E wrt the sun is then a “great circle” in the sky, and wrt this path it is determined by the general equation for any such “fly by”, within a scale factor only for time.

The “zero point” of this trajectory is the point of closest approach, which provides the distance scale, and the time scale of the angular displacement is determined by this distance divided by the speed of the object.

That only leaves the determination of the point of closest approach of 40E to the sun, expressed as an angular displacement along its apparent path from its current position. I hope this diagram explains everything!

Here is my estimation of the apparent path in the sky of 40 Eridani over the next 19000 yrs, in accordance with the diagram above, and overlayed on a view from my Starry Night software:

The Incredible Cuboctahedron

On what basis I don’t recall, I was led into the contemplation of the generalized process of “cuboctization” which produces the cuboctahedron from the octahedron. This process is namely the connection of the midpoints of “neighboring” edges, to produce a new figure with vertices at these midpoints, and with the constructed edges.

It’s important to note that this figure, being composed of vertices and edges, is not necessarily a geometric solid, since the new vertices may not lie in a plane, to form a face. Nevertheless, we may proceed.

Of course the founding idea is the production from the octahedron


of the cuboctahedron, which may be regarded as a truncation of the octahedron, but in this case can be regarded as being produced in the manner described.
So we may proceed in this manner, and to arrive at the nub of the discussion in short order, we may present “cubocta5”, the result of applying the algorithm of edge midpoint connection four more times.
But here we have run aground. You can see that the four expected quadrilateral faces next to the green quadrilateral face in the center have been “bent”. Their defining vertices did not lie in a plane. We may remind ourselves that our procedure did not have any reference to faces at all, but only vertices and edges, so that we were only lucky up to this point to produce flat, or planar, four sided faces.

… but it’s close! So, what to do? Can we “flatten” these faces somehow, and produce a true cubocta5 polyhedron?

Never fear! A way was found. By retreating to the cubocta2, and adjusting the position of the vertices, we produced this version

All on a hunch, if you will. But that’s not half the story! At any rate, three iterations of our edge production algorithm produce the desired result. A truly remarkable figure with 192 vertices, 384 edges, and 194 faces. 8 of these faces are small triangles at the corners of a cube, and the remainder are quadrilaterals of varying proportions, but all perfectly flat.

If this figure “exists in the literature”, we would like to know, but at any rate, this version of it is original with us.

Some Numerology

It’s additionally remarkable that the entire figure can be specified in terms of small integers for the coordinates of the vertices, and there are only six distinct vertices required to produce the entire figure under octahedral symmetry. Here they are with the number of replications:

(24) 10 6 0
(24) 12 2 0
(48) 11 4 2
(24) 8 8 2
(48) 9 6 4
(24) 7 7 6

The 48 replications are the 6 permutations of the values times the 8 versions of each obtained by taking +/- each value, in combination.

since +/- 0 = 0, there are only 4 sign combinations for 10 6 0 and 12 2 0, and in the case of 8 8 2 and 7 7 6 there are only 3 distinct permutations, times the 8 sign combinations. Of course these add to 192.

Fun with Faulhaber

Because … just look at the guy!

Johann Faulhaber


Looks like a regular barrel of monkeys!

He is the namesake of Faulhaber’s Formula, although he did not formulate it, as Wikipedia points out, but he more than laid the groundwork, I think anyone would agree.

Unbeknowst to myself, I had been following in his footsteps ( a very short way, of course ) in my pursuit of mathematical diversions. His namesake formula is a generalization of the idea of finding a formula for the sum of integers, from 1 to N, each taken to a given power. Familar to many is the formula for the sum of integers, i, from 1 to N, which is remembered as “first plus last times n over 2” or with these fixed limits, N(N+1)/2 .

I had presented this rule in graphical form as :

Showing an N by N+1 rectangle divided into 2 pieces, each representing
the sum of 1 thru 5.

So, I had the thought of representing the sum of the squares of integers in like manner, and made these model pieces.

I originally made 3 pieces, and noticed that these fitted readily into the following form, noting that there is a left handed and a right handed version, even though each piece is mirror-symmetric:


So then with due attention to “handedness”, ( do we need same, or opposite ? … ) we get this result:


Noting that the bottom square of each piece is N x N, with N=7 in this case, you can see from the picture that the block thus formed is N x ( N + 1 ) x (2 N + 1 ), so 1/6 th of this value gives the sum of integers from 1 thru N, each squared.

Moving right along

All this transpired some time ago, and I don’t believe that I got as far as the name of “Faulhaber” at that time, being content with my “physical derivation”. Just lately I pursued the issue a little further, going as far as N=3 and N=4, using simple algebra, much as Faulhaber must have done in some form or another, although he went all the way to N=17.

My method was to assume a formula, e.g. for N=2, of the form sum_1_to_N(i^2) =
a N^3 + b N^2 + c N + d , and then require that, sum( (i+1)^2 ) – sum( i^2 ) = (i+1)^2. It’s all just bookkeeping and I got the required answer, then I went to N=3 and did the same thing, and “discovered” ( for myself ) the “well known” result that the answer is simply ( N(N+1)/2 ) ^2 … amazing! I never knew!

Flushed with excitement, I realized that this lent itself to a simple 2-d graphical representation, which I worked out easily, and here it is:

Looking at the left and bottom edges, you can see the sequence of 1 2 3 4 5 6 7, in alternating colors, which immediately gives the “squared” result for the sum just cited.

Then looking at the red bands, you’ll see that these contain, in sequence, 1 1×1 square, 3 3×3 squares, 5 5×5 squares, and 7 7×7 squares, representing the cubes of the odd numbers. The blue bands represent the cubes of the even numbers in the same way, except that one square is split into two identical rectangles at each edge, a necessity required for an even number of squares.

So there it is! I don’t know where else you might find this kind of diagram, but this one is my own production, at least.

Meet the Monster

That monster is the star, Deneb, familiar in the constellation Cygnus in the northern sky. It is among the brightest stars in the sky, but what cannot be obvious is that it far outstrips its visual rivals in intrinsic brightness, so that it is the bully in our neighborhood. It is a magnitude 1.25 star at a distance of 800 parsecs.

Now, the Sun has an absolute magnitude of 4.83, which is by definition its ideal visual magnitude at a distance of 10 parsecs. So to have a visual magnitude of 1.25, the Sun must appear 10^(.4*(4.83-1.25)) = 27 times brighter than it does at 10 parsecs. That means it must be 1/sqrt(27) times as distant , or about 3.7 parsecs away, or 216 times closer than Deneb, to show the same visual magnitude.

So, conversely, the earth would have to be orbiting Deneb at 216 AU if Deneb were to have the same apparent brightness as the Sun. That’s over five times the distance of Pluto from the Sun, which averages about 40 AU.

The period of an orbiting body is given by M/r^2 ~ r/T^2 or T ~ sqrt( r^3/M ), which embodies Kepler’s third law for a central body of a given mass, but allows us to account for a variable mass. Deneb has about 19 solar masses, so the “year” of this Deneb-earth would be sqrt( 216^3/19 ) = 728 earth years. Well, at least that’s comprehensible!

I was led into these contemplations after having taken the following photograph of Deneb, with its star background in the Milky Way, using my Nikon D5100 mounted on my telescope purely for its use as a “clocked” mount. The exposure is about 20 seconds, so the lack of guidance is not so bad, as long as I get reasonable alignment, for which purpose I have a well practiced system! … ( click to enlarge )


Let us now praise Neil Armstrong

I was working on this, having for some unknown reason taken a renewed interest in the Apollo program, and Apollo 11 in particular. I was reviewing the material at The Apollo Lunar Surface Journal on the Apollo 11 Landing, and was taken with the 5:00 AVI video clip attributed to Gone to Plaid. I can’t link to the video, as clicking on it just downloads it. I hope I don’t have 20 copies of it!

Anyway, it’s riveting. It’s got 1201 alarm stuff, and the final landing sequence down to “Contact light”. This is all from the camera mounted above the Lunar Module Pilot Position, on the right. It was mounted high so that it “looked down” as far as possible, and it’s a very different view from what Neil Armstrong had.

I got interested in all this because of the “boulder field” business, which caused Armstrong to take manual control and “go long” on the landing. In the film, you don’t really see it, so what’s up with that?

Well, really, I just stumbled into this from trying to locate the video frames in the LROC TIFF image of Tranquility base ( the skinny thing at the bottom of the page ) which shows Tranquility base down to the foot trails. Zoom in and out. It’s amazing.

So I got to matching this view with the video frames using Paint.net. Very time consuming! Especially when you think that there should be software somewhere that could match every frame seamlessly. Maybe someone’s done it.

The thing is that this gives a wider view, of which the camera view is just a part, and it occurred to me that I could infer Armstrong’s view from the symmetrically opposed window very easily. To be exact, it would be a view of a camera mounted on the opposite side under reflection through the center plane of the LM. This is taking into account the very extended “nose” of the LM, adjacent on each side to the windows, which confines the view of each window pretty much to its own side. So, I just took the geometric reflection of the camera view from the LM Pilot’s side to estimate the view from the Commander’s side. The first thing to notice is that the LM was apparently tilted to the Commander’s side to give him a more level and “deeper” view of the surface. Aldrin wasn’t even watching, anyway! He says he was too busy, but I might suppose this was all by arrangement.

The second thing to notice is that West Crater with its boulders was very much in view of the Mission Commander. Can you imagine?

Well, the following animated gif is pretty crude, but it is base on five second intervals starting at 2:06 of the video, and finishing just before touchdown, with the descent stage of the LM visible in the LROC image, indicating the touchdown point, of course.

Crude as it is, I think it shows that Armstrong had a clear view of “West Crater” with its boulder field, and I think you can see how he “skates” to go long at the end, and then has to deal with “Little West” at the last.


Slumming Andromeda

I’ve been doing prime focus photography with my Nikon D5100 and my Orion Starmax 127, millimeters, that is. The season has come around for the Andromeda Nebula, as I persist in calling it, and just tonight I got a good shot of it.

I had just been out the night before, but my shots were way out of focus, a chronic problem I have since the light is way too dim for autofocus, and the viewfinder is too small to visually discern a good focus in this light. Determined not to be thwarted, I went out again tonight with my aged Asus Eee, which I used to view my exposures and make iterative adjustments. Rather laborious, but effective.

So I got my in-focus shot of Andromeda. 30 seconds at ISO 6400 in a reasonably dark sky. The result looks pretty impressive on the viewfinder, as a nice bright blob. But let’s not get carried away! As might be expected, this is very down scale stuff.

Here’s an animated gif comparing my shot with a “pro” internet image ( Click to view ):output_GhKn2V

That’s M32 to the right, Andromeda itself being M31.

Well, there is actually detail visible in my exposure which is washed out in the bright core by the more sensitive exposure. You could say that, but really, it’s nice just to be out there and see it and do it yourself.

Unfolding the 6-cube

Of course, this is a followup to my previous post, but it merits a separate entry, I think.

It was only natural that I would want to push ahead to 6 from 5, but to do so, I abandoned my application of the “pivot principle” for a more simple and predictable “aufbau” technique, in which we add the 12 component 5-cubes one by one to build up all possible connected subsets of 2, 3, 4, …, 12 of which the last represents the possible unfoldings.

The simple principle is that all cubes are equivalent among the remaining pairs where neither member has been added. This limits the combinatorial excess of multiple versions of equivalent configurations under the symmetry operations of the 6-cube. These operations are the 6! reorderings of the axis labels times the 2 “flips” of the axis orientations, amounting to an impressive 46080 operations.

This number is what creates the time bound for the complete calculation. It took only 4 seconds to generate  2499470 candidate configurations of 12 cubes from the unique canonical representations of the 11 cube configurations:

$ time build1 < cube11 | wc -l

real 0m4.174s
user 0m4.085s
sys 0m0.124s

… however it took over 8 hours to reduce each of these to its canonical value, requiring just another minute for the final step:

$ time sort -u cube12.canon | wc -l

real 0m28.491s
user 1m37.750s
sys 0m0.310s

…  Of course, I saved the result in a file named cube12 , which has the “grep format” explained in my previous post:

$ head cube12
….00 ….01 ….10 …0.0 …1.0 ..0..0 ..1..0 .0…0 .1…0 0….0 1….0
….00 ….01 ….10 …0.0 …1.0 ..0..0 ..1..0 .0…0 .1…0 0….0 1….1
….00 ….01 ….10 …0.0 …1.0 ..0..0 ..1..0 .0…0 .1…0 0….0 1…0.
….00 ….01 ….10 …0.0 …1.0 ..0..0 ..1..0 .0…0 .1…0 0….0 1…1.
….00 ….01 ….10 …0.0 …1.0 ..0..0 ..1..0 .0…0 .1…0 0….0 1..0..
….00 ….01 ….10 …0.0 …1.0 ..0..0 ..1..0 .0…0 .1…0 0….1 1….1
….00 ….01 ….10 …0.0 …1.0 ..0..0 ..1..0 .0…0 .1…0 0….1 1…0.
….00 ….01 ….10 …0.0 …1.0 ..0..0 ..1..0 .0…0 .1…0 0….1 1…1.
….00 ….01 ….10 …0.0 …1.0 ..0..0 ..1..0 .0…0 .1…0 0….1 1..0..
….00 ….01 ….10 …0.0 …1.0 ..0..0 ..1..0 .0…0 .1…0 0…0. 1…0.

$ tail cube12
….00 …0.0 …11. ..0..1 ..0.1. .0…1 .1.1.. .11… 0..0.. 00…. 1.1…
….00 …0.0 …11. ..0..1 ..0.1. .0…1 .1.1.. 0…0. 0.1… 1..0.. 10….
….00 …0.0 …11. ..0..1 ..0.1. .0…1 .1.1.. 0…0. 00…. 1..0.. 1.1…
….00 …0.0 …11. ..0..1 ..0.1. .0…1 .1.1.. 0…0. 01…. 1..0.. 1.1…
….00 …0.0 …11. ..0..1 ..0.1. .0..0. .1.0.. .11… 0..1.. 0.1… 10….
….00 …0.0 …11. ..0..1 ..0.1. .0..0. .1.0.. .11… 0..1.. 00…. 1.1…
….00 …0.0 …11. ..0..1 ..1.1. .0…1 .1..1. 0…0. 1..0.. 1.0… 11….
….00 …0.0 …11. ..0..1 ..1.1. .0…1 .1.1.. 0…0. 00…. 1..0.. 1.1…
….00 …0.0 …11. ..0..1 ..1.1. .0..0. .1.0.. .10… 0..1.. 00…. 1.1…
….00 …0.0 …11. ..0..1 ..1.1. .0..0. .1.0.. .10… 0..1.. 1.1… 10….


OK, there are 502110 canonically unique unfoldings of the 6-cube into 5-cubes, but what does this even mean? Can we picture it in any way? I think we can! Although 6 orthogonal axes are a challenge to ones powers of visualization. Here was a first attempt at it:6cube

I should note that this is an example of Oblique Projection, which allows great latitude. Essentially, one can pick a “star” of any six line segments as representations of the six orthogonal unit vectors, with the only requirement being that each edge is represented by a parallel displacement of one of these.

Well, we can see that there are four tesseracts there, connected in a ring, but it really has the appearance of a “rat’s nest” and it does not make an attractive working model.

Much better is the idea I had of a “cubed cube” – a large cube whose corners are each split into a small cube whose vertices inherit the connections of the large cube. This is really just a refinement of the above, but a big improvement:


Now we come to the step of finding 5-cubes to use as building blocks for the unfoldings, and it just falls into our lap! There are six each of two varieties of 5-cubes evident. We will choose one of the six “cubed” faces of the large cube:


It is a “cubed square”. Can you see the other six 5-cubes? They each consist of 8 corresponding faces of the small cubes, connected by four large cubes, one at each corner. We needn’t worry about them, though, because all we need is the one we have, and all connections of the unfolding are made by parallel displacements along the 5 axes.

The two axes forming the large square provide a representation of the planar unfoldings of the 3-cube, with the connections formed by the overlap of the “edges” ( which are tesseracts. ) The other three axes are the axes of of the small cubes, which stack ( four at a time ) face to face to form a representation of the cubic unfolding of the tesseract.

Taken together, these comprise 5 independent lines of connection, but the split into a 2-d plus a 3-d component makes the job feasible as a manual step-by-step process using MS paint. Here is one result, arbitrarily produced:


This is 178th in the sorted list of 502210 canonical unfoldings. It’s early appearance can be accounted for by the simplicity of the scheme used, which relies exclusively on direct opposition of pairs.

178: ….00 ….01 ….10 …0.0 …1.0 ..0..0 ..1..0 .0…1 .1…1 0….1 1….1

Unfolding the 5-cube with grep notation

Maybe somebody’s already done this, but not as far as I know!

The Wikipedia Tesseract article has a link to a 1984 article in the Journal of Recreational Mathematics, Unfolding the Tesseract . I had come upon this by following a circuitous path starting from a new NYT Sunday Magazine puzzle which involved tiling a small grid into “islands in an ocean” according to certain rules. This led me into unfoldings of the cube because a few years ago I had “discovered” a simple unfolding which very easily “tiled the plane” with simple translations.

So I looked into unfoldings of the cube and came upon the generalization of the idea in the form of the above cited article, which enumerates with hand illustrations the 261 unique unfoldings of the tesseract, based on topological reasoning.

I found the article to be fascinating, but I had to think about it a while to see how this seemingly abstract reasoning connected to the actual block models of these unfoldings, but I think I mastered it, at least in intuitive terms: ( click to enlarge! )


Note the “reduced” tree diagram I drew at the top, showing that a pair of “opposites” which occupy two root nodes indicate that they can be appended to opposite sides of a “flat” piece of six cubes, corresponding to an unfolding of a cube into a flat plane of squares. In this and several other cases on the page, it can be done in two different ways. In fact, such cases account for a significant fraction of all the unfoldings, and there are many such intricate relationships among these 261 models, as one might imagine.

These include the idea I developed of “pivoting” around an edge to produce two different unfoldings from a given unfolding. This happens wherever three of the cubes form an “elbow”. The opposing faces of the elbow represent a single 2-d face in the tesseract, and either of the indicated opposing cubes can be “rolled” or “pivoted” to abandon an existing attachment and form a new attachment ( which exists implicitly in the tesseract. )

In fact every edge of the tesseract is part of three faces, and a condition of the unfolding is that at most two of these faces can be attached. This leads to a very “thick” relationship among the various unfoldings. Considered in the original tesseract, the attachments represent 7 faces out of the 24, no 3 of which share a single edge. So the “pivot” operation represents a replacement of either of the two faces sharing an edge with the third face.

It occurred to me that I could generate all the unfoldings by repeatedly applying this pivot operation wherever possible.

To do so we must ascend, or descend, to the lexical realm, where mere strings of characters represent the multidimensional geometry of the n-cube.

This brings us to “grep notation”, in particular the notion that “.” represents a “wild card” match to any character. Here, our alphabet consists only of “0” and “1”, and a “.” which can match either of them. So for example, if we have a cube represented by 000 001 010 011 100 101 110 111, we can define the faces of the cube by 0.. 1.. .0. .1. 0.. 1.. , and in fact a UNIX grep with each of these strings will select the points of the square face from a file containing each of the eight points, so defined.

Well, this notion easily conquers all interdimensional boundaries, and in a very intuitive way. Note that the “faces” of any hypercube are represented by e.g. ….0…. …1….. etc. with a constant string length, and the shared “subface” of these two faces is …10…. Also note, and this is remarkable, that you can grep a list of the subfaces by a face representation and find the subfaces shared by it.

Thinking of all this, I wrote a program to generate all the unfoldings of the tesseract by iteratively applying the pivot operations to the sets of new unfoldings found by the previous iteration. This requires that each unfolding be represented by a canonically unique element among the 2^n * n! representations related by reflections along each axis and permutations of the axis labels. ‘nuf said.

The familiar “cross” unfolding of the cube generalizes in a natural way to any dimension, and in four dimensions ( unfolded to three ) it is featured in the R. A. Heinlein story, And He Built a Crooked House.


In canonical grep notation this is:

..00 ..01 ..10 .0.0 .1.0 0..0 1..0

This is the “lexically least” of the 384 transformations comprised of the possible “flips”
( 0 1 ) of any set of axes along with “swaps” between pairs of axes generating all permutations of the ordering, applied to each of the face representations. The seven face reps are sorted on each line, and the lexically least of these is chosen as the canonical representation of the unfolding.

Since a line with ..00 will always “come out on top” we need only generate representations which contain it. This is done by applying a transformation which maps each term, in turn, to ..00, then applying the 16 transformations that leave ..00 invariant. This reduces the number of canonical candidates to 112. All this is done internally by the “canon” command:

$ echo “.0.0 ..10 ..00 ..01 1..0 .1.0 0..0” | canon
..00 ..01 ..10 .0.0 .1.0 0..0 1..0

( In this case all it had to do is sort the terms on the line. )

Starting from this canonical representation, note that there are 24 possible “pivots” :

$ pivot < net1 | wc -l

but only 5 canonically distinct results:

$ pivot < net1 | canon | sort -u | wc -l

Proceeding in this way, and eliminating duplicates at each stage, I found that I got all 261 unfoldings of the tesseract with five iterations applied to the original representation:

$ wc -l net*
1 net1
5 net2
38 net3
118 net4
91 net5
8 net6
261 total

So, moving right along, starting from:

…00 …01 …10 ..0.0 ..1.0 .0..0 .1..0 0…0 1…0

and using the same programs, mutatis mutandis, I found the unfoldings into 4-space of the 5-cube, mentioned in the cited 1984 article as being possibly intractable:

$ wc -l net*
1 net1
5 net2
47 net3
344 net4
1902 net5
4836 net6
2489 net7
70 net8
9694 total

So there’s the answer! I don’t see anything relevant with a search on 9694, so I’m sticking with the fond hope that this is an actual original result.

I’ll mention that I did this manually in stages using the sort and uniq UNIX command ( but not grep ! ) along with my purpose written C programs “pivot” and “canon”. The command with the longest elapsed time was:

$ time pivot < net6 | canon | sort -u >net7

real 1m47.384s
user 1m49.090s
sys 0m0.045s

The Power of the Pivot

It’s puzzling that this geometric idea of the Pivot should give the same enumeration as the one based on topological “pairings” . I can’t spell it all out yet, but here is an indication of why this works out. These pivot operations have simple intuitive rules and can be directly applied to the unfolded models, e.g. the 3d unfolding of the tesseract.

Here is an animated gif showing how a series of pivots can switch around the opposite pairs of cubes, which are namely ( 0…, 1…) ( .0.., .1..) (..0., ..1.) ( …0, …1) in the grep notation. In the animation each pair is indicated by a separate color. The animation shows how the green and blue pairs can be switched by a sequence of pivots, even though they are not symmetrically placed. In the first place the green and yellow pairs are symmetrically equivalent, but after the switch the blue and yellow pairs have that symmetrical placement.

In general, it must be true that the pivot operations produce all the equivalent configurations with the 24 permutations among the  colors.

Here, the last frame of the animation shows a simple rotation of the resulting configuration for comparison with the initial configuration. Also the leftward motion of the blue cubes represents two pivots taking place at once.