Qube, The Movie

Contents

The Movie

Here is a link to"Qube, The Movie", a video made withQube, my digital Rubik's cube simulator. Mathematically, all of the action is driven by the 3-by-3 matrices on display.

Scaling

Qubeuses a3x3x3array of identicalcubelets. The coordinates[x,y,z]of the centers of the cubelets are all of the possible combinations of-2,0and+2. The vertices of an individual cubelet form a 8-by-3 matrix. The width of a cubelet is controlled by multiplying its vertices by a 3-by-3 diagonal scaling matrix.

Our video begins with the width near zero, so the cubelets appear to be points at the centers. The width is increased to a value where the cubelets almost touch each other. The small gap is maintained for its visual effect.

Rubik's Rotations

The primary operations with a Rubik's cube are the simultaneous rotation of all the cubelets contained in one of the six faces. For example,this videoshows a slow-motion rotation of the "Left" face about thex-axis.

It is also possible to rotate the three interior "slices", as well as the entire cube about one of the coordinate axes.

Types

Thetypeof a cubelet is the number of nonzeros in the coordinates of its center.

type = nnz([x,y,z])

The cubelet in the center of the puzzle hastype = 0and the six cubelets withtype = 1位于中心的脸。我们使用0:1to denote the set of these seven cubelets. In a real, physical Rubick's Cube,0:1is a single solid central core that holds the entire puzzle together.

There are twelvetype = 2cubelets located on the edges of each face and eighttype = 3cubelets at the corners of the puzzle. So,0:3denotes the entire cube and2:3is the corners and edges without the central core.Qube, The Movieshows the types in this order:

0:3, 0:2, 0:1, 0, 1, 2, 3, 2:3

Careful readers of this blog should recognize2:3as level one of theMenger sponge fractal.




Published with MATLAB® R2022a

|

コメント

コメントを残すには、ここをクリックして MathWorks アカウントにサインインするか新しい MathWorks アカウントを作成します。