rotations: Create and Plot All Rotations of a Cube

Description Usage Arguments Details Value See Also Examples

Description

Creates and plots all 24 possible whole cube rotations.

Usage

1
2
3
4
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 rotations function.

which

If only a subset of the rotations is to be plotted, specify a subset of the numbers 1:24.

ask

If TRUE, the user is asked before each plot.

colvec

Vector of sticker colors. The default is the cubing.colors option.

recolor

If TRUE, the spatial orientation is ignored and therefore the cube is recolored.

...

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

1
2
3
4
rCubes <- rotations(randCube())
all.equal(rCubes[[5]], rCubes[[10]])
rCubes[[5]] == rCubes[[10]]
## Not run: plot(rCubes)

cubing documentation built on May 2, 2019, 10:16 a.m.