XThis is an implementation of the classic Chinese abacus.
X
XThe device has two decks.
XEach deck, separated by a beam, normally has 13 rods on which are mounted beads.
XEach rod on the top deck contains 2 beads, and each rod on the bottom deck contains 5 beads.
XEach bead on the upper deck has a value of five, while each bead on the lower deck has value of one.
XBeads are considered counted, when moved \fItowards\fP the beam separating the decks.
X
XThe device has two decks ("new & improved" models have auxilliary decks stacked above the principal decks that enable multiplication, division and square-root (honest!) computations to be performed with equal ease as addition and subtraction).
X
X.SH OPTIONS
X.TP 8
X-demo \fI path to script files \fP
XUse this option to interactively learn to use the abacus.
XThe application will ignore command-line options regarding size (beadwidth, beadheight, framewidth); all other options are acknowledged.
X
XThe script for lesson-1 is called Lesson1.cmd, lesson-2 is contained in
XLesson2.cmd and so on.
X
XThe script-files should be installed in /usr/lib/X11/xabacus.
X
XFor example:
X.nf
X \fIxabacus -demo ./\fP
X.fi
Xwill instruct \fIxabacus\fP to look for the script-files in the current directory.
X
XSimilarily, the \fIXAbacus.demo\fP resource may also be used to specify the demo-path:
X.nf
X \fIXAbacus.demo: ./\fP
X.fi
X
XUsing this method, the \fI-demo\fP option need not be specified on the command-line.
X
XIf the script-files have been installed, then run the demo as:
X.nf
X \fIxabacus -demo /usr/lib/X11/xabacus\fP
X.fi
X
X
XRefer to the section titled: OPERATION, for details about the demo-mode.
X
X.TP 8
X-demofont | -fn \fIXfontstring\fP
XSpecify an alternate font for the explanatory text that appears in the
Xsecondary window, during the demo. The default font is 18 point Times-Roman (-*-times-*-r-*-*-*-180-*). The alternate font is 8x13.
X
X.TP 8
X-script
X
XUsing this option, the application will log (to \fIstdout\fP ) a set of row/column coordinates according to the beads the user clicks.
X
XThis data may be logged to a file as follows:
X.nf
X \fIxabacus -script >script.log\fP
X.fi
X
XThe script may then be edited and then used to generate new demos.
X
X.TP 8
X-beadwidth \fI width \fP
XThe width of a bead, in pixels. The default is 30.
XFor the sake of authenticity, the bead-width should be about 2/3 greater than the bead-height. If the bead-width is equal to the bead-height then the beads will (vaguely, even then, one has to squint) resemble circles (the screen's aspect ratio is not accounted for).
X
X.TP 8
X-beadheight \fI height \fP
XThe height of a bead, in pixels. The default is 20.
X
X.TP 8
X-framewidth \fI width \fP
XIn pixels, the width of the frame around, and separating the two decks.
XThe default is 10.
X
X.TP 8
X-ncols \fI columns \fP
XAn integer representing the number of columns the abacus is to have, up to
Xa maximum of 100. The default is 13.
X
X.TP 8
X-framecolor \fI colorname \fP
XA valid color-name for the frame of the abacus. Default is "brown".
X
X.TP 8
X-bg \fI colorname \fP
XA valid color-name for the background. Default is "white".
XSpecifying a color other than the default will result in the beads having an unpredictable color.
X(This happens because the bead-image is XOR'd with the background when animating it.)
X
X.TP 8
X-bead-color \fI colorname \fP
XA valid color-name for the color of the beads. Default is "green4".
X
X.TP 8
X-railcolor \fI colorname \fP
XA valid color-name for the color of the rails. Default is "green4".
X
X.TP 8
X-help
XPrints a summary of the command-line options.
X
X.SH OPERATION
X\fINormal Operation:\fP
XThe beads may be moved by clicking on them with the mouse-pointer; the beads will shift themselves to vacate the row and column that was clicked.
XThe abacus will beep when the mouse is clicked on an invalid location (like the middle-frame).
X
XThe abacus may be resized to accomodate more (or less, but no less than the
Xminimum as specified with \fI-ncols\fP) columns; it resizes in width only.
XColumns are added only if the amount resized can accomodate a complete column.
XA maximum of 100 columns is possible, i.e. operations with numbers with up to
X100 digits is possible.
X
XPressing 'q', 'Q' or '^C' will quit.
X
X\fIDemo Mode:\fP
XIn this mode, the abacus is controlled by the program.
XWhen started with the demo option, a second window is presented that should be placed directly below the abacus-window. Descriptive text, and user prompts are displayed in this window.
X
XPressing 'q' during the demo will quit it. Clicking the left mouse-button with
Xthe pointer in the window will restart the demo (beginning with lesson-1).
X
X.SH RESOURCES
X.nf
XThe application class name is XAbacus.
XEvery command-line option has its equivalent X-resource as follows:
X
XXAbacus
X .beadwidth
X .beadheight
X .framewidth
X .ncols
X .framecolor
X .bg
X .beadcolor
X .railcolor
X .demo
X .demofont
X.if
X
X.SH SEE ALSO
X\fIThe Abacus: The Art of Calculation Using Beads\fP, details all the known techniques for performing additions & subtractions.
X
Xxcalc(1), xfontsel(1), xrdb(1), X(1)
X
X.SH SCRIPT-FILE FORMAT
X.nf
XThe format of the lesson script-file (Lesson\fIn\fP.cmd) is as follows:
X<number of moves in the script>
X<row> <col> <number-of-text-lines-that-follow>
Xtext-line1
X :
X :
Xtext-line4
X<row> <col> <number-of-text-lines>
Xtext-line1
X :
X :
Xtext-line4
X :
X :
X.fi
X
XThe text is displayed in the secondary window that appears during the demo.
XA row beginning with a negative number signifies that the move be ignored &
Xthat just the descriptove text be displayed. This is useful for explanatory
Xpauses in the lesson.
XRefer to any of Lesson1.cmd, Lesson2.cmd or Lesson3.cmd.
X
X.SH FEATURES
XA cosmetic bug occurs, when certain user-defined frame-widths are specified and a top-deck bead is moved down.
X
XColumns are added only if the amount resized can accomodate a complete column.
X
XWhen the application is resized, an incremental amount that does not accomodate a full column, it loses track of the correct number of columns.
X
X.SH ACKNOWLEDGEMENTS
XAgustine Lee, instructor at the Ryerson Electrical Engineering Department provided a real, live abacus in addition to invaluable documentation on its use and
Xcomments on improving it.
X
XNick Colonello, for alpha-testing the application and providing constructive
Xcriticism.
X
XEva Dudova, for beta-testing the application.
X
XAnd to those, before me, who have written X-applications, from whose code I have learned the art of X.
X
X.SH COPYRIGHT
XCopyright 1991, Luis Fernandes.
X
XPermission to use, copy, hack, and distribute this software and its
Xdocumentation for any purpose and without fee is hereby granted,
Xprovided that the above copyright notice appear in all copies and that
Xboth that copyright notice and this permission notice appear in
Xsupporting documentation.
X
XThis software is presented as is without any implied or written warranty.
X
X.SH AUTHOR
XLuis Fernandes (lfernand@ryelect.uucp)
END_OF_FILE
if test 7566 -ne `wc -c <'xabacus.man'`; then
echo shar: \"'xabacus.man'\" unpacked with wrong size!
fi
# end of 'xabacus.man'
fi
echo shar: End of archive 3 \(of 4\).
cp /dev/null ark3isdone
MISSING=""
for I in 1 2 3 4 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 4 archives.
rm -f ark[1-9]isdone
else
echo You still need to unpack the following archives:
echo " " ${MISSING}
fi
## End of shell archive.
exit 0
--
Molecular Simulations, Inc. mail: dcmartin@msi.com