home *** CD-ROM | disk | FTP | other *** search
/ World of Graphics / WOGRAPH.BIN / 672.README.DOC < prev    next >
Text File  |  1992-10-31  |  8KB  |  175 lines

  1.                        S P E R E C A L
  2.                         VERSION   1.1
  3.  
  4.                  Written By:  Jeff Pettyjohn
  5.  
  6.  
  7.  
  8.      Welcome to spherecal. This program is a result of my
  9. first experiments in C++ programming. I hope it will suit
  10. your fancy. I am a full-time student attending Penn State
  11. UV studying mechanical engineering. I wanted to learn C++
  12. programming. So, I gave it a wing and I wanted to share the
  13. results.
  14.      This program is written originally for Steven Coy's
  15. VIVID version 2. I have also now added the ability to
  16. produce CTDS outputs as well.  ( I hope it works )
  17.      The spherecal executable is actually called
  18. SPHERCAL.EXE contained in this .ZIP file. Sorry, DOS only
  19. allows 8 character file names. TOO BAD.
  20.      Any way, spherecal will always place the calculated file
  21. of spheres, cones, and polygons to SPHERE.VO. SO, if you have
  22. a file named SPHERE.VO that you want to keep, you might want
  23. to consider renaming it. Just a suggestion.
  24.      There's not too much to explain about this program, so
  25. I'll just give a brief description of how the program works,
  26. and let you go to explore.
  27.      First, this program was written to calculate the
  28. location of spheres around a sphere. I built on this and
  29. added the ability to generate grids around a sphere, and
  30. generate a spiral around a sphere.
  31.      When running the program, SPHERCAL.EXE will first ask
  32. you which sphere option or type you would like. The three
  33. choices are " S " for spheres, " G " for grids, and " P " for
  34. spirals, all of which will be described bellow.
  35.      There are now two command line parameters added. The are
  36. -CT   ---   this will output CTDS coordinates
  37.             ( Connect The Dot Smoother )
  38. -XT   ---   this will turn on the Extended options to
  39.             be explained further in this document
  40. These parameters are typed in directly after sphercal at the
  41. DOS prompt. Here's an example:
  42. SPHERCAL -CT -XT
  43.         |___|__ Don't forget the spaces
  44. Typing this at the DOS prompt will turn on CTDS output with
  45. the Extended Options on. It doesn't matter which order
  46. they're entered, Or if they're in capitol or lowercase
  47. letters.
  48.      Please note, all the descriptions and calculations are
  49. based on the assumption that in the STUDIO set up for your
  50. scene, the Z axis is up, the X axis is right to left, and the
  51. Y axis moves in and out of the screen. This can be
  52. accomplished by setting: UP 0 0 1 , in the studio. The output
  53. file, " SPHERE.VO ", can be included into your scene by the
  54. statement: #include SPHERE.VO , directly after your surface
  55. definition.
  56.  
  57. -------------------------------------------------------------
  58.  
  59. TYPE :  SPHERES
  60.  
  61.      Spheres will calculate the location of spheres around a
  62. central sphere. Sphercal will ask for the number of
  63. horizontal and vertical spheres. The horizontal spheres are
  64. those around the Z axis, and the vertical spheres are those
  65. that go up and down the Z axis. I hope that clears things up
  66. a bit. Any way, Sphercal asks for the radius of each
  67. individual sphere and the radius of the main sphere ( the
  68. sphere that the other spheres are to be placed around ),
  69. fairly obvious hopefully. Spherecal also asks for the Off
  70. center location separated by spaces. Sphercal assumes the
  71. main sphere is located at 0-X 0-Y 0-Z in your scene. If you
  72. wish to change this, simply enter the new location at this
  73. prompt like this:
  74.  
  75. 3 -15 100
  76.  |___|
  77. DON'T FORGET THE SPACES
  78.  
  79. Sphercal will also ask for  Beaded or Smooth. Beaded means
  80. that only the spheres will be generated. Smooth means that a
  81. cone will be generated connecting the spheres.
  82.      This part of the program is a little buggy; but it
  83. creates some interesting outputs. So I decided to let it be.
  84. Try entering 3 for horizontal spheres, and 12 for vertical
  85. spheres, fill in the other values, choose the SMOOTH option,
  86. and see what you get.
  87.      If the CTDS Output is on, Only the spheres X Y Z
  88. location and the sphere's radius will be output to
  89. SPHERE.VO. SPHERCAL also will ask you for the number of
  90. coordinates to be generated befor placing a blank line.
  91. This file can then be used for CTDS.
  92.      As for now, there are no Extended options available for
  93. Type SPHERES. Your welcome to use the -XT when using this
  94. type; but it won't do anything.
  95.  
  96. TYPE :  GRIDS
  97.  
  98. This is one of my favorite types. Sphercal asks for # of
  99. vertical disections. These are the ones going up and down the
  100. sphere or Z axis. Sphercal will then ask you for # of
  101. horizontal disections. These are the ones around the Z axis.
  102. The radius of the intersection spheres are those place at the
  103. intersection of each grid, and the radius of the connecting
  104. bars controls the thickness of the cones that connect the
  105. spheres. To understand this better try an intersection radius
  106. of 4 and a connecting bar radius of 2 around a final sphere
  107. of 40. Sphercal also asks if you want Grids or Plates. The
  108. Grids option creates the grid around the sphere as explained
  109. above. The Plates option will place a polygon with points at
  110. each intersection. The Intersection spheres and connector
  111. bars will not be generated with this option.
  112.      If the Extended options are on, You can also control the
  113. starting and ending vertical and horizontal disections. This
  114. may require some playing around to get the desired view (
  115. depending on which part of the sphere you don't want ), But
  116. for a point of reference, here it goes. If the camera is on a
  117. positive Y axis and is looking directly at the sphere, the
  118. sphere will start being generated from the left, swing
  119. around the Y axis towards the camera, and then continue
  120. around to the back of the sphere. The grid is also generated
  121. from top to bottom at the same time. Thats the best and
  122. easiest description I could come up with. So, If you come up
  123. with a better one, I'm open to suggestions.
  124.      The CTDS output options are effective here as well; but
  125. it is untested. I'm not exactly sure how well it works. If
  126. someone out there plays with this option, let me know how it
  127. works.
  128.  
  129. TYPE :  SPIRALS
  130.  
  131. Spherecal first asks you if you want the spiral to turn
  132. Forwards or Backwards around the Z axis or sphere. Assuming
  133. the camera is on a positive Y axis, Forwards will calculate
  134. the spiral turning counter-clock wise. Sphercal also asks for
  135. the number of turns around the sphere. Sorry, only whole
  136. number of turns for now. You can control the thickness of the
  137. sphere at three locations, the beginning, middle and end of
  138. the spiral. The Off-center location and Beaded or Smooth
  139. options were discussed in TYPE :  SPHERES, and work the same
  140. way here. CTDS options are available here as well. Sorry,
  141. There aren't any extended options for this yet; but stay
  142. tuned.
  143.  
  144. -------------------------------------------------------------
  145.  
  146. The best way to understand all this is to try some values and
  147. see what you get. OK. Now for the legal junk.
  148.      Nothing special. This program is free for distribution
  149. for NONCOMMERCIAL USE ONLY as long at this documentation and
  150. SPHERCAL.EXE are distributed together, and that no
  151. modifications are made to either. I am not asking for any
  152. registration fee or anything like that. Just knowing that
  153. you actually read this far puts a grin on my face. HA HA.
  154. However, I would love to hear your comments on this program
  155. and if your really moved to, I wouldn't reject any donations
  156. for my college education sent to the address below.
  157.  
  158. Jeffrey Pettyjohn
  159. 248 Nollyn Drive
  160. Dallastown, PA 17313
  161.  
  162. I can also be contacted at:
  163.  
  164. CompuServe  ID# 76640,163
  165. "The Graphics Alternative" (510) 524-2780
  166. You Can Call Me Ray BBS (708) 358-5611
  167.  
  168. Hope you enjoy!!!!
  169.  
  170. PS:
  171.  
  172. I just wanted to give a special thanks to Truman Brown for
  173. all his help and suggestions to make this program better.
  174.  
  175.