While programming the code for the U.S. Brig Niagara, it became painfully obvious that I needed to automate the creation of the ship's running rigging. Just as painfully obvious, my own math skills were not up to programming the catenary formed by hanging rope. I decided to modify the LINK.INC file originally created by Chris Colefax. By automating the process, I was able to create various common rigging configurations found on sailing ships.
To create the rigging requires two new include files. The first: Block_Hardware.inc, contains macros used to create the wooden blocks used in the rigging and is called by the second include file. The second: Rigging.inc, assembles and positions the rigging defined by the user.
In addition to the .inc files supplied with the Rigging_inc zip file, the following standard .inc files must be included prior to the Rigging.inc file:
#include "colors.inc"
#include "woods.inc"
#include "rand.inc"
#include "transforms.inc"
To create the rigging, first declare the variables and then include the Rigging.inc file as follows:
#declare RigConfig = 0;
#declare Point1 = <-00,1500,0,3.0>;
#declare Point2 = <00,000,0,2.0>;
#declare Point3 = <-00,0,-400,1.0>;
#declare Point4 = <-00,1200,-400,0.0>;
#declare R = 10;
#declare R1 = 12.5;
#declare R2 = 25;
#declare R3 = 20;
#declare R4 = 50;
#declare RS1 = 50;
#declare RS2 = 50;
#declare L1 = 300;
#declare L2 = 300;
#declare StartAngle1 = -90;
#declare EndAngle1 = 60;
#declare StartAngle2 = -90;
#declare EndAngle2 = 90;
#declare BlockRotate1 = 0;
#declare BlockRotate2 = 0;
#declare link_looseness =0.1;
#include "Rigging.inc"
All of the variables have default values if not declared by the user.
RigConfig: RigConfig determines the configuration of the rigging. The configuration ranges from a simple rope hung between two points to a complex system of blocks (pulleys). Some of the rigging configurations were designed to be combined with others to create more complex rigging systems. The basic rigging configurations are as follows:
|
RigConfig = 0; The rigging created consists of a single block attached to Point1. A rope beginning at Point2 and ending at Point3 is threaded through the block. Note that Point4 is ignored. StartAngle1, EndAngle1 and BlockRotate1 are taken into effect,but StartAngle2, EndAngle2 and BlockRotate2 are ignored. |
|
RigConfig = 1; The rigging created consists of two blocks connected together. The first block is a single block attached to Point1. The second block is a single block connected to Point2. A rope is connected to the bottom of the first block, threads through the second block and terminates at Point3. Note that Point4 is ignored. |
|
RigConfig = 2; The rigging created consists of two single blocks connected together. The first block is attached to Point1. The second block is connected to Point3. A rope starting at Point2 is threaded through both blocks in turn and terminates at Point4. |
|
RigConfig = 3; The rigging created consists of three single blocks connected together. The first block is attached to Point1. The second block and third blocks are connected in series to Point2. A rope attached to the bottom of the first block is threaded through the second and first blocks in turn and terminates at Point3. The third block does not have a rope threaded through it, but the points can be retrieved to add one.
|
|
RigConfig = 4; The rigging created consists of a single block and a double block connected together. The first is a single block attached to Point1. The second is a double block connected to Point2. A rope attached to the bottom of the single block is threaded through both blocks in turn and terminates at Point3. Note that Point4 is ignored. |
|
RigConfig = 5; The rigging created consists two single blocks connected together. The first block is attached to Point1. The second block is attached to Point2. A rope attached to the top of the second block is threaded through the first block in turn and terminates at Point3. The second block does not have a rope threaded through it, but the points can be retrieved to add one.
|
|
RigConfig = 6; The rigging created consists of a simple rope connected to Point1 and Point2. Note that Point3 and Point4 are ignored. This rigging configuration can be used by its self or combined with other rigging configurations to make more complex arrangements. |
|
RigConfig = 7; The rigging created consists of a single block connected to Point1 and pointing to Point2. Note that Point3 and Point4 are ignored. This rigging configuration can be used by its self or combined with other rigging configurations to make more complex arrangements.
|
|
RigConfig = 8; The rigging created consists of a double block connected to Point1 and pointing to Point2. Note that Point3 and Point4 are ignored. This rigging configuration can be used by its self or combined with other rigging configurations to make more complex arrangements.
|
|
RigConfig = 9; The rigging created consists of a double block connected to Point1 and pointing to Point2. A second double block is connected to Point2 and points to Point1.The loose line is connected from the first double block to Point3. EndAngle1 is used to adjust where the loose line leaves the sheave on the first double block. |
|
RigConfig = 10; The rigging created consists of a double block connected to Point1 and pointing to Point2. A tripple block is connected to Point2 and points to Point1.The loose line is connected from the tripple block to Point3. EndAngle1 is used to adjust where the loose line leaves the sheave on the tripple block. |
Connection Points: Point1, Point2, Point3 and Point4 determine the connection points for the rigging. The points are stored as a color vector. The R,G and B values determine the X,Y and Z values of the vector. The T vector determines how the rope is attached to the point. The T value is parsed by the macro to seperate the integer and decimal values. The Integer portion of the T value determines the type of attachment used while the decimal portion is used to rotate the attachment. For Example:#declare Point1 =<500,600,-50,3.90> would place the connection point at <500,600,-50>. Connection type 3 would be used, with the connection rotated 90 degrees.
The connection types are as follows:
|
Connection Type = 0; The connection is a simple length of rope. |
|
Connection Type = 1; The rope forms a double loop around the attachment point and returns to the block. The loop will be rotated by the decimal portion of the T value as described above. |
|
Connection Type = 2; The rope forms a double loop around the attachment point but does not return completely to the block. The loop will be rotated by the decimal portion of the T value as described above. |
|
Connection Type = 3; The rope forms a single loop around the attachment point but does not return completely to the block. The loop will be rotated by the decimal portion of the T value as described above. |
|
Connection Type = 4; An Iron hook is placed on the end of the rope. Connection type 4 can only be used to connect to Point2. Connection type 4 only applies to rigging configurations 0, 1, 3, 4, 5, 6 and 9. The hook will be rotated by the decimal portion of the T value as described above. |
Dimensional Variables: all of the dimensions of the rope rigging as well as the wooden blocks are controlled by a small group of variables. They are as follows:
|
R; The variable R determines the radius of the rope. R1,R2,R3 & R4; The variable R1, R2, R3 & R4 determine the radius of the loops made in the ends of the ropes with connections types other than connection type 6. |
|
RS1 & RS2; The variables RS1 & RS2 determine the dimensions of the wooden block. Specifically, RS1 & RS2 give the diameter of the curved rope as it is wrapped around the sheave (rotating wheel). All of the block dimensions are taken from R and RS1 & RS2. RS1 applies to the first block and RS2 applies to the second block. |
|
L1; The variable L1 determines determines how long of a rope is used to connect the first block with its attachment point. L1 is ignored with Rigging configuration 6.
L2; The variable L2 determines determines how long of a rope is used to connect the second block with its attachment point. L2 is ignored with Rigging configurations 6, 7 and 8. |
Miscellanious Variables: The following variables do not affect the dimensions or configuration of the rigging. They do however have a real affect on the way the rigging will look.
|
link_looseness; This variable determines how tightly the rope hangs. The higher the value, the tighter the rope. The value used will change as the length of the rope increases. Values too high will cause unacceptable results under some conditions. |
|
StartAngle1 & StartAngle2; The start angle determines where the rope wrapped around the sheave starts. StartAngle should have a value of between -90 and 0 degrees. StartAngle 1 is used for the first single block. StartAngle 2 is used for double blocks or when 2 single blocks are used in the same rigging configuration.
|
|
BlockRotate1 & BlockRotate2; The BlockRotate variables rotate the block. BlockRotate1 rotates the first block. BlockRotate2 rotates the second block if there is one in the rigging configuration. |
|
RopeT; RopeT is the texture applied to the rope. A default texture is used, but can be defined by the user if he wishes a different texture. RopeT is applied to a unit sphere that is scaled to R.
|