home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 200-299 / ff231.lzh / Plot / Docs / ThreeDPlot.doc < prev    next >
Text File  |  1989-07-23  |  5KB  |  128 lines

  1. **************************************************************************
  2.  
  3.     THIS SOFTWARE IS IN THE PUBLIC DOMAIN.  IT IS INTENDED TO
  4.     BE AVAILABLE FREE TO ANYONE WHO WANTS IT.  YOU MAY USE AND
  5.     DISTRIBUTE IT AS YOU LIKE WITH THE FOLLOWING RESTRICTIONS:
  6.  
  7.     1)  You may not sell this software or charge more than a
  8.         small copying/hassle fee for distributing it.
  9.  
  10.     2)  You may not remove this notice from the distribution.
  11.  
  12.         Tim Mooney
  13.         5904 Vandegrift Ave.
  14.         Rockville, MD 20851
  15.  
  16. ****************************************************************************
  17.  
  18.     ThreeDPlot - 3-D DATA PLOTTING ROUTINE
  19.    
  20.       ThreeDPlot displays the projection on the x-y plane of a function z(x,y).
  21.    The function must be single-valued, and defined on a regular x-y grid.
  22.  
  23. ------------------------------------------------------------------------
  24.  
  25.       To get a quick idea of what is going on here, drop a net over a
  26.    chessboard in the middle of a game: the heights of the various pieces
  27.    are the z coordinates; the positions (row, column) of the pieces are
  28.    the (x, y) coordinates.  ThreeDPlot draws a picture of the net.
  29.    
  30.       Continuing with the chessboard analogy: ThreeDPlot first wants to know
  31.    how many rows and columns of data to expect.  Then it wants z coordinates,
  32.    starting with the row nearest you, from left to right, to the row
  33.    nearest your opponent.  Further, ThreeDPlot wants all of this in a binary
  34.    file: 4-byte-int (# rows); 4-byte-int (# columns); 4-byte-floats (z
  35.    coordinates).  ThreeDPlot does NOT want x or y coordinates in the data file. 
  36.    (The program dat_2_bin exists to convert a text file of z-data to a binary
  37.    file ThreeDPlot will plot.  See notes below on dat_2_bin.)
  38.    
  39.       You tell ThreeDPlot from what viewing point you wants to see the net.
  40.    Imagine looking at the board "edge-on" -- your eyes level with the
  41.    table -- and facing your opponent.  ThreeDPlot calls this position
  42.    "phi = 0 degrees, theta = 0 degrees".  If you rotate the board clock-
  43.    wise (as seen from above) on the table, you are increasing phi to some
  44.    positive value.  Now with phi fixed, tilt the table toward you so that
  45.    the pieces would fall in your lap.  To ThreeDPlot, this decreases theta
  46.    to some negative angle;  it gives you a view of the top of the board.
  47.  
  48.       ThreeDPlot uses a very simple algorithm for hidden-line removal: lines
  49.    are plotted from the bottom of the screen up; for each possible horizontal
  50.    position, a record is kept of the topmost point plotted so far.  This
  51.    algorithm is suitable for binned data, chessboards viewed from above,
  52.    and the like.  A command line option ("-2") allows a "bottom view " of
  53.    the data set to be displayed also;  the same algorithm is used in reverse.
  54.    
  55. *************************************************************************
  56. There are two menus, PROJECT and OPTIONS:
  57.  
  58. *******
  59. PROJECT
  60.  
  61. Open           not implemented
  62.  
  63. Make PltFile   ThreeDPlot will write a file which can be sent ("Copy
  64.                myplotfile TO ser:") to any plotter that understands HPGL, the
  65.                Hewlett Packard Graphics Language. Commands in the plot file
  66.                instruct the (serial interface) plotter to use xON/xOFF.
  67.  
  68. Make TxtFile   ThreeDPlot will write a file that can be converted into an
  69.                IntroCAD drawing.  The program txt_2_icad does this
  70.                conversion.
  71.  
  72. Quit           Quits to CLI.
  73.  
  74.  
  75. *******
  76. OPTIONS  (all are toggles)
  77.  
  78. BothSides      Draws top and bottom sides of data
  79.  
  80. Axes           Toggles axes.
  81.  
  82. NegImage       Swap background and foreground colors.
  83.  
  84. Net Plot       Toggle between crosshatch plot and simpler line plot
  85.  
  86.  
  87.  
  88. *************************************************************************
  89.    Also, ThreeDPlot reads the keyboard -- specifically, the arrow keys and
  90. the numbers 1-9 on the numeric keypad.  Pressing one of these causes a replot
  91. with one or both viewing angles changed by 10 degrees.  The action of some
  92. of these keys is counter-intuitive if theta is greater than 180 degrees.
  93.  
  94. *************************************************************************
  95. dat_2_bin
  96.     dat_2_bin reads a text file and makes a binary file that ThreeDPlot
  97. can read.  (It takes a relatively long time to do this.  The read/convert
  98. step has been taken out of ThreeDPlot and made into a separate program for
  99. this reason.)
  100.  
  101.     dat_2_bin wants a file with the following format:
  102.  
  103. NX NY    !MUST be on first line of file
  104. x[1]    !Anything may follow a number on a line.  All but the number will
  105. x[2]    !be ignored.
  106. x[3]
  107.  .
  108.  .
  109.  .
  110. x[NX]
  111. y[1]
  112. y[2]
  113. y[3]
  114.  .
  115.  .
  116.  .
  117. y[NY]
  118. z[1]
  119. z[2]
  120. z[3]
  121.  .
  122.  .
  123.  .
  124. z[NX*NY]
  125. end-of-file
  126.  
  127.  
  128.