gears [ -a? | -c radius | -h height | -n number | -r radius | -w width | -H hub_radius | -s spoke_count | -f filename | -N object | -o output_format ]
Currently only POV-Ray include files are supported as output formats.
The final object is centered about the origin and lies in the XY plane, extruded along the Z axis. No textures are provided.
-c radius | Radius of cutout in center of gear; default= 0 (ie. no cutout) |
-h height | Height of gear teeth; default = 0.1 |
-H hub_radius | Radius of central hub (only valid if -c option is used); default = 0.0 (ie no central hub) |
-n number | Number of gear teeth in quadrant 1; default = 9 |
-r radius | Radius of gear (not including teeth); defalut = 1.0 |
-s spoke_count | Number of spokes to use when -c option is used; default = 2 |
-w width | Width of gear (front to back); default = 0.1 |
-a | Append to output file, if it already exists. |
-f filename | Filename to write output to (default: gears.inc). |
-N object | Name of the object (default: coil). |
-o type | Output format type. This can be one of the following:
|
We're creating a scene which requires a spoked gear. We know the gear needs to be 3.5 units across, from the tip of the tooth on the left to the tip of the tooth on the right. There can be any arbitrary number of teeth on the gear for this example and the teeth just need to be visible, but not huge. The spokes are basically crosshairs, ie there are 4 spokes, and the open space between the spokes is not defined. This means the "rim" around the edge of the gear between the teeth and the end of the spokes can be any size for this example. The gear must be relatively fat, lets say 2.5 units from front to back. We'll call this "mygear" and will put it in the file mygear.inc.
Based on this definition we've defined the following parameters:
-h 0.2 | This is an arbitrary value for the teeth height. |
-r 1.35 | This is based on the total diameter of 3.5 minus the height of the teeth on both ends (which totals .4 units). |
-n 10 | This is completely arbirtrary. If you need gears to interlock with each other then the number of teeth should be the same on both gears. |
-s 4 | This is the number of spokes. |
-H 0.3 | Since we're going to use spokes, we should specify an inner hub into which the spokes converge. |
-c 1.1 | This is the radius of a cicular cutout from the center of the gear. The net effect will be a rim between the teeth and the spokes. This value should always be less then the radius specified with the \-r option |
-w 2.5 | This is the width, front to back, of the gear. |
-f mygear.inc | We want it in this include file. |
-N mygear | And finally, we need to call it this. |
In this example we've only left off two options, the -a option (used to append the output to an existing file) and the -o option, which currently isn't necessary since the only format supported is POV-Ray. Specifying any other type will cause gears to tell you the type is invalid.
The command line would then look like this:
gears -h 0.2 -r 1.35 -n 10 -s 4 -H 0.3 -c 1.1 -w 2.5 -f mygear.inc -N mygear
Viola! Your gear is ready for inclusion in your scene file.