| 1 |
% DICE3D.TEX |
| 2 |
% |
| 3 |
% a short demo on the usage of the DICE3D font |
| 4 |
% |
| 5 |
% Thomas A Heim (1998) |
| 6 |
% |
| 7 |
% LICENSE: LPPL |
| 8 |
% |
| 9 |
\documentclass{article} |
| 10 |
\addtolength{\textwidth}{1cm} |
| 11 |
\addtolength{\oddsidemargin}{-5mm} |
| 12 |
\addtolength{\evensidemargin}{-5mm} |
| 13 |
\newfont\dice{dice3d} |
| 14 |
\pagestyle{empty} |
| 15 |
\begin{document} |
| 16 |
\section*{Dicey font} |
| 17 |
Plain 2D-like faces with the appropriate number of dots are obtained |
| 18 |
with the characters `1' through `6' in the font \verb+dice3d+. |
| 19 |
For an authentic 3D-look, we use the fact that for `good' dice the |
| 20 |
point total on opposing faces is always 7. Therefore, if face $n$ is |
| 21 |
up, there are only four possible values $m$ on the front. Furthermore, |
| 22 |
assuming identical dice throughout, the value on the right side is |
| 23 |
fixed once the values on the top and front are specified. Thus, we end up |
| 24 |
with 24 different 3D arrangement of the dots / faces. In the font, |
| 25 |
these are mapped to the letters `a' through `x'. In order to simplify |
| 26 |
the usage, the 3D dice are accessible using \emph{ligatures}, based on the |
| 27 |
following principle: A number from `1' to `6' determines the value on |
| 28 |
the top face, and a letter (appended without a space) from `a' to `d' |
| 29 |
determines the value on the front face, ordered according to increasing |
| 30 |
value. Alternatively, the value on the front face could be indicated |
| 31 |
directly with a letter from `a' to `f'. This can be achieved by changing |
| 32 |
the ligature tables appropriately (at the end of file \verb+dice3d.mf+). |
| 33 |
|
| 34 |
\subsection*{Example (at 30pt size)} |
| 35 |
\begin{flushleft} |
| 36 |
{\dice 123456} \\ |
| 37 |
produced with \verb+{\dice 123456}+ \\[2ex] |
| 38 |
{\dice 1a 1b 1c 1d 2a 2b 2c 2d} \\ |
| 39 |
produced with \verb+{\dice 1a 1b 1c 1d 2a 2b 2c 2d}+ \\[2ex] |
| 40 |
{\dice 3a 3b 3c 3d 4a 4b 4c 4d} \\ |
| 41 |
produced with \verb+{\dice 3a 3b 3c 3d 4a 4b 4c 4d}+ \\[2ex] |
| 42 |
{\dice 5a 5b 5c 5d 6a 6b 6c 6d} \\ |
| 43 |
produced with \verb+{\dice 5a 5b 5c 5d 6a 6b 6c 6d}+ |
| 44 |
\end{flushleft} |
| 45 |
\end{document} |
| 46 |
|