| plot3D.cube {cubing} | R Documentation |
Cube Object Interactive 3D Plot
Description
Plots an interactive 3D representation of a cube object using OpenGL.
Usage
## S3 method for class 'cube'
plot3D(x, colvec = getOption("cubing.colors"), recolor = FALSE,
bg = grey(0.8), rand.col = FALSE, size = 0.98, col.interior = grey(0.5),
al.interior = 0.4, al.exterior = 1, rinit = 30, bbox = TRUE, bbcolor =
"#333377", bbemission = "#333377", bbspecular = "#3333FF", bbshininess =
5, bbalpha = 0.5, ...)
Arguments
x |
Any cube object. |
colvec |
Vector of sticker colors. The default is the
|
recolor |
If |
bg |
Background color. |
rand.col |
If |
size |
Size of the individual cubies. Must be less than one. Values closer to one give cubes that look stickerless because the gap between cubies decreases. Smaller sizes give exploded cubes. |
col.interior |
Color of the cube interior. |
al.interior |
Alpha value of cube interior. |
al.exterior |
Alpha value of cube exterior. |
rinit |
The initial plot is rotated |
bbox |
Use a bounding box? |
bbcolor |
Bounding box parameter. |
bbemission |
Bounding box parameter. |
bbspecular |
Bounding box parameter. |
bbshininess |
Bounding box parameter. |
bbalpha |
Bounding box parameter. |
... |
Other parameters to be passed through to plotting functions. |
Details
This function uses the R package rgl which is an interface to OpenGL. The cube can be rotated using a mouse. See the documentation for the rgl package to explore the large number of options available.
The animate function also uses the rgl package to produce cubing
animations.
See Also
animate, plot.cube,
plot.rotCubes, plot.seqCubes
Examples
aCube <- getCubieCube("Superflip")
## Not run: plot3D(aCube)