move {cubing} | R Documentation |
Moving a Cube and Creating a Move Sequence
Description
Applies moves to a cube and creates a move sequence.
Usage
move(aCube, moves, history = FALSE)
## S3 method for class 'seqCubes'
plot(x, initial = TRUE, which = 1:length(moves), ask = FALSE,
colvec = getOption("cubing.colors"), recolor = FALSE, show.rot = TRUE,
title = NULL, cex.title = 1, font.title = 2, ...)
Arguments
aCube |
A cubieCube object. |
moves |
A move sequence; either a single string or a character vector with one element per move. Can include URFDLBEMS face turns, URFDLB wide turns and xyz rotations. |
history |
If |
x |
An object produced by the |
initial |
Plot the initial cube state? |
which |
If only a subset of subsequent cube states are to be plotted,
specify a subset of the numbers |
ask |
If |
colvec |
Vector of sticker colors. The default is the
|
recolor |
If |
show.rot |
Should rotation moves be plotted? |
title |
If specified as a character string, the first plot represents a
title page with |
cex.title |
Size of title on title page. |
font.title |
Font of title on title page. |
... |
Other parameters to be passed through to plotting functions. |
Details
By default move
gives the result of applying the move sequence
moves
to the cube aCube
. All rotations xyz, face turns
URFDLBEMS, and wide moves URFDLB are allowed. Moves specifications such
as U U1 U' U1' U2 U2' U3 U3' and rotation specifications such as x x1 x'
x1' x2 x2' x3 x3' are all allowed. For wide moves, lower case lettering
and w notation are both allowed, so u2 and Uw2 are equivalent. If
moves
is a single string, it may contain any amount of white space.
The definition of the E M S middle slice moves is respectively given by D'Uy' L'Rx' B'Fz'. In particular, the S slice direction is different to what you may find elsewhere; the definition used for S in this package is consistent with the rotation directions.
When history
is TRUE
a list is created of class seqCubes. The
list contains cubieCube objects. The length of the list is the number of moves
plus one, where the first element of the list is the original cube.
The plot.seqCubes
function plots a list of class seqCubes. It can be
regarded and a 2D version of the animate function. For permanent recording
of the 2D plots for the move sequence, it is helpful to open a multiple page
graphing device such as pdf. A pdf file can then be created and used as a flick
book.
Value
For move
, either a cubieCube object, or (if history
is TRUE
)
an object of class seqCubes
, which is a list where each element is a
cubieCube. An attribute of the list stores the move sequence.
See Also
animate
, getMovesCube
, invMoves
,
plot.cube
, rotate
, slice
Examples
scramb <- "D2F2UF2DR2DBL'BRULRUL2FL'U'"
aCube <- getMovesCube(scramb)
mvs <- "x2D'R'L2'U'FU'F'D'U'U'R'y'R'U'Ry'RU'R'U'RUR'U'R'U'F'UFRU'"
is.solved(move(aCube, mvs))
sCubes <- move(aCube, mvs, history = TRUE)
## Not run: plot(sCubes, title = "SeungBeom Cho\nWorld Record Solve\n4.59")
## Not run: pdf("SeungBeomCho.pdf")
## Not run: plot(sCubes, title = "SeungBeom Cho\nWorld Record Solve\n4.59")
## Not run: dev.off()