rotations {cubing} | R Documentation |
Create and Plot All Rotations of a Cube
Description
Creates and plots all 24 possible whole cube rotations.
Usage
rotations(aCube)
## S3 method for class 'rotCubes'
plot(x, which = 1:24, ask = FALSE, colvec =
getOption("cubing.colors"), recolor = FALSE, ...)
Arguments
aCube |
A cubieCube object. |
x |
An object produced by the |
which |
If only a subset of the rotations is to be plotted,
specify a subset of the numbers |
ask |
If |
colvec |
Vector of sticker colors. The default is the
|
recolor |
If |
... |
Other parameters to be passed through to plotting functions. |
Details
There are 24 possible spatial orientations, including the original
no rotation case. The rotations
function produces all of these
cubes as a list of class rotCubes
, which can be subsequently
plotted by plot.rotCubes
.
The 24 cubes produced by rotations
are all related to each
other via some rotation and therefore they are all the same as defined
by the all.equal.cube
function. If the original cube has symmetric
properties then the set of 24 may contain equivalent cubes as defined
by the ==.cube
operator. In the case of the solved cube all 24
will be equivalent.
Value
For rotations
, an object of class rotCubes
, which is a
list of length 24 where each element is a cubieCube.
See Also
==.cube
, all.equal.cube
,
rotate
Examples
rCubes <- rotations(randCube())
all.equal(rCubes[[5]], rCubes[[10]])
rCubes[[5]] == rCubes[[10]]
## Not run: plot(rCubes)