Implementation Philosophy for MC3D

by David Vanderschel

One of the main motivations for the original concept of this program was to create a simulation (yet another) of Rubik's Cube that was as nearly analogous to the way MC4D works as possible. From such a context, it should be easier to make points about MC4D is doing. As it turns out, the program has gone beyond that original concept; but the ability to configure it in a manner analogous to MC4D remains. See the discussion comparing them. (I tried to move all discussion related to MC4D onto that page, but some of it still deserves mention in this historical context.)

The program presents the puzzle by drawing only the stickers. I.e., the 3D model which is rendered by the program consists solely of 54 stickers suspended in 3-space. The rendering is a standard 3D to 2D projection with perspective. The failure of the program to render anything associated directly with cubies is deliberate, as this is analogous to the way MC4D works.

MC4D introduces shrinking of hyperfaces and hyperstickers so that a 3D observer can see between the resulting gaps between the projections of the hyperfaces and even between the resulting spaces between the projections of individual hyperstickers. Without the shrinking of hyperfaces and hyperstickers, we would not be able to see enough of the state of the complete 4D cube to be able to work with it.

Analogously, the program also provides shrinking of its 2D faces and stickers. Face shrinking remains in the original plane of the face and is performed relative to the center of the face. I.e., the face's face sticker does not move, and the others move closer to it. All become smaller by the amount of face shrink. After face shrink, additional shrinkage is applied to individual stickers relative to their own centers. I.e., this further sticker shrinkage does not cause the stickers to become closer to one another but just creates spaces between them. Using a slider in the GUI, the parameters which specify face and sticker size are continuously variable, and the program maintains a continuously updated picture to illustrate the result of varying these (and a great many other) parameters.

Check out Configuration #1 in the program. This is most nearly analogous to the way MC4D does its projection. The eyepoint for the projection is on the z-axis. By not displaying the Up face on top of the others, it is possible to see simultaneously all the other 45 stickers on the other faces. Note the surface of each of those stickers that we see is that which faces the inside of the cube. Unlike MC4D, which does not display the hyperface nearest the eyepoint at all, for this configuration, the program does draw the Up face but in a position shifted away from the other faces so that they are not obscured. For it only, the visible sides of its stickers are the outward facing ones. A 3D being looking at this projection has no real need for the shrinking. (Indeed a display more like that of Configuration #2 is adequate for us 3D folks. That sort of display can be likened to a box with the lid set aside.)

The program's 2D display is analogous to the 3D model which results from MC4D's projection from 4D to 3D. But MC4D cannot render that model directly as this program can. It must further project the 3D model (of the projected hypercube) to 2D for rendering. We imagine that we are exploring the 3D model by looking at its 2D rendering.

To carry the analogy further, we must imagine what it would be like for a Flatlander to try to work the puzzle based on a 1D projection of the 'model', which is the 2D rendering created by the program. The Flatlander is definitely going to need the shrinking of faces and stickers if he is to have any hope of seeing what is going on.

The program implements two 1D projections of its 2D rendering. One is a straight orthographic (i.e., no perspective) projection along the y-axis. (Since you can rotate the 2D view, there is no great loss of generality by projecting along the single axis.) This 1D orthographic projection tends to be too busy to be useful. In order to allow the Flatlander to observe things more closely, the program implements a roving eye concept which allows a 1D projection to be formed based on an eyepoint placed anywhere - including from a point somewhere in the middle of the 2D rendering and looking in any direction.

One of the ways in which the program goes beyond MC4D (by analogy) is that it does not require that the eyepoint for its projection be on an axis. This program allows arbitrary placement of the eyepoint. With these more general points of view there may be up to 3 faces for which what we are seeing is the out-facing sides of its stickers. Whenever two stickers overlap in the 2D display, one must be in-facing and the other out-facing. (Actually, the situation becomes more complex during twist animation.) The program maintains two separate virtual cube centers, the in-center and the out-center. It draws out-facing stickers relative to the out-center, and similarly for stickers for which the side that is visible is the inside. Whether or not the two centers are rendered in the same place or kept separate is configurable. When they are separated, it is guaranteed that all stickers are visible. Operation of the puzzle with the centers separated remains intuitive.


Last modified: Mon Jun 26 04:53:03 CDT 2006