CHAIN v1.0 Description: This program generates a user definable chain as a declared object (indivdual link) or a composite (whole chain). It also generates a scene to display the chain in. While the POV files are being generated, a line drawing of a link is drawn to show what it looks like without having to render one. For PVRay 1.0 (p.k.a. DKB) Ray-Tracing program. Suggested Input: Link Inside Diameter : .25 The measurement of the inside width of a link. The inside hieght is fixed at 0.5 for easy connection of links. A diagram further down in this text shows the measurement. Metal Radius : .0625 The radius of the wire used to make the link. Number of Links : 3 "1" link will create just an object. More links will also create a composite which contains multiple links. --- / ___ \ / / \ \ / / \ \ | | | | | | | | | | LinkID| | | | +-----+ | | | | | | | | | | | | | \ \ / / \ \-----/ / \_______/ Output Files: CHAIN.INC - An include file defining the chain and its texture. To change the attributes of the object across all frames, simply modify this file. CHAIN.POV - A whole scene definition displaying the output CHAIN. This includes a fixed view point, light source, checkered floor, and the placement of the chain. Application Notes: As described earlier, the size of a link is determined by the inside measurements. Thats how a chain really works. It doesn't matter how high or thick the links are, just how big the holes are. That works out great for us so we can change the thickness of the metal without recalculating anything. The inside hieght is fixed at 0.5. Obviously you can scale it silly later. For placements sake we can say that the links origin is at its center and is 1 unit in overall hieght. Therefore, 3 links would be at -1, 0, and 1 in the Y. For more than one link, the origin of the chain is also at its center. In this case, I rotate the odd links 90 degrees (so they fit together) and alternate the colour between links. In the display section the chain is twisted a bit to show a nice profile. Like all of my programs, try whatever values you want and see what comes out. LinkID values under 0.5 are OK. LinkID=0.5 just gives you a torus. LinkIDs over 0.5 look funky. Additional bother: See also SPRING11 (which generates animated spring scenes), SHADE (which generates pleated lamp shades), DIAMOND (which generates a cut gem, plus creates the rest of the .DAT file: view, light, floor), GEAR11 (guess), STAR11 (which generates 3D stars with several attributes), FONT2DAT (which converts Grasp/Pictor/compatible fonts to objects using many options), and SHP2DKB (which should become SHP2PV) which takes AutoCad .SHP font files and generates stroke-type font objects. With all of these programs, just play around with the variables to generate new shapes. For example, generating many long points on the star looks like the spokes of a bicycle wheel. Many short points on a large radius star looks like a circular saw blade. Use your imagination and please post any ideas or neat works (with source) for the world to enjoy. Trial size soap box: Please include source when sending programs or objects. Even if its sloppy, it can only help others. Follow the lead of the people who brought us DKB in the first place. We wouldn't have a POVRay now otherwise! Many thanks to those who do post! I can be reached at YOU CAN CALL ME RAY RBBS (708) 358-5611. "Its my world and you're welcome to it". Ken Koehler (8-10-92) CIS 72740,1161 Enclosed are three files: CHAIN10.BAS Quickbasic source CHAIN10.DOC This file