home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 284.lha / AmigaPlot_v2.0 / Plot.doc < prev    next >
Text File  |  1989-09-11  |  12KB  |  303 lines

  1.  
  2.  
  3.  
  4.             Amiga Plot V2.0 Joe Martin 8/89  (C)Copyright 1989
  5.  
  6. **************************** *** NOTICE *** ***********************************
  7.  
  8.     This program is not public domain. All rights retained. Permision is
  9. granted to freely distribute this program as long as all documentation and
  10. notices remain intact. Charges for such distribution are NOT permitted except
  11. as a nominal disk charge !! 
  12.     
  13.     If you find this program useful, entertaining or educational, please donate
  14. $20 to the author. Source code is available for an additional $20 by sending
  15. check or money order to the address provided below. Donations will encourage
  16. updates and more features.
  17.  
  18. *******************************************************************************
  19.  
  20.  
  21.     Amiga Plot is a three dimesional mathematical function plotter. It takes
  22. a function, derived by the user, parses it into a partially compiled form and
  23. then calculates coordinates to be placed in the xyz system. AmigaPlot use
  24. hidden line removal based on a principle known as the painters algorithm. 
  25. Each time AmigaPlot goes to the screen it places a filled polygon. Starting
  26. from the most distant part of the plot it is constantly placing filled
  27. polygons in front of other polygons there by covering the hidden portions of
  28. the plot. Many aspects of the plot are user variable so that almost any
  29. combination of rotations, perspectives, and parameters for any function can
  30. produce infinite results. AmigaPlot is not intended for statistical analysis
  31. and the precision of the plot or its scale are not guaranteed.
  32.     The use of color in the plot can produce very pleasing effects
  33. especially when a feathered pallet is used. The idea of AmigaPlot is to
  34. provide an artistic approach to the sometimes dry subjects of Analytical
  35. Geometry and Trigonometry.
  36.  
  37.  
  38.     AmigaPlot was compiled on the Aztec C Compiler 3.6a
  39.     **** Minimum memory 512K - it uses most of it *****
  40.     ************ 1 or 2 meg recommended **************
  41.  
  42.     Address any questions, comments or bugs to:
  43.  
  44.         Joe Martin
  45.         Hobbit Hole  1-904-243-6219 8N1 
  46.  
  47.             or
  48.         
  49.         Joe Martin
  50.         2702 Willow Grove Ln.
  51.         Ft. Walton Bch. Fl 32548
  52.  
  53. Enhancements from version 1.4 to 2.0:
  54.  
  55.     1- No Keyboard entry required. (Adjustable gadgets)
  56.     2- Some parameters can be adjusted during plot.
  57.     3- Solid, Line or Point plots.
  58.     4- Coordinate axes for visual rotation adjustments.
  59.     5- Full 3 axis rotations and scaling.
  60.     6- Radian and Degree units.
  61.     7- Limit for 'Z' axis.
  62.     8- Full Clipping routines. This helps a lot.
  63.     9- New look(Big deal right).
  64.     10- Manual clear screen allows multiple functions on same screen.
  65.     11- Version 2.0 is more memory efficient(about 70K less chip ram).
  66.     
  67. ******************************************************************************
  68.  
  69. known bugs:
  70.  
  71.     1-some functions can produce values out of range.
  72.     
  73.     I'm working on better error checking but it'll be slow to come.
  74.     The Parser does very little error checking right now so watch your
  75.         spelling on trig function names.
  76.  
  77. ******************************************************************************
  78. ********** First MAKE SURE YOUR STACK IS SET TO AT LEAST 20000 **************
  79.  
  80. AmigaPlot is initialized at the CLI by 'Run Plot' (don't forget to set stack
  81.                             20000 first !)
  82.  
  83.     For convenience, the directory 'parms' is included and includes numerous
  84. function examples. These can be loaded from the 'Files' menu and make it
  85. extremely easy to play with and to alter different functions known to yield
  86. satisfatory results.
  87.     Also the directory 'pic' is included with one example of an Iff pic. This
  88. picture can be viewed with any showiff program.
  89.  
  90. ******************************* NOTICE **********************************
  91.  
  92.     Version aplot1.4 parm files are not compatible with V2.0 parm files. I have
  93. included all previous parm files in the new format. Sorry for this
  94. inconvienence. 
  95.  
  96. ***************************************************************************
  97.  
  98. Three windows appear-
  99.     1- Amiga Plot window - for the plots.
  100.     2- Parms window     - gadgets to select and change parameters.
  101.     3- Function window  - for function input only.
  102.  
  103. There are two menus available for some parmameter changes, color etc.
  104.  
  105.     In version 2.0, no keyboard input is necessary, nor provided for, in the
  106. paramemter window. Each parameter is located in an adjustable gadget. If you    
  107. point to the right half of the gadget and hold the left mouse button down the
  108. values will increase. Likewise, the left half decreases the value. You can
  109. adjust the rate of increase/decrease if you push and hold either the SHIFT
  110. key(increase rate by factor of ten), or the CTRL key(decrease rate by factor of
  111. 1/10) before pressing left mouse button.
  112.  
  113.  
  114. AXIS:
  115.  
  116.     When Amiga Plot is first run, you will see the coordinate axes in the plot
  117. window. The axes serve two purposes. They show the user the orientation of the
  118. plot(rotations) and the relative size of the plot. If the rotations are all set
  119. to zero then the axes are positioned as follows:
  120.  
  121.     X axis points from left to right with negative to the left of the origin and
  122.         positive to the right.
  123.     Y axis represents depth with the negative portion in the foreground and
  124.         positive to the rear.
  125.     Z axis runs up and down with negative down and positive up. 
  126.  
  127.     The rotation of each axis is governed by the corresponding gadget in the
  128. parms window under the label 'Rotate'. Try these gadgets and watch the
  129. corresponding changes in the coordinate system axes.
  130.     The 'Axis' gadget will toggle the axes on and off as well as clear the plot
  131. window.  
  132.  
  133. NOTE -- The 'Y' and 'Z' rotations always spin about their respective axes
  134. relative to their current position. This is as it should be. The 'X' rotation
  135. is about a fixed imaginery axis which is stuck in the horizontal position.
  136. I've checked my matrix formulas and cannot seem to dispell this problem
  137. although it really does not limit the relative positions possible.
  138.  
  139. SCALE:
  140.  
  141.     The 'X' and 'Z' scaling factors affect the on screen size of each axis and
  142. subsequently the size of the plot. The 'Y' scale has a slightly different
  143. effect. Since the 'Y' axis represents depth, scaling this axis has a profound
  144. affect on perspective. Try these gadgets on the coordinate axes to see the
  145. results before plotting a surface. 
  146.  
  147.     HINT -- Overall size and perspective is better adjusted with the 'Object'
  148. and 'Image' gadgets discussed later.
  149.  
  150.  
  151. DOMAIN(X) and RANGE(Y):
  152.  
  153.     It is important to understand the Domain and Range of a function. The
  154. Domain is said to be the set of all first components from a set of ordered
  155. pairs and the Range, a set of all second components from the set of ordered
  156. pairs(x,y). This set of ordered pairs is going to be fed to our
  157. function(f(x,y)) which will yield values(Z). These values(Z) will become part
  158. of a set of ordered triples(x,y,z) and will then be plotted in our 3d
  159. coordinate system.  
  160.     What actually happens in Amiga Plot is this. Starting with the high end of
  161. the 'RangeY', this value is placed together with each value from the
  162. DomainX(low to high) yielding that 'Z' value and all those ordered
  163. triples(x,y,z). These points are plotted, then the RangeY is decremented and
  164. the process repeats until it reaches the low RangeY value. Then the plot is
  165. complete. If I explain any further, you'll just get tired of reading this so
  166. try a plot and see for yourself!
  167.  
  168.  
  169. SEGMENTS:
  170.  
  171.     Simple, the X and Y segments are the number of increments across the axis.
  172. In other words, how many points(X) you want graphed on each pass, and how many
  173. passes(Y) to run through.  
  174.  
  175.  
  176. OBJECT and IMAGE:
  177.  
  178.     Object and Image represent distances from your eye to the actual
  179. surface(object) in 3d space and to the objects 2d projection(Image) on your
  180. screen. Adjust these for sizing the overall image as well as perspective.
  181. Experimentation is the best way, so try it.
  182.  
  183.  
  184. TRANSLATION:
  185.  
  186.     'X' will move the axes left or right on the screen while 'Y' moves them up
  187. or down. 
  188.  
  189.  
  190. START and STOP:
  191.  
  192.     says it all!!
  193.  
  194.  
  195. CLEAR:
  196.  
  197.     This gadget clears the screen. If you don't clear the screen between plots
  198. you can create composites of different functons.
  199.  
  200.  
  201. SOLID, LINE, and POINT:
  202.  
  203.     Determines what type of plotting to construct. Solid  for hidden line
  204. removal and shading effect. Line and point for transparent effects. These can
  205. be changed during a plot for interesting features.
  206.  
  207.  
  208.  
  209. Function Gadgets:
  210.  
  211. There are 3 string gadgets available for function input:
  212.  
  213.     f(x,y): this gadget is for entry of main function. Upper and lower case is
  214.             acceptable. Any operators, grouping sysbols, or trig function
  215.             names given below are acceptable.   
  216.  
  217.             Legal variable names : X,Y,   A,B if they are defined below.
  218.             
  219.     A=    : this gadget is useful for subfunctions and expressions and serves
  220.             as a macro for the main function f(x,y). If your main
  221.             function(f(x,y)) contains the 'A' variable, then this macro MUST
  222.             be defined in this gadget !
  223.             
  224.     B=    : this gadget is useful for subfunctions and expressions and serves
  225.             as a macro for the main function f(x,y). If your main
  226.             function(f(x,y)) contains the 'B' variable, then this macro MUST
  227.             be defined in this gadget !
  228.             
  229.     Editing : same as for any string gadget - cursor keys, del, backSp etc.
  230.  
  231.     operations :      +,-,*,/ divsion by zero is trapped.
  232.                     ^ to the power of
  233.                     
  234.     grouping   :    ()
  235.     
  236.     functions  :    ABS() absolute value of
  237.                     SQRT() Square root of
  238.                     SQR() Square of
  239.                     SIN() Sine of
  240.                     ASIN() ArcSine of
  241.                     COS() Cosine of
  242.                     ACOS() ArcCosine of
  243.                     TAN() Tangent of
  244.                     COT() Cotangent of
  245.                     ATAN() Arctangent of
  246.                     LN()  Natural Logarithm of
  247.                     LOG() Base 10 Log of
  248.                     EXP() Exponential of
  249.  
  250. Menus:
  251.  
  252. File Menu     
  253.  
  254.  load
  255.     parms-      this will load a set of parameters, functions, window sizes,
  256.                 color map etc. When plot is first run 'Default.parms' is
  257.                 loaded if available. If you have a favorite function. then it
  258.                 can be loaded at startup by saving its' parms as
  259.                 'Default.parms'.
  260.  
  261.  save
  262.     parms -     this will save all parameters for easy retrieval. A file
  263.                 requestor will prompt you for the file name. File name
  264.                 extensions of '.parms' are recommended.. 
  265.                 
  266.     IFF -       this will save the current visible screen to an IFF format
  267.                 image. A file requestor will prompt you for the file name and
  268.                 extensions of '.pic' are recommended.
  269.  
  270.  Quit -            Quit Amiga Plot (bye)
  271.  
  272.                 
  273. Display Menu -     
  274.  
  275.  Color Map - User selects color palette
  276.  
  277.  ColorSpan - User selects color position/span(what heigth you want each color
  278.              to kick in. Decimal fractions can be entered for finer color
  279.              resolution.
  280.              
  281.  XHatch -    Outlines complete polygon on screen
  282.  
  283.  Radians/Degrees - This toggles the displayed DomainX and RangeY to Degree
  284.              units and back to radian units. A little something extra.
  285.  
  286.  Spec.Parms -    
  287.  
  288.       Clip TAN - This is an adjustment for the TAN function which usually 
  289.             produces very high values(out of range). You can
  290.             adjust the tops of these spikes.
  291.             
  292.     Scale/0  - This one can adjust any case of division by zero. In other
  293.             words, instead of dividing by zero(which is undefined)
  294.             you can divide by the scale value.
  295.  
  296.     Clip Z -   This little number will effectively clip the top and the bottom
  297.             off any function. It limits the Z axis plot to a +ClipZ and -ClipZ.
  298.  
  299. ******************************************************************************
  300.  
  301.  
  302.         **** Have Fun ****
  303.