px- simulates
the moves of the pyraminx
Calling Sequence:
px(ls,Ma)
px(ls,Ma,Ret)
Parameters:
ls - a list,
a name or 1
Ma - a matrix
Ret - (optional)
an unevaluatet name
Description:
-
The function px plots a pyraminx after
some moves. The moves of the pyraminx is one of PB1 (back layer is turned
120 degree clockwise), PD2 (middle back layer is turned 120 degree clockwise),
PD3 (front layer is turned 120 degree clockwise seen from the back side),
PR1 (right layer is turned 120 degree clockwise), PR2 (middle right layer
is turned 120 degree clockwise), PR3 (left layer is turned 120 degree clockwise
seen from the right side), PL1 (left layer is turned 120 degree clockwise),
PL2 (middle left layer is turned 120 degree clockwise), PL3 (right layer
is turned 120 degree clockwise seen from the left side), PD1 (down layer
is turned 120 degree clockwise), PD2 (middle down layer is turned 120 degree
clockwise), PD3 (upper layer is turned 120 degree clockwise seen from downside)
or 1, where no layer is turned.
-
ls is either one of the moves of the
pyraminx or a list of moves of the pyraminx.
-
Ma must be a 4x9 matrix of type Matrix.
The matrix gives the colors of the sides. The entries of the matrix must
be elements of {1,2,3,4}. As default, you can use the matrix Ap, which
is predefined.
-
The optional third argument Ret is
assigned the corresponding new Matrix.
Examples:
> restart:
> with(rubik);
> px(1,Ap,'Ret');Ret;
> px(PB1,Ap);
> px([PD1,PR2],Ap);
See Also:
jl
, mb
, mx
, rc2
, rc3
, rc4
, rc5
, sb