home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
141.lha
/
CONTOURA.doc
< prev
next >
Wrap
Text File
|
1986-11-21
|
13KB
|
292 lines
HERMES' CONTOURA (Version 1.0)
Copyright (c) 1988 A. G. Kartsatos
(CIS = 76617,121, GEnie = XTH58515, PLink = HERMES)
*** Shareware Program ***
This is a beautiful graphics program that graphs the contours of
3D-functions of the type Z = F(X,Y). It is of interest to scientists and
engineers as well as painters and designers. You can use it to paint
beautiful abstract paintings and design images and shapes for dresses,
shirts, textiles, etc.
You can save your picture with GRABBiT and manipulate it further with
Deluxe Paint. Just remember to jot down the formula and the other data
on the front panel just in case you want to play with it again.
I will modify your copy of the program to your liking (if I can).
Let me know of what you have created. This is a powerful tool in your
hands. If you have never thought before of yourself as being a painter,
you can do that easily now.
Have fun!
@@-->>> HERMES
ATTENTION: The "TOPAZ 11" font should be in your current "fonts"
directory. If it is not there, you will get the program running with "funny"
fonts!
To use it from the CLI: Press "RUN CONTOURA".
To use it from the Workbench: Click its icon.
To exit, click the "EXIT" gadget or choose "QUIT" from the menu.
TO USE FAST
(1) Insert the function to be graphed in the "FUNCTION" gadget.
(2) Insert the values (if needed) for any of the variables X-MINIMUM,
X-MAXIMUM, Y-MINIMUM, Y-MAXIMUM, Z-MINIMUM, Z-MAXIMUM, SAMPLE-RT (Sample Rate)
in their respective gadgets.
(3) Click the "GRAPH" gadget.
The function will be graphed on its own screen.
IT IS IMPORTANT TO KNOW THAT THE EXPONENTIAL FUNCTION x^y IS TOO SLOW!!!
SO, IF YOU HAVE A TERM/FACTOR x^3, IT IS MUCH BETTER TO ENTER x*x*x
INSTEAD OF x^3. THE SAME HOLDS ANY OTHER POWERS OF COURSE.
REMEMBER:
(1) Use only parentheses. No brackets are allowed.
(2) The function must be at most 100 characters long.
(3) This version does not support scientific notation. Avoid the use
of large numbers with a lot of digits before/after the decimal
point.
(4) Check the available functions and operators by choosing
"FUNCTIONS" from the menu. Make sure that you are using the
right notation for your functions.
(5) To "CLEAR" ONE of the string gadgets, click into it and press
RIGHT-AMIGA-X. Press "RESET" to clear ALL the string gadgets
involving the maxima and the minima of the 3 variables.
(6) You may use spaces between any expressions. No problem.
(7) Lower or upper case letters are allowed anywhere. The program
turns them all into upper case.
(8) For the sake of speed, I have omitted error messages for a whole
lot of nonsensical things that the user can insert.
(9) CTRL-N gets you to the Workbench and CTRL-M gets you back to
CONTOURA. If you are planning to work on the Workbench while
CONTOURA is running, make sure to run it with "RUN CONTOURA"
and not just "CONTOURA".
(10) When you raise a function to a power, make sure you enclose
the function in parentheses. For example, you should use
(exp(1.89))^2 instead of exp(1.89)^2. The same remark applies
to other similar situations.
MENUS AND GADGETS:
X-MINIMUM, X-MAXIMUM, Y-MINIMUN, Y-MAXIMUM:
These are the max and min values that you are allowing for x and
y. This means that the program will assume that you want to graph the
function in the "FUNCTION" gadget by allowing x to lie between X-MINIMUM
and X-MAXIMUM and y to lie between Y-MINIMUM and Y-MAXIMUM. These values
of x and y are definitely affecting the graph of the function.
Z-MINIMUM, Z-MAXIMUM:
These two extreme values for the variable z work only when you
choose "SCALE" from the first menu. The scaling of the function is important
when you want to bring ALL THE COLORS (32) on the screen. This might work
just approximately sometimes. Thus, you might get pretty different pictures
with "SCALE" on compared to the corresponding pictures without choosing
"SCALE". We are referrring to differences in color of course.
GRAPH:
This gadget is covered below. Look at the paragraph with the same
heading.
VIEW:
This gadget allows you to view the picture that you have graphed. It
aslo brings you back to the GRAPHICS SCREEN where you might want to manipu-
late the picture further.
RESET:
Clicking into this gadget, you get the original values for the maxima
and the minima. It might be helpful when you are lost in the labyrinth
of numbers...
Z-VAL:
The program will try to compute for you the Z-MINIMUM and Z-MAXIMUM
values. Clicking the Z-VAL gadget will do just that. However, as we said
above, these two values are taken into consideration only when the user
chooses "SCALE" from the first menu.
SAMPLE_RT:
This is a VERY IMPORTANT GADGET. It allows you to sample the graph.
This means that you can get a ROUGH PICTURE of the actual graph of the
function F(X,Y) by choosing a SAMPLE RATE GREATER THAN ZERO. You really
need to do this a lot because the graphing of F(X,Y) can be much faster with
sample rates 2,4,6, etc. Thus, you keep graphing at these rates until you
arrive at a graph that you would really like to see pixel by pixel. This is
when you choose 0 sample rate.
FUNCTIONS:
When you choose this item from the menu, you get a table of all the
functions that you can use in the function gadget. MAKE SURE YOUR FUNCTIONS
ARE MATHEMATICALLY SOUND. The program will rarely abort its graphing. For
example, it will not abort at the evaluation of a logarithm of a negative
number or the square root of a negative number.
SCALE:
When you choose "SCALE" from the first menu, you are actually telling
the program to calibrate the function values so that all 32 colors will be
on the screen at once. This might be desirable sometimes, but not necessarily
always. Remember, the "SCALE" feature of the program does make use of the
Z-MINIMUM and the Z-MAXIMUM values above. These can be calculated (approxi-
mately of course) by the program itself. See "Z-VAL" above.
ZOOM IN:
When you choose this feature, you are telling the program to fill the
screen with an area (piece) of the picture that you have chosen. To pick
this area, click into the screen and drag your mouse until the rectangle that
is formed covers the portion of the screen that you want enlarged. Then
choose "GRAPH" from the menu.
ZOOM OUT:
This feature allows you to BRING IN MORE OF THE SUBJECT. You can choose
a value between 0 and 10. This can be ANY NUMBER in that interval. For
example, .45 is perfectly all right. This ZOOM OUT NUMBER must be entered
in the upper string gadget of the requester that will appear when you choose
"ZOOM IN". Usually, small numbers between 0 and 2 will do the job. After
you choose such a number, you can re-graph the function by choosing "GRAPH"
from the menu.
CENTER:
This feature allows you to bring the center of the screen at any point
of the picture that you choose. For example, suppose that you want the
function graphed so that its center is the middle point of the right hand
side of your screen. Well, choose "CENTER" and click once at that point.
Then choose "GRAPH" from the menu. Voila!!! This way you can move on into
the world from minus infinity to plus infinity horizontally and vertically!!!
PALETTE:
This is a beautiful flowing palette! As soos as it appears, you will
see the "R" gadget activated. This is the RED color. As you know, color
comes in three numbers: R G B. These are between 0 and 15 each. Thus, the
triplet F00 represents the pure Red color: 15 Red, 0 Green, 0 Blue. Naturally,
these are numbers in base 16. The triplet 00F is pure Blue and the triplet
FFF is White. Now, let's see what is happening with the palette. When the
gadget "R" (RED) is clicked, what you see on your palette is "THE AMOUNT
OF *** RED *** IN EACH ONE OF THE 32 COLORS OF THIS SCREEN". Although the
picture might not contain all these colors, they are there. They have been
assigned by you or by the program. When you click the "G" (GREEN) gadget,
you see again in each rectangle the amount of green in each color, and the
same situation appears with the blue gadget.
Now, click your mouse into the palette and start moving it around (still
clicked) left and right and up and down. Beautiful!!! What you see is a
continuous change of THE COLOR COMPONENT that you have chosen. This means
that if "R" has been clicked, you are seeing a continuous change in the Red
component of each color on the palette. It is the LEFT MOUSE BUTTON that
you are using here.
While the palette is out, click "CANCEL" to cancel any change that you
have made, "DEFAULT" to bring in the default palette, and "OK" to keep any-
thing that you have done to the palette.
GRAPH: (First Screen Gadget and Second Screen Menu Item)
Well, this item will graph your function. In order to STOP the graph
(something you will need to do from time to time), just press the "ESCAPE
KEY". If the key does not obey, click the left mouse button first to activate
the screen.
As you will notice, the background color does not participate in the
painting of the picture. I did this, because I feel that if that color was
all over the picture, it would be very hard for the user to change it! For
example, if the background color was black and the picture contained 3000
black pixels, how would you change the background and leave those pixels
black? You would have to work on those pixels one by one!
Thus, 31 colors (maximum) are painting your picture and you are free
to change your frame color to anything else without disturbing the rest of
the picture.
CYCLING:
To CYCLE any of your pictures, just press the "TAB KEY". The SAME KEY
will STOP the cycling. Again, if it does not obey, just click the left
mouse button to activate the screen. I have allowed the complete cycling
to a maximum of 6 times. Cycling takes up a lot of memory. Also, I have
arranged it so that the background color (the frame color) does not cycle. I
think that the cycling of that color is very disturbing.
You can go from the GRAPHICS SCREEN to the PANEL SCREEN by pressing
the <RETURN> key. Again, whenever a key does not obey, just click the
left mouse button to activate the screen (or the window).
The center of your screen is the point X = 0, Y = 0. The left and
right edges have X-MINIMUM and X-MAXIMUM values, repsectively. The same for
the Y values.
You can also bring the palette out by pressing "p" or "P".
PROBLEMS:
If you only get just one color on your screen, your function does not
take a wide range of values. Try "Z-VAL" and "SCALE", or multiply your
function by a large enough number to allow for more values (and color).
*** <<<-->>> ***
This is a SHAREWARE copyrighted program. If you find it useful,
please send $15.00 to the address at the end.
With this contribution you will receive more programs written by the
author.
Feel free to distribute this program, with the doc intact, to any
bulletin boards and other non-profit establishments in the US and abroad.
These include PLink, Compuserve, GEnie, Delphi, etc.
The inclusion of this program, or any part of it, in any form in a
commercial package, or its use for commercial purposes, requires the
written permission of the author.
The author bears no responsibility for errors that might occur while the
user uses this program. A lot of efforts have been made to deliver to you
a responsible program.
Other programs by the author:
PALETTA.ARC (Color Mixing, Modifying IFF's, Random Colors)
DUHERM26.ARC (Great Directory Utility. Macros, Parameters, etc)
SIMPLICA.ARC (The Simplex Method Of Linear Programming)
ROST.ARC (Reports On Storage And Tasks. Useful!)
LISTA11.ARC (Very Convenient File Lister. Alpha, Bytes, etc.)
SCRIPTA.ARC (Online!-PCP Script Maker. Easy To Use!)
CALCULA.ARC (17 Functions Expression Parser And Evaluator)
ARCHA.ARC (ARC-PAK-ZOO Utility Plus 9 Extra Utility Gadgets)
FORMULA!.ARC (Great 3D-Grapher In C. Colors, Parsing, etc.)
FINANCA.ARC (Mortgage, Annuity, Compound Interest Program)
For support on the HERMES programs, call:
HERMES BBS (Tampa, FL, USA)
813-985-7624
1400 Files, 2400, PCP, Good Message Base, PRIVATE
Also, you may call (voice) or write:
A. G. Kartsatos (PLink = HERMES)
8524 Caladesi Island Drive
Tampa, FL 33637, USA
813-988-2146