for rgl.coin a list with information for drawing
the faces of the coin, defaults to coin.faces. For
rgl.die a vector with the number of pips to put on the
sides of the die (alternative way of specifying sides).
col
Color of lines on the coin faces.
heads
Design to use as "heads" side of coin.
tails
Design to use as "tails" side of coin.
col.cube
Color of the cube for the die.
col.pip
Color of the pips (spots) on the die
sides
Vector of length 6 indicating which numbers to show on
the die.
side
Which side of the coin (1 or 2) or die (1 through 6)
should end up face up.
steps
The number of steps in each part of the animation,
higher values will be smoother and slower, lower values will be
faster but more jumpy.
...
Currently any additional options are silently ignored.
Details
You must use the plot function first to create the coin or die, then
use the flip or roll function to start the animation. You can animate
multiple times for a single use of the plotting function.
You can manually rotate the image as well, see the rgl package
for details.
The defaults plot a regular coin and die, but arguments are available
to create special casses (2 headed coin, die with 2 6's and no 1,
...).
The data list coin.faces contains information on designs for
the faces of the coins in case you want to choose a different design.
The default rolling and flipping options ranomly choose which side
will be face up following a uniform distribution. You can specify the
side yourself, or use the sample function to do a biased random
flip/roll.
Value
Which side ended up face up (1 or 2 for coin, 1 through 6 for die).
This is the internal numbering and does not match a change in the
sides argument.
Note
The current algorithm for animating the die roll shows all the
sides, but I am not satisfied with it. Please suggest improvements.