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
Updated 13 July 1998: updated for POV-Ray 3.1,
added twist_angle option,
fixed Domain Error caused by some compilers
COPYRIGHT AND LEGAL INFORMATION
INSTALLATION |
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 remaining letters are lowercase. This will enable you to render the sample files without modification.
QUICK START |
#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 POV-Ray 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.
Note that Bend.inc should never be included at the start of a scene (like colors.inc or textures.inc). It should only be included after first declaring the desired bend options.
OPTIONS |
#declare bend_object = object {MyObject scale 3}
#declare bend_object = cylinder {-y, y, .3 pigment {Red}}
Any POV-Ray object can be used, including CSG objects and triangle meshes.
The default for object_axis1 is -y; the default for object_axis2 is +y
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
bend_direction = y
will bend the
object upwards.
The default for bend_direction is x
The default for twist_angle is 0
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
bend_start = .5
will only start bending the
object halfway along its length.
The default for bend_start is 0
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 or twist the middle section of an object, eg. bend_start = .3
and
bend_finish = .6
will only deform the middle 30% of the object.
COPYRIGHT AND LEGAL INFORMATION |
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 to ensure that they are in possession of the latest available version.
Further, no restrictions of any sort are placed on the usage of the include file itself (Bend.inc), and scene files or images created using the include file remain entirely the property of the user or users who have created them. I claim no liability or responsibility for damages or loss resulting from usage of the include file, or any part of the include file package.
CONTACTING THE AUTHOR |
or by regular mail at: