home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / p / pvrayfiles / Twister / !Twister / !Help next >
Encoding:
Text File  |  1988-06-16  |  8.5 KB  |  220 lines

  1.      Persistence of Vision Raytracer (PV-Ray)
  2.           Twister - Extension utility
  3.      ------------------------------------------------
  4.      Twister is © Scintillating Graphics Company
  5.  
  6. 18/10/93
  7.  
  8. This program is freely distributable. The author retains the copyright to
  9. the program but authorizes free distribution by BBS'es, networks, magnetic
  10. media, etc. The distributor may charge no more than the two pounds (£2) U.K
  11. for this software.
  12.  
  13. The data files generated by this utility are the property of the user of the
  14. software and may be used for any purpose without restriction.
  15.  
  16. The author makes no quarantees or warranties with this program and claims no
  17. responsibility for any damage or loss of time caused by this program. Bug
  18. reports may be sent the the author but the author is under no obligation to
  19. provide bug fixes, features, or any support for this software.
  20.  
  21. The following conditions are also placed on the use of this program.
  22.  
  23.  1) That is should not be used as part of any commercial package without the 
  24.     explicit written consent of the Author
  25.  2) If you create any interesting pictures, please send them to me.
  26.  3) If you make any changes to the source code, please let me know.
  27.  4) This text file must accompany the program.
  28.  
  29.  
  30.  
  31. This manual is divided into the following sections:
  32.  
  33.    1) Application Description
  34.    2) A Tutorial Walkthrough
  35.    3) The Creation Parameters
  36.    4) Concluding Remarks
  37.  
  38.  
  39. 1)  Application Description
  40.  
  41. This application is an additional utility which provides support for
  42. creating more complex data files for the Persistence of Vision Raytracer,
  43. which would otherwise be time consuming to write by hand. The program
  44. provides creates a data file of a shape being twisted around as it moves
  45. through space, that can be included in your scene script. This produces some
  46. interesting macaroni or screw effects.
  47.  
  48.  
  49. 2)  A Tutorial Walkthrough
  50.  
  51. This section is designed to get you up and running creating your own twister
  52. data files without all the nit-picky details. Once you've gone through this,
  53. you'll probably ignore the rest of the manual because it's so simple.
  54.  
  55.  
  56. 2.1)     Begining To Create A File
  57.  
  58. Double click on the appliaction icon in the filer window, The application
  59. will the install itself on the iconbar. Click on the icon to bring up the
  60. parameters window.
  61.  
  62.  
  63. 2.2)     Altering the parameters
  64.  
  65. The parameters control how the object is rotated and moved through space,
  66. the object to rotate, and what the complete twist should will be declared
  67. as. You can move the caret through the options using the arrow keys, or
  68. click in a box with the mouse to enter that parameter. For the moment, enter
  69. the following values, TwistMe, Twister, 10, 2.5, 50. Note that the capital
  70. letters in the first two inputs are important (They must correspond exactly
  71. to the names you use when you #include the file in your PVRay script file).
  72.  
  73.  
  74. 2.3)     Creating the Twister data file
  75.  
  76. Now that we have set up the parameters, we can create the twister data file
  77. by clicking on the "Create" icon at the bottom of the window. A standard
  78. save dialogue box will appear, either drag the icon to a filer or enter the
  79. pathname. The hourglass will appear along with a percentage indication of
  80. how much of the data file has benn created.
  81.  
  82.  
  83. 2.4)     Implementing the data file
  84.  
  85. Now we have created the data file, we need to display it. You could always
  86. drag it onto your editor window, and paste it straight into your main data
  87. file, or you could always #include it. Either way, there are a couple of
  88. things you need to do first.
  89.  
  90.  
  91. 2.4.1)   Declaring the object to twist.
  92.  
  93. First we must declare the object that we want twisted. You will remember (At
  94. least I hope you will!), that we told the Twister application that we wanted
  95. it to twist a shape named TwistMe, or whatever you instructed it. We must
  96. therefore declare the shape TwistMe.
  97.  
  98.    #declare TwistMe = quadric
  99.       QSphere
  100.       scale <6.0 0.2 0.2>
  101.    end_quadric
  102.  
  103. The shape to twist must be a quadric, in our case we are using a stretched
  104. sphere, this will produce a spiral effect somewhat like macaroni.
  105.  
  106.  
  107. 2.4.2)   Including the twister datafile
  108.  
  109. Now that we have declared our object to be twisted, we can now #include our
  110. Twisted file, you would obviously need to change the pathname to suit your
  111. own system.
  112.  
  113.    #include "IDEFS::HardDisc4.$.Apps.PV.PVWidgets.Twisted"
  114.  
  115.  
  116. 2.4.3)   Creating the twisted object
  117.  
  118. We can now create the twisted object by placing the name that we declared
  119. our twister under, "Twisted" inside an OBJECT ... END_OBJECT block, and
  120. assigning any relevant texture details.
  121.  
  122.    OBJECT
  123.       Twisted
  124.       TEXTURE
  125.          COLOUR Red 1.0
  126.          PHONG 0.4
  127.          PHONGSIZE 60
  128.       END_TEXTURE
  129.    END_OBJECT
  130.  
  131. We have now created our Twisted object at <0 0 0>, before you render the
  132. scene you will need to put in a light source, and a view point, but I'll
  133. leave that up to you. If you are stuck, look at the TwistTest file to see
  134. how it has been done, the file also includes a lightsource and the viewpoint
  135. if you are unsure where to place them.
  136.   
  137.  
  138. 3) The Creation Parameters
  139.  
  140. This section looks in more depth at the parameters that can be altered
  141. within the program to alter the shape of the twist.
  142.  
  143.  
  144. 3.1) The object to twist
  145.  
  146. Changing this changes the name of the object to twist. The object to twist
  147. must be a quadric. Best effects are achieved with a sphere elongated along
  148. the X or Z axis. Because the object is twisted around the Y axis, scaling
  149. along the Y axis should only be to bring the size of the object along the Y
  150. axis to around double the step size, this avoids gaps appearing in the
  151. twist. The step size can be worked out by dividing the vertical distance to
  152. move by the number of steps. Interesting effects can be achieved by
  153. translating the object by a series of units along the X or Z axis, this can
  154. create helix like effects. You may need to increase the number of steps in
  155. order to obtain a smooth helix.
  156.             
  157.  
  158. 3.2) Declare as.
  159.  
  160. This is the name that the twist will be declared under, it is the name you
  161. specify in the OBJECT ... END_OBJECT construct of your scene script. The
  162. twist will start at 0, and go up to "the vertical distance to move" along
  163. the Y axis. The twist is centered around the y axis (where the x and z axis'
  164. cross).
  165.  
  166.  
  167. 3.3) The vertical distance.
  168.  
  169. This is the distance along the Y axis between the centre of the first object
  170. in the twist, and the last. By setting this to a small value, 0.0001 you can
  171. twist the object on the spot. By setting the number of steps to 3, and the
  172. turn to 0.5 you can create a nice six petal flower. You only need to have
  173. half a turn because the other half would define objects in the same
  174. positions as the previous ones. 
  175.                                                                       
  176. 3.4) The number of twists.
  177.  
  178. This is the number of times that the object makes a complete rotation of
  179. 360°. This can be set to fractional vaues, ie 0.5 for a 180° twist.
  180.  
  181.  
  182. 3.5) The number of steps.
  183.  
  184. This details the number of steps that are taken to move smoothly between the
  185. start and end of the vertical distance. The number of twists are
  186. automatically calculated to fit the correct number of times. The more steps
  187. you use, the smoother the finished twist will be, however, large amounts of
  188. memory will be used. Smaller step sizes can lead to gaps appearing between
  189. adjacent parts of the twist. This can be used to an advantage for some
  190. things. The application intelligently works out how much memory will be
  191. needed, the memory is claimed briefly by the program to create the twist the
  192. released afterwards. If there isn't enough free memory available, you will
  193. be ttold how much is required. Approximately 80k is needed for a twist of
  194. about 1000 steps, bear in mind that you'll need at least two megs of memory
  195. to run a twist that size throught the raytracer. Values of about 200 give
  196. reasonable results.
  197.                                                                       
  198.  
  199. 4) Concluding Remarks
  200.  
  201. This is version 2.0 of Twister. Additional features soon to be incorporated
  202. are the ability to twist declared unions, intersections or differences.
  203.  
  204. If you wish to send me any interesting pictures you've created (please
  205. include the scripts as well), bug reports (or fixes), I can be contacted by,
  206.  
  207.      Brian Tucker
  208.      19, Holtwood Drive,
  209.      Ivybridge,
  210.      Devon.
  211.      PL21 9TH
  212.                                                                            
  213. Sorry it only snail mail, donations so I can buy a modem will be gladly
  214. accepted.
  215.  
  216. Look out for the other PVWidget projects that I'm working on, Lathe, Sweep
  217. and Extrude, Hand, Pins, LSys>PVRay, EquPath others may follow, if you have
  218. any ideas...
  219.  
  220.