**************************************************************************
**************************************************************************
         OBJECT BENDER INCLUDE FILE FOR PERSISTENCE OF VISION 3.x
**************************************************************************
**************************************************************************

Created by Chris Colefax, 13 June 1997
Updated 21 July 1997: fixed bend_start bug

1.0  INSTALLATION
2.0  QUICK START
3.0  OPTIONS
        3.1  OBJECT OPTIONS
                3.1.1  bend_object
                3.1.2  object_axis1 & object_axis2
        3.2  BEND OPTIONS
                3.2.1  bend_angle
                3.2.2  bend_direction
                3.2.3  bend_smoothness
                3.2.4  bend_start
                3.2.5  bend_finish

4.0  COPYRIGHT AND LEGAL INFORMATION
5.0  CONTACTING THE AUTHOR

**************************************************************************


1.0  INSTALLATION
**************************************************************************
Copy the Object Bender include file (Bend.inc) to one of the directories
(folders) in your POVRay library path.  Normally this is the INCLUDE
sub-directory of the directory where you installed POVRay, so if you
installed POVRay in C:\POVRAY you should copy the Bend.inc file to
C:\POVRAY\INCLUDE.  On a Windows 95 system, this is probably something 
like:

   C:\Program Files\POV-Ray for Windows\Include

On UNIX and similar systems, where filenames are case-sensitive, you may
have to rename the include file so that it starts with a capital and the
rest of its letters are lowercase.  This will enable you to render the
sample files without modification.


2.0  QUICK START
**************************************************************************
The Object Bender include file lets you bend any POVRay object, from a
simple box to a complex CSG object.  You can specify the direction to
bend the object in, and bend the object by any angle up to 360 degrees.
There are other options which control how the object will be bent;
to use any of these you simply add the following line to your POVRay
scene file:

   #declare [variable-name] = [value]

substituting the desired variable name and value where appropriate.  After
you have declared all the options you want to use, you add the following
line to your POVRay scene file:

   #include "Bend.inc"

The Object Bender include file will then automatically create the bent
object for you.  Although only one option is required to bend an object
(bend_object) you will want to use the options listed below to ensure
you get the result that you want.


3.0  OPTIONS
**************************************************************************

3.1  OBJECT OPTIONS
*******************
The first step when using the Object Bender include file is to specify
a number of parameters that identify the object you wish to bend, as
well as it's position in the POVRay universe.

3.1.1  bend_object
******************
This parameter indicates the object you want to bend, and can be either
a predefined object or a completely new object definition, including
textures and transformations, eg:

   #declare bend_object = object {MyObject scale 3}
   #declare bend_object = cylinder {-y, y, .3 pigment {Red}}

Any POVRay object can be used, including CSG objects and triangle meshes.

3.1.2  object_axis1 & object_axis2
**********************************
The two axis parameters are vectors which indicate the axis of the
bend_object.  The bend axis is like a piece of wire that runs through the
object, starting at object_axis1 and ending at object_axis2.  When the
wire is bent, the object stretches and squashes to follow the shape of
the wire.  When bending the object, object_axis1 remains fixed, while
object_axis2 is moved as the axis is bent.

The default for object_axis1 is -y; the default for object_axis2 is +y


3.2  BENDING OPTIONS
********************

3.2.1  bend_angle
*****************
This is the angle (measured in degrees) that the object will be bent by.
It can range from 0 (no bending) to 360 (the object is bent in a full
circle).  Using bend_angle = 180 will bend the object in a half circle,
and other angles will bend the object by different amounts.  You can also
use negative angles to bend the object backwards.

The default for bend_angle is 45 degrees

3.2.2  bend_direction
*********************
This vector specifies the direction in which to bend the object; if the
bend_object lies along the x-axis, using bend_direction = y will bend the
object upwards.

The default for bend_direction is x

3.2.3  bend_smoothness
**********************
This option controls how smooth the bent object will be; using smaller
numbers will give an angular bend, while using larger numbers will make
the bend much smoother.  The value of bend_smoothness specifies how many
segments the bend_object will be divided into, per full revolution, eg:
if you use bend_smoothness = 50 and bend_angle = 180, the Object Bender
include file will use 25 segments when bending the object.

This option can have a large effect on the speed of parsing and
rendering; if you are doing quick preview you should set bend_smoothness
to 0 (which will use the minimum number of segments).  If the bent
object is not as smooth as you want, you should increase this option.

The default for bend_smoothness is 100

3.2.4  bend_start
*****************
You can use this option to only bend a partial section of the bend_object,
rather than bending the whole object.  The value of this option should lie
between 0 and 1, eg. using bend_start = .5 will only start bending the
object halfway along its length.

The default for bend_start is 0

3.2.5  bend_finish
******************
This option also allows you to partially bend an object, and its value
should lie between 0 and 1, eg. using bend_finish = .7 will stop bending
the object 70% along its length (the rest of the object will continue
straight from this point).

The default for bend_finish is 1

Note that you can use the bend_start and bend_finish options together to
only bend the middle section of an object, eg. bend_start = .3 and
bend_finish = .6 will only bend the middle 30% of the object.


4.0  COPYRIGHT AND LEGAL INFORMATION
**************************************************************************
The Object Bender Include File, including Bend.inc, all documentation, and
associated sample POV files are Copyright 1997 by Chris Colefax.  Full
permission is granted to the user to modify any or all of the files for
his/her own use.  If modified versions are to be distributed the user
should make clear the modifications that have been made by him/herself.
The Object Bender Include File may be bundled with or without other
software on CD-ROM collections, Bulletin Board systems and other file
archives, providing that all associated files, including documentation and
samples, are included.  I would also request that persons intending to
distribute the Object Bender Include File in this manner or otherwise
would first contact me (see below for contact information) to ensure that
they are in possession of the latest version.


5.0  CONTACTING THE AUTHOR
**************************************************************************
If you wish to contact me with bug reports, bug fixes, criticisms, 
comments, suggested improvements, questions, etc. you can reach me by 
email at:

   ccolefax@geocities.com

or by regular mail at:

   Chris Colefax
   PO Box 110
   Kuranda, Queensland
   Australia  4872

**************************************************************************

POV-Ray(tm) and Persistence of Vision(tm) are registered trademarks of the
POV-Ray Team(tm)
