home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
irit
/
drawfuns.arc
/
DRAWFUNC.DOC
< prev
next >
Wrap
Text File
|
1989-08-03
|
5KB
|
102 lines
DRAWFUNC - 2d parametric curves drawing program
-----------------------------------------------
This program allows drawing of 2D free form explicit algebraic
curves of the form: x = X(t), y = Y(t), or y = f(x), where t is the
parametric domain parameter.
The program displays the curve by sampling, and approximating
(with settable accuracy) it as piecewise linear polylines. It it also
possible to symbolically derive the curve and simultaneously display the
curve and its 1st 2nd and 3rd derivatives.
An on line help is available (you can modify it (!) if you like, as it
is all saved in the drawfn3d.hlp plain ascii file).
Options:
--------
-z : displays current version and state as read from configuration file
drawfunc.cfg (see below).
Configuration:
--------------
The program can be configured using a configuration file named drawfunc.cfg.
This is a plain ascii file you can edit directly and set the parameters
according to the comments there. executing 'drawfunc -z' will show the
current configuration as read from the configuration file. This file can be
in any directory which is in your path - the same place as drawfunc.exe is
probably a good choice.
The program was mainly tested on HERCULES graphics card, some on CGA,
and almost nothing on a VGA system. However it uses the Turbo C BGI excellent
package and so there is a good chance it will work on the laters, without any
problem. I am going to fully support only HERCULES card, till I will have
enough money to buy new VGA (you can buy me one!).
The BGI autodetect feature is used, but if this fails, or the VGA mode does
not work as you expect, you can always coerce it to a specific card - see
the drawfunc.cfg file.
The program will use 80?87 if it detects one - again uses the Turbo C 80?87
autodetect, or will run (much!) slower without it...
The program will use the mouse, if detected. If this detection fails you can
coerce it (to TRUE - exists, or FALSE) in the drawfunc.cfg configuration file.
Usage:
------
The control of the program is performed by moving the graphical cursor along
the menu and performing EXECUTE operation (see below). Moving the cursor can
be made using the numerical keypad/arrows (shifted for faster movement) or
if mouse is available, using the mouse. Two operation are defined and allowed:
EXECUTE - the <Return> key on the keyboard, or left mouse button if exists.
ABORT - the <Space> key on the keyboard, or right mouse button if exists.
The EXECUTE operation is used to request performing the selected menu item.
The ABORT operation is used to request abortion of current operation (handy for
big data files).
In addition if the first character of the menu entry is unique (i.e. only one
menu entry starts with the letter X) that letter may be used to pick that
entry.
Each string entry (such as function) can be edited as follows:
1. Left/Right arrows : to move left and right along the line.
2. Home/End : to move to beginning/end of line.
3. Delete : to delete character cursor is on.
4. Back space : to delete one char backward.
5. Insert : toggles insert/overwrite mode. Node cursor shape is modified.
6. Esc : clear the entire line.
7. CR : to accept line and quit.
ALT-Q can be used, at any time the cursor is shown, for program abortion
exactly as 'Quit' menu item.
Expressions are regular infix expressions with regular precedence:
lowest (-, +) (*, /, %, min, max) (^) (unar -) highest. Note the modulo
operator (%) which operates on the truncated numbers. Also "min" and "max"
are provided as binary operators. As there is no derivative for the last
3 operators, nor to the ABS function (see below), expressions containing
them can not be derived. The following built in functions are also provided
(sorted lexicographically):
ABS - absolute value function (no derivative).
ARCCOS - arc cosine (in radians) function.
ARCSIN - arc cosine (in radians) function.
ARCTAN - arc tangent (in radians) function.
COS - cosine (in radians) function.
EXP -exponent (based e) function.
LN - logarithm (natural base) function.
LOG - logarithm (base 10) function.
SIN - sin (in radians) function.
SQR - square function
SQRT - square root function.
TAN - tangent function.
Bugs:
-----
O.k. if you do have any question, suggestion, or even want to report a bug
(including VGA problems, but I dont promise anything about this one), feel
free to send me email (see below)
Feel free to make copies of this program, and distribute them FREE of
charge, provided that all this package is distributed.
I am not going to be responsible for any damage of any kind, that this
package may cause (I always wanted to say that...), but I hope you will
enjoy it as I did my best you will. At list I enjoyed writing it.
Have Fun
Gershon Elber
gershon@cs.utah.edu