home *** CD-ROM | disk | FTP | other *** search
- Persistence of Vision Raytracer (PV-Ray)
- Twister - Extension utility
- ------------------------------------------------
- Twister is © Scintillating Graphics Company
-
- 18/10/93
-
- This program is freely distributable. The author retains the copyright to
- the program but authorizes free distribution by BBS'es, networks, magnetic
- media, etc. The distributor may charge no more than the two pounds (£2) U.K
- for this software.
-
- The data files generated by this utility are the property of the user of the
- software and may be used for any purpose without restriction.
-
- The author makes no quarantees or warranties with this program and claims no
- responsibility for any damage or loss of time caused by this program. Bug
- reports may be sent the the author but the author is under no obligation to
- provide bug fixes, features, or any support for this software.
-
- The following conditions are also placed on the use of this program.
-
- 1) That is should not be used as part of any commercial package without the
- explicit written consent of the Author
- 2) If you create any interesting pictures, please send them to me.
- 3) If you make any changes to the source code, please let me know.
- 4) This text file must accompany the program.
-
-
-
- This manual is divided into the following sections:
-
- 1) Application Description
- 2) A Tutorial Walkthrough
- 3) The Creation Parameters
- 4) Concluding Remarks
-
-
- 1) Application Description
-
- This application is an additional utility which provides support for
- creating more complex data files for the Persistence of Vision Raytracer,
- which would otherwise be time consuming to write by hand. The program
- provides creates a data file of a shape being twisted around as it moves
- through space, that can be included in your scene script. This produces some
- interesting macaroni or screw effects.
-
-
- 2) A Tutorial Walkthrough
-
- This section is designed to get you up and running creating your own twister
- data files without all the nit-picky details. Once you've gone through this,
- you'll probably ignore the rest of the manual because it's so simple.
-
-
- 2.1) Begining To Create A File
-
- Double click on the appliaction icon in the filer window, The application
- will the install itself on the iconbar. Click on the icon to bring up the
- parameters window.
-
-
- 2.2) Altering the parameters
-
- The parameters control how the object is rotated and moved through space,
- the object to rotate, and what the complete twist should will be declared
- as. You can move the caret through the options using the arrow keys, or
- click in a box with the mouse to enter that parameter. For the moment, enter
- the following values, TwistMe, Twister, 10, 2.5, 50. Note that the capital
- letters in the first two inputs are important (They must correspond exactly
- to the names you use when you #include the file in your PVRay script file).
-
-
- 2.3) Creating the Twister data file
-
- Now that we have set up the parameters, we can create the twister data file
- by clicking on the "Create" icon at the bottom of the window. A standard
- save dialogue box will appear, either drag the icon to a filer or enter the
- pathname. The hourglass will appear along with a percentage indication of
- how much of the data file has benn created.
-
-
- 2.4) Implementing the data file
-
- Now we have created the data file, we need to display it. You could always
- drag it onto your editor window, and paste it straight into your main data
- file, or you could always #include it. Either way, there are a couple of
- things you need to do first.
-
-
- 2.4.1) Declaring the object to twist.
-
- First we must declare the object that we want twisted. You will remember (At
- least I hope you will!), that we told the Twister application that we wanted
- it to twist a shape named TwistMe, or whatever you instructed it. We must
- therefore declare the shape TwistMe.
-
- #declare TwistMe = quadric
- QSphere
- scale <6.0 0.2 0.2>
- end_quadric
-
- The shape to twist must be a quadric, in our case we are using a stretched
- sphere, this will produce a spiral effect somewhat like macaroni.
-
-
- 2.4.2) Including the twister datafile
-
- Now that we have declared our object to be twisted, we can now #include our
- Twisted file, you would obviously need to change the pathname to suit your
- own system.
-
- #include "IDEFS::HardDisc4.$.Apps.PV.PVWidgets.Twisted"
-
-
- 2.4.3) Creating the twisted object
-
- We can now create the twisted object by placing the name that we declared
- our twister under, "Twisted" inside an OBJECT ... END_OBJECT block, and
- assigning any relevant texture details.
-
- OBJECT
- Twisted
- TEXTURE
- COLOUR Red 1.0
- PHONG 0.4
- PHONGSIZE 60
- END_TEXTURE
- END_OBJECT
-
- We have now created our Twisted object at <0 0 0>, before you render the
- scene you will need to put in a light source, and a view point, but I'll
- leave that up to you. If you are stuck, look at the TwistTest file to see
- how it has been done, the file also includes a lightsource and the viewpoint
- if you are unsure where to place them.
-
-
- 3) The Creation Parameters
-
- This section looks in more depth at the parameters that can be altered
- within the program to alter the shape of the twist.
-
-
- 3.1) The object to twist
-
- Changing this changes the name of the object to twist. The object to twist
- must be a quadric. Best effects are achieved with a sphere elongated along
- the X or Z axis. Because the object is twisted around the Y axis, scaling
- along the Y axis should only be to bring the size of the object along the Y
- axis to around double the step size, this avoids gaps appearing in the
- twist. The step size can be worked out by dividing the vertical distance to
- move by the number of steps. Interesting effects can be achieved by
- translating the object by a series of units along the X or Z axis, this can
- create helix like effects. You may need to increase the number of steps in
- order to obtain a smooth helix.
-
-
- 3.2) Declare as.
-
- This is the name that the twist will be declared under, it is the name you
- specify in the OBJECT ... END_OBJECT construct of your scene script. The
- twist will start at 0, and go up to "the vertical distance to move" along
- the Y axis. The twist is centered around the y axis (where the x and z axis'
- cross).
-
-
- 3.3) The vertical distance.
-
- This is the distance along the Y axis between the centre of the first object
- in the twist, and the last. By setting this to a small value, 0.0001 you can
- twist the object on the spot. By setting the number of steps to 3, and the
- turn to 0.5 you can create a nice six petal flower. You only need to have
- half a turn because the other half would define objects in the same
- positions as the previous ones.
-
- 3.4) The number of twists.
-
- This is the number of times that the object makes a complete rotation of
- 360°. This can be set to fractional vaues, ie 0.5 for a 180° twist.
-
-
- 3.5) The number of steps.
-
- This details the number of steps that are taken to move smoothly between the
- start and end of the vertical distance. The number of twists are
- automatically calculated to fit the correct number of times. The more steps
- you use, the smoother the finished twist will be, however, large amounts of
- memory will be used. Smaller step sizes can lead to gaps appearing between
- adjacent parts of the twist. This can be used to an advantage for some
- things. The application intelligently works out how much memory will be
- needed, the memory is claimed briefly by the program to create the twist the
- released afterwards. If there isn't enough free memory available, you will
- be ttold how much is required. Approximately 80k is needed for a twist of
- about 1000 steps, bear in mind that you'll need at least two megs of memory
- to run a twist that size throught the raytracer. Values of about 200 give
- reasonable results.
-
-
- 4) Concluding Remarks
-
- This is version 2.0 of Twister. Additional features soon to be incorporated
- are the ability to twist declared unions, intersections or differences.
-
- If you wish to send me any interesting pictures you've created (please
- include the scripts as well), bug reports (or fixes), I can be contacted by,
-
- Brian Tucker
- 19, Holtwood Drive,
- Ivybridge,
- Devon.
- PL21 9TH
-
- Sorry it only snail mail, donations so I can buy a modem will be gladly
- accepted.
-
- Look out for the other PVWidget projects that I'm working on, Lathe, Sweep
- and Extrude, Hand, Pins, LSys>PVRay, EquPath others may follow, if you have
- any ideas...
-
-