( Buckminster Fullerene Molecule ) ( FORTH script for Real 3D V2 and V3 raytracer ) ( Written by John Talbot, Aug 29 1993 ) ( http://www.achilles.net/~jtalbot ) ( I was planning on making the inner atomic core ) ( opaque and the outer orbital gaseous indicating ) ( electron de-localization but it must be done ) ( manually as I have not learned how do add ) ( textures in RPL ) ( load using Project/Macros/ExecuteNamed command ) "vectors.rpl" LOAD ( R3D2:RPL/Sys/Vectors.rpl ) "objects.rpl" LOAD ( R3D2:RPL/Sys/Objects.rpl ) ( Icosahedron 3D Vertex List ) 0 0 1 VCONSTANT V0 0.894427191 0 0.447213595 VCONSTANT V1 0.276393202 0.850650808 0.447213595 VCONSTANT V2 -0.723606797 0.525731112 0.447213595 VCONSTANT V3 -0.723606797 -0.525731112 0.447213595 VCONSTANT V4 0.276393202 -0.850650808 0.447213595 VCONSTANT V5 0.723606797 0.525731112 -0.447213595 VCONSTANT V6 -0.276393202 0.850650808 -0.447213595 VCONSTANT V7 -0.894427191 0 -0.447213595 VCONSTANT V8 -0.276393202 -0.850650808 -0.447213595 VCONSTANT V9 0.723606797 -0.525731112 -0.447213595 VCONSTANT V10 0 0 -1 VCONSTANT V11 VVARIABLE A ( Temporary variables ) VVARIABLE B VVARIABLE P0 VVARIABLE P1 0.40 FCONSTANT AtomRadius ( Carbon Atom radius ) 0.25 FCONSTANT WireAtomRadius ( Wire frame Atom radius ) ( Create two sets of atoms, one smaller set for ) ( ease of visualization in wireframe mode, and ) ( another set for the raytrace. The wiframe set ) ( is raytrace invisible and the raytrace set is ) ( wireframe invisible. ) : Atom VDUP AtomRadius 0 0 0 AtomRadius 0 0 0 AtomRadius 255 255 255 0 ( RGBA ) "Atom" ( name ) lOF_WFINVISIBL ( flags ) "CEND" C_ELLIPSOID DROP WireAtomRadius 0 0 0 WireAtomRadius 0 0 0 WireAtomRadius 255 255 255 0 ( RGBA ) "WireAtom" ( name ) lOF_RTINVISIBL ( flags ) "CEND" C_ELLIPSOID DROP ; : Pair ( Pair of Atoms and their bond ) B V! A V! B V@ A V@ VSUB 0.33333333333 VMUL A V@ VADD VNORM P0 V! B V@ A V@ VSUB 0.66666666666 VMUL A V@ VADD VNORM P1 V! P0 V@ Atom P1 V@ Atom ; wOT_OR "BuckyBall" 0 "CEND" C_LEVEL O_CURRENT DROP V0 V1 Pair V0 V2 Pair V0 V3 Pair V0 V4 Pair V0 V5 Pair V11 V6 Pair V11 V7 Pair V11 V8 Pair V11 V9 Pair V11 V10 Pair V1 V10 Pair V1 V6 Pair V2 V6 Pair V2 V7 Pair V3 V7 Pair V3 V8 Pair V4 V8 Pair V4 V9 Pair V5 V9 Pair V5 V10 Pair V1 V2 Pair V2 V3 Pair V3 V4 Pair V4 V5 Pair V5 V1 Pair V6 V10 Pair V7 V6 Pair V8 V7 Pair V9 V8 Pair V10 V9 Pair O_GETCURR O_GETPAR O_CURRENT