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 following a user defined equation
for each of the three axis that can be included in your scene script. This
can produce some interesting spirals and wave paths.
2) A Tutorial Walkthrough
This section is designed to get you up and running creating your own path
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 moved through space, the object to
move, and what the complete path 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,
TraceMe, Path, 10, 100, 0, SIN(RAD(t))*10, 0, t. Note that the case of
characters in the first two inputs and the last the last three are
important. The first two must correspond exactly to the names you use when
you #include the file in your PVRay script file, the last three are basic
expressions which are evaluated by the program to create the path.
2.3) Creating the Path 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 to follow the path. You will
remember (At least I hope you will!), that we told the application that we
wanted it to twist a shape named TraceMe, or whatever you instructed it. We
must therefore declare the shape TraceMe.
#declare TraceMe = quadric
QSphere
end_quadric
The shape that follows the path must be a quadric, in our case we are using
a sphere, this will produce a line of dots following the curved path of a
sin wave.
2.4.2) Including the path datafile
Now that we have declared the object that follows the path, we can now #include our path file, you will obviously need to change the pathname to suit your own system.
We can now create the path by placing the name that we declared our twister
under, "Path" inside an OBJECT ... END_OBJECT block, and assigning any
relevant texture details.
OBJECT
Path
TEXTURE
COLOUR Red 1.0
PHONG 0.4
PHONGSIZE 60
END_TEXTURE
END_OBJECT
We have now created our Path at <0 0 0>, and stretching towards <0 0 100>
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 trace
Changing this changes the name of the object to trace. The object to trace
must be a quadric. Best effects are achieved with a sphere, although any quadric, with any scaling or translation could be used.To avoids gaps appearing in the path you can either increase the number of steps, or the size of the quadric.
3.2) Declare as.
This is the name that the path will be declared under, it is the name you
specify in the OBJECT ... END_OBJECT construct of your scene script. The
paths start and end points all depend on the equations you use to give the
position, and the range of values you tell it to calculate.
3.3) The number of steps.
This is the number of times the program will calculate the position and
place an object at that point. If you want fifty spheres following a sin
wave you would need to enter 50 in this parameter.
3.4) Maximum and Minimum ranges.
These are the upper and lower limits for the variable "t" which is
incrememnted by an amount each time an object needs to be plotted. "t" is
incremented by the exact amount required to give the number of steps between
the minimum value and the maximum value.
If your equations are based on degrees, set the maximum value to 360, the
minimum value to 0 and the number of steps to 360, the program will now plot
an object for every degree in the circle.
3.5) The Equations
The equations give the values of X,Y and Z at which the object should be plotted. The equation can be any function which can be evaluated by BASIC's EVAL function. The variable which is increase between plots is "t", "t" will always be between the minimum and maximum ranges.
Legitimate commands are :
+ - * / ^
ABS ACS ASN ATN COS
DEG DIV EXP INT LOG
LN PI RAD RND SGN
SQR TAN ( ) t
Example - The quadratic equation y=x²+2x-8
X - needs to increased at a uniform rate, the only value which changes is
"t", therefore need to place "t" in the X equation, ie. X=t.
Y - is function of X, unfortunately we can't use X directly so we need to
substitute the euqation that equals X for all the X's in the Y=f(X)
equation. Luckily X=t, so it is simply a matter of replacing the X's
with t's. The only other things we need to remember is that the ²
symbol will cause a crash, we need to use ^2 instead and that 2x
needs to be expanded to 2*x. The Y equation should look like this,
Y=t^2+2*t-8 .
Set ranges of -20 to 20 and the number of steps to 40, and you will
create a parabola.
4) Concluding Remarks
This is version 1.0 of EquPath. Additional features soon to be incorporated
are the ability to twist declared unions, intersections or differences, and
the ability to specify the rotation of the object as an equation.
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, Twister others may follow, if you have
any ideas...
Anyone intrested in setting up a PVRay style group on the Arc? If there is