home *** CD-ROM | disk | FTP | other *** search
/ Dream 52 / Amiga_Dream_52.iso / Amiga / Applications / Mathematiques / threedplot-2.0.lha / 3DPlot2.doc < prev   
Text File  |  1990-12-31  |  15KB  |  393 lines

  1. --------------  INSTRUCTIONS FOR 3DPlot v2.0  --------------
  2.  
  3.  
  4. ------------ INTRODUCTION ------------
  5.  
  6. 3DPlot v2.0 is copyright 1988,1990 by Randy Finch
  7.  
  8. 3DPlot may be freely distributed as long as the this
  9. documentation is distributed with the program.  This program
  10. cannot be sold without the permission of Randy Finch.
  11.  
  12. If you would like to help support further development of this
  13. program, please send your money, praises and suggestions to:
  14.  
  15.       Randy Finch
  16.       122 West Oak Hill Dr.          Day: 205-386-2197
  17.       Florence, AL  35630            Evening: 205-767-3528
  18.  
  19. If you send $10 or more, I will register you to receive the next
  20. release of 3DPlot for free.  If you send $30 or more, I will also
  21. send you the C source code to the program.  Thanks for any
  22. support you can offer, including any bug reports and helpful
  23. hints about additional features.  My BIX handle is rfinch.
  24.  
  25. ----------------- ABOUT THE PROGRAM -----------------
  26.  
  27. 3DPlot allows the user to plot a 3D function of the type
  28. Z=F(X,Y).  The user has control over rotation, scaling, position,
  29. screen resolution, colors, etc.  The program is controlled
  30. through an input window and pull-down menus.  The inputs are
  31. fairly easy to understand but I will present a brief explanation
  32. for each item below.  PLEASE NOTE - The program does not have
  33. very extensive error checking, so it is possible to crash the
  34. program.  I plan to add more error checking in a future release. 
  35. Also, there are still a few debugging items in the code, so don't
  36. be alarmed if something unusual happens.  I do believe that the
  37. program is useful and fun in its current state.
  38.  
  39. 3DPlot makes use of several freely distributable shared
  40. libraries.  These consist of:
  41.  
  42.     arp.library        (for the file requester)
  43.     color.library        (for the color requester)
  44.     iff.library        (for reading IFF files)
  45.     ilbm.library        (for writing IFF files)
  46.  
  47. These libraries should be included with 3DPlot.  If they are not,
  48. you can contact me for copies or download them from a bulletin
  49. board (BIX has all of them available).  These libraries should be
  50. copied to your libs: directory.
  51.  
  52. Also, 3DPlot uses the shared math libraries that come with the
  53. Workbench disk.  These libraries will automatically use a math
  54. coprocessor if it is available.  Make sure these libraries are in
  55. your libs: directory.
  56.  
  57. ---------------- THE INPUT WINDOW ----------------
  58.  
  59. When the program is loaded (either through CLI or Workbench), the
  60. input window will appear.  This window is on the Settings screen
  61. and contains many string gadgets for input from the user.  These
  62. gadgets are divided in a logical manner using boxes.
  63.  
  64. EQUATIONS
  65.  
  66. The top box is the EQUATIONS box.  The equation for Z can be
  67. input in the 'Z=' gadget near the top.  The function should be
  68. entered in a standard programming manner as follows:
  69.  
  70.   Z= 15.4*sin(x/y)-cos(x+y)+2.3e-2
  71.  
  72. The following operators are supported:
  73.  
  74.   +         Addition
  75.   -         Subtraction
  76.   *         Multiplication
  77.   /         Division
  78.   ^         Power
  79.  
  80. and the following functions are supported:
  81.  
  82.   sin       Sine
  83.   cos       Cosine
  84.   tan       Tangent
  85.   exp       Exponential
  86.   sqrt      Square root
  87.   ln        Natural log
  88.   log       Log base 10
  89.   asin      Arcsine
  90.   acos      Arccosine
  91.   atan      Arctangent
  92.   sinh      Hyperbolic sine
  93.   cosh      Hyperbolic cosine
  94.   tanh      Hyperbolic tangent
  95.  
  96. The standard hierarchy of operators prevails.
  97.  
  98. Once the equation is entered, its syntax is checked.  If there
  99. are any errors in the equation, and error message will appear
  100. after the words Error Message: above the gadget.  Also, the 'Z='
  101. gadget will be reactivated with the cursor in the location the
  102. error was detected. You can then proceed to correct the equation. 
  103. Once a correct equation is entered, the Error Message will be
  104. Acceptable and the cursor will be activated in the next gadget in
  105. the list (in this case, the Z rotation).
  106.  
  107. There are gadgets for additional equations but these are not
  108. implemented in this version.
  109.  
  110. ROTATION
  111.  
  112. The rotation can be set, in degrees, about each axis.  The
  113. standard mathematics convention is used.  If you are viewing
  114. along the positive Z axis towards the negative Z axis, then a
  115. positive rotation is counter-clockwise, negative is clockwise. 
  116. This also holds true for the other axes.  The final orientation
  117. of the plot is dependent on the order of axes rotations.  You can
  118. select one of the axes letters to the left of the three gadgets
  119. by clicking the left mouse button on the letter and the order of
  120. rotation will be changed.  There are six different orders, they
  121. will be cycled through as you continue to click. The rotations
  122. will be applied to the default orientation which is X- positive
  123. to the right, Y-positive upwards, and Z-positive perpendicular to
  124. the screen, pointed towards the user.
  125.  
  126. NOTE - There is a known bug in these gadgets that causes the
  127. gadgets to sometimes not push the contents to the undo buffer. 
  128. Also, if you click in a gadget and then not press return, a wrong
  129. angle may result.
  130.  
  131. ORIGIN
  132.  
  133. This is simply the X and Y screen coordinates for the origin of
  134. the plot.
  135.  
  136. SIZING
  137.  
  138. Proj Plane is the position along the default Z-axis where the
  139. projection plane is located.
  140.  
  141. View Dist is the distance of the viewer from the projection
  142. plane.  In this version, the distance only affects perspective,
  143. not the size of the plot.  Scale can be used to resize.
  144.  
  145. Proj Plane and View Dist are in plotting units, not pixels.
  146.  
  147. Scale is the number of screen pixels per plotting unit.  This
  148. value can be used to control the size of the plot.  This value
  149. will have to be changed when the screen resolution is changed in
  150. order to maintain a constant plot size.
  151.  
  152. LINE SPACING
  153.  
  154. The 3D plot will consist of contour lines at constant values of
  155. X, Y, or both.  These values set the spacing, in plot units,
  156. between these lines.
  157.  
  158. PLOT SPAN
  159.  
  160. These values determine the plotting range in coordinate units
  161. along the X and Y axes.  The plotting range along the Z-axis is
  162. determined by the equation being plotted.
  163.  
  164. PLOT PRECISION
  165.  
  166. When contour lines are being drawn at constant values of X and Y,
  167. the distance between the calculated points along the lines is
  168. determined by these numbers (in plot units).  The smaller these
  169. numbers are, the more detail that is available for plots that
  170. vary widely over short distances.  A line is drawn between each
  171. calculated point.  These values only apply to the Normal plot
  172. (see below).
  173.  
  174. AXES SPAN
  175.  
  176. This is identical to the Plot Span except it applies to the axes. 
  177. By having the axes span separate, the axes can be made to extend
  178. beyond the range of the plot.  Note that a Z-range must be given.
  179.  
  180. AXES PRECISION
  181.  
  182. This is the same as Plot Precision except it applies to the axes. 
  183. The axes are drawn as dots at each calculated point rather than
  184. lines connecting the points.  This prevents the axis lines from
  185. ever overwriting a contour line that is in front of the axis.  If
  186. this number is too large, the axes will be dotted lines.
  187.  
  188. SURFACE
  189.  
  190. Surface is a boolean gadget that cycles through three choices as
  191. the user selects it.  The options are 'X and Y', 'X only', and 'Y
  192. only'. These options control how the contour lines are drawn.  If
  193. 'X and Y' is selected then contour lines will be drawn along both
  194. axes.  'X only' restricts the plot to contour lines at constant
  195. values of Y, and 'Y only' restricts the plot to contour lines at
  196. constant values of X. These options only apply to the Normal plot
  197. (see below).
  198.  
  199. AXES TYPE
  200.  
  201. Axes Type is another boolean gadget that cycles through three
  202. different options for the type of axes to be drawn.  The 'None'
  203. option results in no axes being drawn.  The 'Star' option results
  204. in standard axes being drawn with each axis crossing the other
  205. two at the origin.  The 'Box' option results in a rectangular
  206. box being drawn with the vertices equal to the Axes Span values.
  207.  
  208. NOTE
  209.  
  210. This gadget allows the user to store a comment about the plot.
  211.  
  212. ------------ PROJECT MENU ------------
  213.  
  214. This menu contains nine items.  Some of these are not yet
  215. implemented. The >> symbol to the left of some menu items
  216. indicates that these items have subitems.
  217.  
  218. NEW
  219.  
  220. This item is used to reset all plotting parameters to the program
  221. defaults.
  222.  
  223. OPEN
  224.  
  225. This item allows the retrieval of stored files.  It has three
  226. subitems: All, Settings, and Picture.  Settings will retrieve
  227. only the settings displayed on the input window (file must have
  228. an extension of .3DPL, see Save As option below), Picture
  229. retrieves IFF ILBM graphics files, and All gets both.  If the
  230. ILBM file is named MyPic, then the settings file should be named
  231. MyPic.3DPL.  When choosing a settings file only, a picture file
  232. only, or both, you can select either the picture or the settings
  233. file.  The program will adjust the name appropriately.
  234.  
  235. When choosing Open, the ARP file requester (from arp.library,
  236. thanks Charlie Heath and others!) appears.  It lists files and
  237. directories in a selection area.  The list can be scanned up or
  238. down by using the arrows or proportional gadget on the right side
  239. of the file selection area.  A directory can be chosen by
  240. clicking on the directory name or typing it in the Drawer gadget. 
  241. A file can be selected by clicking on the name or typing it in
  242. the File gadget.
  243.  
  244. Once a file is selected, it can be loaded by clicking on the OK
  245. gadget, or it can be cancelled by clicking on Cancel.
  246.  
  247. SAVE
  248.  
  249. This item allows the Settings, Picture, or All to be saved under
  250. the previously selected filename.  The picture is saved as an IFF
  251. ILBM graphics file that can be retrieved by Deluxe Paint and
  252. other graphics packages.
  253.  
  254. SAVE AS
  255.  
  256. This item works just like save except a requester identical to
  257. the Load requester is displayed so a new filename can be
  258. selected.  The picture is saved as an IFF ILBM graphics file that
  259. can be retrieved by Deluxe Paint and other graphics packages. 
  260. The settings file is saved as an IFF 3DPL file (my own creation). 
  261. When you save files, the program will insure that the settings
  262. file is identical in name to the picture file except with a .3DPL
  263. extension.
  264.  
  265. COLOR
  266.  
  267. This item has three subitems: Adjust, Load, and Save.
  268.  
  269. Adjust displays a color requester on the Graph screen that allows
  270. the colors to be changed by the user.  This requester was written
  271. by the Dissidents and is implemented in color.library.
  272.  
  273. The requester is similar to others you have seen.  A set of RGB
  274. sliders appear along the right.  These can be changed to a set of
  275. HSL sliders by selecting one of the letters in RGB.  The color
  276. palette appears at the top and is arranged top to bottom, left
  277. to right.  The current color has a box around it.  3DPlot uses
  278. color 0 (upper left of color palette) for the background.  Color
  279. 1 is the border color.  Color 2 is the axes color.  Color 3 will
  280. be used for text, but is not used in this version.  In low
  281. resolution, colors 4-27 (24 colors) are used for the graph (more
  282. about this later).  Colors 28-31 are not currently used.  In high
  283. resolution, colors 4-15 (12 colors) are used for the graph.
  284.  
  285. You can copy one color to another by choosing the color to be
  286. copied, choosing the Copy gadget, and then selecting the color to
  287. be copied to.
  288.  
  289. You can smoothly range a series of colors by choosing the first
  290. color, then the Spread gadget, and finally the second color.
  291.  
  292. You can undo the last change you made with the Undo gadget.
  293.  
  294. The Default gadget is not implemented in this version.
  295.  
  296. The Load and Save menu subitems can be used to load and save
  297. color palettes.  When you save a palette, it is stored as an ILBM
  298. file with only color information.  When loading a palette, you
  299. can load one of these shortened file or you can load the color
  300. palette from a complete ILBM file.
  301.  
  302. SCREEN
  303.  
  304. This item can be used to choose the screen resolution you wish to
  305. work with.  Options are low- and high-resolution, interlaced and
  306. non- interlaced, and normal, medium overscan, and severe
  307. overscan.  The overscan screens are not yet implemented.
  308.  
  309. TITLE
  310.  
  311. This item simply toggles the title bar of the graph screen on and
  312. off.
  313.  
  314. PRINT
  315.  
  316. This item will be used to do a graphics dump to the printer but
  317. is not yet implemented.
  318.  
  319. EXIT!
  320.  
  321. End the program.  NO WARNING is given.
  322.  
  323. ------------- FUNCTION MENU -------------
  324.  
  325. The Function menu contains four items.
  326.  
  327. PLOT
  328.  
  329. This is the action item.  Choosing one of its subitems makes
  330. 3DPlot go to work.  The plot appears on a separate screen, the
  331. Graph screen.  The four plot options are: Normal, Hidden, Solid,
  332. and Contour.  Upon choosing one of these options, 3DPlot will
  333. calculate values of Z at various points within the plot range
  334. specified by the Plot Span gadgets on the input window.  Minimum
  335. and maximum distances from the viewer are determined and then
  336. split into either 24 or 12 equal ranges, depending on the screen
  337. resolution.  Plotting then begins.  (There could be a rather long
  338. delay before a plot begins if a large range and small spacing is
  339. chosen.  It is usually good to start with a rough quick plot and
  340. then do a detailed plot when all looks well.)  Far points will be
  341. plotted in color 4, near points will be plotted in color 27 or 15
  342. depending on the resolution, and points in the middle will be
  343. distributed between the intervening colors.
  344.  
  345. Normal causes the plot to draw lines along constant X or Y values
  346. or both based on the Surface gadget setting.  The lines are drawn
  347. separately and have a resolution based on the Plot Precision
  348. settings. This plot usually takes the longest.
  349.  
  350. Hidden draws the graph as a series of hollow (filled with
  351. background color) four-sided polygons starting with the
  352. fartherest corner and working forward.  The size of the polygons
  353. is determined by the Line Spacing gadgets settings.  Since each
  354. successive polygon appears in front of the previously drawn
  355. polygons, the graph will have hidden lines removed.
  356.  
  357. Solid is exactly the same as Hidden except the four-sided
  358. polygons are filled with the plot color rather than the
  359. background color.  This makes the graph appear as a solid figure.
  360.  
  361. Contour will draw a flat graph with no perspective, letting the
  362. graph colors define the shape of the graph.
  363.  
  364. Once the graph is drawn, the axes are drawn unless the Axes Type
  365. is set to None.
  366.  
  367. STOP PLOT
  368.  
  369. Choosing this item after choosing a Plot option will interrupt
  370. the plot and return control to the user.  The interuption will
  371. not occur until the currently plotting contour line is complete.
  372.  
  373. SETTINGS
  374.  
  375. Selection of this item causes the Settings screen containing the
  376. input window to be brought to the front.
  377.  
  378. GRAPH
  379.  
  380. Selection of this item causes the Graph screen containing the
  381. Plot (if one has been plotted) to be brought to the front.
  382.  
  383. --------- TEXT MENU ---------
  384.  
  385. This menu contains several items for adding text to the plot
  386. screen. None of these items are implemented yet and are not
  387. discussed.
  388.  
  389. --------------- CLOSING REMARKS ---------------
  390.  
  391. I hope you enjoy the program.  If you have any questions, you can
  392. write me or contact me on BIX.
  393.