| 1 |
\documentclass{article} |
| 2 |
\usepackage{graphicx} |
| 3 |
\title{The \texttt{threeddice} package} |
| 4 |
\author{Dan Luecking} |
| 5 |
\date{2010/11/30} |
| 6 |
\begin{document} |
| 7 |
|
| 8 |
\catcode`_=12 |
| 9 |
{\catcode`\_=\active \global\let_\sb} |
| 10 |
|
| 11 |
\maketitle |
| 12 |
\section{Introduction} |
| 13 |
|
| 14 |
Running \texttt{mpost} on \texttt{threeddice.mp} produces 26 figure files. |
| 15 |
Six of them are are \texttt{die3d-1.mps}% |
| 16 |
\footnote{If your \texttt{mpost} version is less that 0.9, you will |
| 17 |
get figure files with names like \texttt{threeddice.1}. You should |
| 18 |
update your \TeX{} system.} |
| 19 |
through \texttt{die3d-6.mps}. These are pictures of a single die face |
| 20 |
with the number of dots indicated by the numerical part. Three of these |
| 21 |
would look the same if rotated by multiples of $90$ degrees. The other |
| 22 |
three could look different. It is up to the users to perform this |
| 23 |
rotation if they want a different view. |
| 24 |
|
| 25 |
The twelve files with 2-digit numerical part are 3D pictures of dice with |
| 26 |
two faces showing, as if your were looking directly at a horizontal |
| 27 |
edge. You will have to rotate it $\pm90$ degrees if you want the edge to be |
| 28 |
vertical, or $180$ degrees if you prefer the positions of the top and |
| 29 |
front face to be exchanged. |
| 30 |
|
| 31 |
The eight files with 3-digit numerical suffix are 3D pictures of dice with |
| 32 |
three faces showing, as if your were looking directly at one of the |
| 33 |
corners. They show a top face and a left and right face flanking a |
| 34 |
vertical edge. You can get 16 other views by rotating them $\pm120$ |
| 35 |
degrees. These rotations put one of the side faces on top. |
| 36 |
|
| 37 |
\section{Modifications} |
| 38 |
|
| 39 |
These figures were taken from an actual right handed die, and are all |
| 40 |
the permissable views of such a die, apart from size of dots and the |
| 41 |
actual orientation of the patterns of dots. As near as I could determine |
| 42 |
from internet searches, there are no official standards for the |
| 43 |
following. |
| 44 |
\begin{itemize} |
| 45 |
\item The 2-spot face has dots in opposite corners, but which two |
| 46 |
corners? On my die, if the 1-spot is on top, the 2-spot to the |
| 47 |
left and the 3-spot to the right (figure |
| 48 |
\texttt{die3d-123.mps}), the dots on the 2-spot face are in |
| 49 |
upper left and lower right. It seems it could just as well have |
| 50 |
been the other two corners. |
| 51 |
|
| 52 |
\item Similar question for the 3-spot face: three dots in a diagonal |
| 53 |
between opposite corners, but which two corners? In the previous |
| 54 |
example (figure \texttt{die3d-123.mps}), the diagonal is from |
| 55 |
lower left to upper right. |
| 56 |
|
| 57 |
\item The 6-spot face has two lines of three, parallel to two edges, |
| 58 |
but which two edges? In \texttt{die3d-246.mps} the lines of dots are |
| 59 |
horizontal, but it seems they could just as well have been |
| 60 |
vertical. |
| 61 |
\end{itemize} |
| 62 |
|
| 63 |
If you want some other orientation of these faces you will need to edit |
| 64 |
\texttt{threeddice.mp}: for the 2-spot face exchange the definitions of |
| 65 |
\texttt{pips2} and \texttt{pips7}; for the 3-spot face exchange |
| 66 |
\texttt{pips3} and \texttt{pips8}; for the 6-spot face exchange |
| 67 |
\texttt{pips6} and \texttt{pips11}. |
| 68 |
|
| 69 |
You can also change the size of the dots by giving a different value to |
| 70 |
\texttt{dot_diam}. The dice have rounded corners, you can change their |
| 71 |
radius by changing \texttt{corner_rad}. The dots are placed so there is |
| 72 |
at least \texttt{face_margin} of space between the dots and the straight |
| 73 |
edge of the face. You can change this variable as well. |
| 74 |
|
| 75 |
For other effects, you are on your own. A common requirement is that |
| 76 |
faces with fewer dots have larger dots. This is relatively easy to do, |
| 77 |
but requires changing the definitions of the 9 picture variables |
| 78 |
\texttt{pips1} through \texttt{pips11}. |
| 79 |
|
| 80 |
Naturally, the \texttt{graphics} and \texttt{graphicx} packages let you |
| 81 |
scale these as you want. If you would prefer to change the unscaled |
| 82 |
sizes, edit \texttt{threeddice.mp} to change \texttt{die_size} from 1cm to |
| 83 |
the desired size. |
| 84 |
|
| 85 |
Finally, to get views of a left-handed die, simply reflect the views of |
| 86 |
the right-handed die. |
| 87 |
|
| 88 |
\section{Appendix} |
| 89 |
|
| 90 |
\parindent 0pt |
| 91 |
These are the six single faces: |
| 92 |
|
| 93 |
\bigskip |
| 94 |
\includegraphics{die3d-1.mps}\quad |
| 95 |
\includegraphics{die3d-2.mps}\quad |
| 96 |
\includegraphics{die3d-3.mps}\quad |
| 97 |
\includegraphics{die3d-4.mps}\quad |
| 98 |
\includegraphics{die3d-5.mps}\quad |
| 99 |
\includegraphics{die3d-6.mps} |
| 100 |
|
| 101 |
\bigskip |
| 102 |
\filbreak |
| 103 |
The two-faced dice are ugly, so let me first show you the eight |
| 104 |
three-faced dice: |
| 105 |
|
| 106 |
\bigskip |
| 107 |
\includegraphics{die3d-123.mps}\quad |
| 108 |
\includegraphics{die3d-135.mps}\quad |
| 109 |
\includegraphics{die3d-142.mps}\quad |
| 110 |
\includegraphics{die3d-154.mps} |
| 111 |
|
| 112 |
\bigskip |
| 113 |
\includegraphics{die3d-246.mps}\quad |
| 114 |
\includegraphics{die3d-263.mps}\quad |
| 115 |
\includegraphics{die3d-365.mps}\quad |
| 116 |
\includegraphics{die3d-456.mps} |
| 117 |
|
| 118 |
\bigskip |
| 119 |
\filbreak |
| 120 |
Finally, the twelve two-faced dice: |
| 121 |
|
| 122 |
\bigskip |
| 123 |
\includegraphics{die3d-12.mps}\quad |
| 124 |
\includegraphics{die3d-13.mps}\quad |
| 125 |
\includegraphics{die3d-14.mps}\quad |
| 126 |
\includegraphics{die3d-15.mps}\quad |
| 127 |
\includegraphics{die3d-23.mps}\quad |
| 128 |
\includegraphics{die3d-24.mps} |
| 129 |
|
| 130 |
\bigskip |
| 131 |
\includegraphics{die3d-26.mps}\quad |
| 132 |
\includegraphics{die3d-35.mps}\quad |
| 133 |
\includegraphics{die3d-36.mps}\quad |
| 134 |
\includegraphics{die3d-45.mps}\quad |
| 135 |
\includegraphics{die3d-46.mps}\quad |
| 136 |
\includegraphics{die3d-56.mps} |
| 137 |
|
| 138 |
\filbreak |
| 139 |
\end{document} |