/* a program to make decorative disks for two color printers suitable for teaching - could be used with stick on magnets for refrigerator magnets or double stick tape for decorations or drilled with holes for earings or mobiles decorations are projections of molecules PCM */ /* run program with difference to get one color and then repeat with intersection to get the other color. choose one of the available decorative patterns from the 10 possibilities */ difference() // difference or intersection //intersection() // here { /* call disc module disc(diameter,thick) makes a flat disk takes two parameters diameter = diameter of disk in mm thick = thickness of disk in mm */ difference() { disc(40,2.5); // makes a hole for a key chain // through the face of the // disk - else comment out //translate([0,16 ,0]) //cylinder(h=20,r=2,center=true,$fn=24); } /* then choose one decorative file generator from the list below and comment out the other 9 */ //c24_down_z(1,1,6.5,5); //c28_down_z(1,1,6.5,5); //c80_down_x(1,1,4,5); // choose a single //c30_down_z(1,1,7.5,5); // decorative pattern //c50_down_z(1,1,4.75,5); // here //c26_down_z(1,1,7,5); //c32_down_z(1,1,6,5); //decorations are projections on //c36_down_z(1,1,6,5); // a plane of the carbon molecules known as //c60_down_y(1,1,4.5,5); // fullerines or bucky balls c78d_down_x(1,1,4,5); // c30_down_z projects the 30 carbon // atom fullerine onto the xy plane, etc } // required modules follow module disc(diameter,thick) { /* makes a flat disc takes two parameters diameter = diameter of disc in mm thick = thickness of disc in mm */ hthick = thick/2; l1=(diameter - thick)/2.; /* l1 is length of straight portion */ n1 = 5; rotate_extrude (convexity = 10,$fn=100) translate([0,hthick,0]) rotate([0,0,0]) polygon (points = [ [ 0,0 ],[0,-hthick], [ hthick*cos(-18*n1) + l1, hthick*sin(-18*n1)], [ hthick*cos(-17*n1) + l1, hthick*sin(-17*n1)], [ hthick*cos(-16*n1) + l1, hthick*sin(-16*n1)], [ hthick*cos(-15*n1) + l1, hthick*sin(-15*n1)], [ hthick*cos(-14*n1) + l1, hthick*sin(-14*n1)], [ hthick*cos(-13*n1) + l1, hthick*sin(-13*n1)], [ hthick*cos(-12*n1) + l1, hthick*sin(-12*n1)], [ hthick*cos(-11*n1) + l1, hthick*sin(-11*n1)], [ hthick*cos(-10*n1) + l1, hthick*sin(-10*n1)], [ hthick*cos(-9*n1) + l1, hthick*sin(-9*n1)], [ hthick*cos(-8*n1) + l1, hthick*sin(-8*n1)], [ hthick*cos(-7*n1) + l1, hthick*sin(-7*n1)], [ hthick*cos(-6*n1) + l1, hthick*sin(-6*n1)], [ hthick*cos(-5*n1) + l1, hthick*sin(-5*n1)], [ hthick*cos(-4*n1) + l1, hthick*sin(-4*n1)], [ hthick*cos(-3*n1) + l1, hthick*sin(-3*n1)], [ hthick*cos(-2*n1) + l1, hthick*sin(-2*n1)], [ hthick*cos(-1*n1) + l1, hthick*sin(-1*n1)], [ hthick*cos(0*n1) + l1, hthick*sin(0*n1)], [ hthick*cos(1*n1) + l1, hthick*sin(1*n1)], [ hthick*cos(2*n1) + l1, hthick*sin(2*n1)], [ hthick*cos(3*n1) + l1, hthick*sin(3*n1)], [ hthick*cos(4*n1) + l1, hthick*sin(4*n1)], [ hthick*cos(5*n1) + l1, hthick*sin(5*n1)], [ hthick*cos(6*n1) + l1, hthick*sin(6*n1)], [ hthick*cos(7*n1) + l1, hthick*sin(7*n1)], [ hthick*cos(8*n1) + l1, hthick*sin(8*n1)], [ hthick*cos(9*n1) + l1, hthick*sin(9*n1)], [ hthick*cos(10*n1) + l1, hthick*sin(10*n1)], [ hthick*cos(11*n1) + l1, hthick*sin(11*n1)], [ hthick*cos(12*n1) + l1, hthick*sin(12*n1)], [ hthick*cos(13*n1) + l1, hthick*sin(13*n1)], [ hthick*cos(14*n1) + l1, hthick*sin(14*n1)], [ hthick*cos(15*n1) + l1, hthick*sin(15*n1)], [ hthick*cos(16*n1) + l1, hthick*sin(16*n1)], [ hthick*cos(17*n1) + l1, hthick*sin(17*n1)], [ hthick*cos(18*n1) + l1, hthick*sin(18*n1)], [0,hthick],[0,0], ] ); } module c24_down_z(rcircle,dsquare,scale,ht) { /* Creates a 2d projection of a molcule from a set of orthogonal coordinates this is down z axis rcircle = radius of circles dsquare = basic length of square side scale = overall scale factor ht = height of extrude */ echo (" projection down z axis"); module atom(rx,x0,y0,z0) { translate(v=[scale*x0,scale*y0,0]) circle(rcircle,$fn=16); } module bond(x2,y2,z2,x1,y1,z1) { tx =scale*(x2 + x1)/2; ty =scale* (y2 + y1)/2; tz =scale* (z2 + z1)/2; ax =scale*( x2 - x1 ); ay =scale*( y2 - y1); az = scale*(z2 - z1); translate(v=[tx,ty,0]) rotate(a = [0,0, -atan2(ax, ay)]) scale([1,sqrt(ax*ax+ay*ay),1]) square(dsquare,center=true); } linear_extrude(height=ht) union() { atom(.5, -1.657669, -1.599350, 0.371475); // 1 atom(.5, 0.556259, -2.235275, 0.371475); // 2 atom(.5, 2.213928, -0.635880, 0.371475); // 3 atom(.5, 1.657669, 1.599350, 0.371475); // 4 atom(.5, -0.556259, 2.235275, 0.371475); // 5 atom(.5, -2.213928, 0.635880, 0.371475); // 6 atom(.5, -1.657669, 1.599350, -0.371475); // 7 atom(.5, -2.213928, -0.635880, -0.371475); // 8 atom(.5, -0.556259, -2.235275, -0.371475); // 9 atom(.5, 1.657669, -1.599350, -0.371475); // 10 atom(.5, 2.213928, 0.635880, -0.371475); // 11 atom(.5, 0.556259, 2.235275, -0.371475); // 12 atom(.5, -1.019272, -0.972153, 1.637741); // 13 atom(.5, 0.332260, -1.368790, 1.637741); // 14 atom(.5, 1.351547, -0.396622, 1.637741); // 15 atom(.5, 1.019272, 0.972153, 1.637741); // 16 atom(.5, -0.332260, 1.368790, 1.637741); // 17 atom(.5, -1.351547, 0.396622, 1.637741); // 18 atom(.5, -1.019272, 0.972153, -1.637741); // 19 atom(.5, -1.351547, -0.396622, -1.637741); // 20 atom(.5, -0.332260, -1.368790, -1.637741); // 21 atom(.5, 1.019272, -0.972153, -1.637741); // 22 atom(.5, 1.351547, 0.396622, -1.637741); // 23 atom(.5, 0.332260, 1.368790, -1.637741); // 24 bond( -1.657669, -1.599350, 0.371475, -2.213928, -0.635880, -0.371475); // 1 - 8 bond( -1.657669, -1.599350, 0.371475, -0.556259, -2.235275, -0.371475); // 1 - 9 bond( -1.657669, -1.599350, 0.371475, -1.019272, -0.972153, 1.637741); // 1 - 13 bond( 0.556259, -2.235275, 0.371475, -0.556259, -2.235275, -0.371475); // 2 - 9 bond( 0.556259, -2.235275, 0.371475, 1.657669, -1.599350, -0.371475); // 2 - 10 bond( 0.556259, -2.235275, 0.371475, 0.332260, -1.368790, 1.637741); // 2 - 14 bond( 2.213928, -0.635880, 0.371475, 1.657669, -1.599350, -0.371475); // 3 - 10 bond( 2.213928, -0.635880, 0.371475, 2.213928, 0.635880, -0.371475); // 3 - 11 bond( 2.213928, -0.635880, 0.371475, 1.351547, -0.396622, 1.637741); // 3 - 15 bond( 1.657669, 1.599350, 0.371475, 2.213928, 0.635880, -0.371475); // 4 - 11 bond( 1.657669, 1.599350, 0.371475, 0.556259, 2.235275, -0.371475); // 4 - 12 bond( 1.657669, 1.599350, 0.371475, 1.019272, 0.972153, 1.637741); // 4 - 16 bond( -0.556259, 2.235275, 0.371475, -1.657669, 1.599350, -0.371475); // 5 - 7 bond( -0.556259, 2.235275, 0.371475, 0.556259, 2.235275, -0.371475); // 5 - 12 bond( -0.556259, 2.235275, 0.371475, -0.332260, 1.368790, 1.637741); // 5 - 17 bond( -2.213928, 0.635880, 0.371475, -1.657669, 1.599350, -0.371475); // 6 - 7 bond( -2.213928, 0.635880, 0.371475, -2.213928, -0.635880, -0.371475); // 6 - 8 bond( -2.213928, 0.635880, 0.371475, -1.351547, 0.396622, 1.637741); // 6 - 18 bond( -1.657669, 1.599350, -0.371475, -1.019272, 0.972153, -1.637741); // 7 - 19 bond( -2.213928, -0.635880, -0.371475, -1.351547, -0.396622, -1.637741); // 8 - 20 bond( -0.556259, -2.235275, -0.371475, -0.332260, -1.368790, -1.637741); // 9 - 21 bond( 1.657669, -1.599350, -0.371475, 1.019272, -0.972153, -1.637741); // 10 - 22 bond( 2.213928, 0.635880, -0.371475, 1.351547, 0.396622, -1.637741); // 11 - 23 bond( 0.556259, 2.235275, -0.371475, 0.332260, 1.368790, -1.637741); // 12 - 24 bond( -1.019272, -0.972153, 1.637741, 0.332260, -1.368790, 1.637741); // 13 - 14 bond( -1.019272, -0.972153, 1.637741, -1.351547, 0.396622, 1.637741); // 13 - 18 bond( 0.332260, -1.368790, 1.637741, 1.351547, -0.396622, 1.637741); // 14 - 15 bond( 1.351547, -0.396622, 1.637741, 1.019272, 0.972153, 1.637741); // 15 - 16 bond( 1.019272, 0.972153, 1.637741, -0.332260, 1.368790, 1.637741); // 16 - 17 bond( -0.332260, 1.368790, 1.637741, -1.351547, 0.396622, 1.637741); // 17 - 18 bond( -1.019272, 0.972153, -1.637741, -1.351547, -0.396622, -1.637741); // 19 - 20 bond( -1.019272, 0.972153, -1.637741, 0.332260, 1.368790, -1.637741); // 19 - 24 bond( -1.351547, -0.396622, -1.637741, -0.332260, -1.368790, -1.637741); // 20 - 21 bond( -0.332260, -1.368790, -1.637741, 1.019272, -0.972153, -1.637741); // 21 - 22 bond( 1.019272, -0.972153, -1.637741, 1.351547, 0.396622, -1.637741); // 22 - 23 bond( 1.351547, 0.396622, -1.637741, 0.332260, 1.368790, -1.637741); // 23 - 24 } } module c28_down_z(rcircle,dsquare,scale,ht) { /* Creates a 2d projection of a molcule from a set of orthogonal coordinates this is down z axis rcircle = radius of circles dsquare = basic length of square side scale = overall scale factor ht = height of extrude */ echo (" projection down z axis"); module atom(rx,x0,y0,z0) { translate(v=[scale*x0,scale*y0,0]) circle(rcircle,$fn=16); } module bond(x2,y2,z2,x1,y1,z1) { tx =scale*(x2 + x1)/2; ty =scale* (y2 + y1)/2; tz =scale* (z2 + z1)/2; ax =scale*( x2 - x1 ); ay =scale*( y2 - y1); az = scale*(z2 - z1); translate(v=[tx,ty,0]) rotate(a = [0,0, -atan2(ax, ay)]) scale([1,sqrt(ax*ax+ay*ay),1]) square(dsquare,center=true); } linear_extrude(height=ht) union() { atom(.5, -1.470108, -1.470108, -1.470108); // 1 atom(.5, -1.470108, 1.470108, 1.470108); // 2 atom(.5, 1.470108, -1.470108, 1.470108); // 3 atom(.5, 1.470108, 1.470108, -1.470108); // 4 atom(.5, 0.525009, 0.525009, 2.276398); // 5 atom(.5, 0.525009, -0.525009, -2.276398); // 6 atom(.5, -0.525009, 0.525009, -2.276398); // 7 atom(.5, -0.525009, -0.525009, 2.276398); // 8 atom(.5, 2.276398, 0.525009, 0.525009); // 9 atom(.5, -2.276398, 0.525009, -0.525009); // 10 atom(.5, -2.276398, -0.525009, 0.525009); // 11 atom(.5, 2.276398, -0.525009, -0.525009); // 12 atom(.5, 0.525009, 2.276398, 0.525009); // 13 atom(.5, -0.525009, -2.276398, 0.525009); // 14 atom(.5, 0.525009, -2.276398, -0.525009); // 15 atom(.5, -0.525009, 2.276398, -0.525009); // 16 atom(.5, 1.692596, 1.692596, -0.058762); // 17 atom(.5, 1.692596, -1.692596, 0.058762); // 18 atom(.5, -1.692596, 1.692596, 0.058762); // 19 atom(.5, -1.692596, -1.692596, -0.058762); // 20 atom(.5, -0.058762, 1.692596, 1.692596); // 21 atom(.5, 0.058762, 1.692596, -1.692596); // 22 atom(.5, 0.058762, -1.692596, 1.692596); // 23 atom(.5, -0.058762, -1.692596, -1.692596); // 24 atom(.5, 1.692596, -0.058762, 1.692596); // 25 atom(.5, -1.692596, 0.058762, 1.692596); // 26 atom(.5, 1.692596, 0.058762, -1.692596); // 27 atom(.5, -1.692596, -0.058762, -1.692596); // 28 bond( -1.470108, -1.470108, -1.470108, -1.692596, -1.692596, -0.058762); // 1 - 20 bond( -1.470108, -1.470108, -1.470108, -0.058762, -1.692596, -1.692596); // 1 - 24 bond( -1.470108, -1.470108, -1.470108, -1.692596, -0.058762, -1.692596); // 1 - 28 bond( -1.470108, 1.470108, 1.470108, -1.692596, 1.692596, 0.058762); // 2 - 19 bond( -1.470108, 1.470108, 1.470108, -0.058762, 1.692596, 1.692596); // 2 - 21 bond( -1.470108, 1.470108, 1.470108, -1.692596, 0.058762, 1.692596); // 2 - 26 bond( 1.470108, -1.470108, 1.470108, 1.692596, -1.692596, 0.058762); // 3 - 18 bond( 1.470108, -1.470108, 1.470108, 0.058762, -1.692596, 1.692596); // 3 - 23 bond( 1.470108, -1.470108, 1.470108, 1.692596, -0.058762, 1.692596); // 3 - 25 bond( 1.470108, 1.470108, -1.470108, 1.692596, 1.692596, -0.058762); // 4 - 17 bond( 1.470108, 1.470108, -1.470108, 0.058762, 1.692596, -1.692596); // 4 - 22 bond( 1.470108, 1.470108, -1.470108, 1.692596, 0.058762, -1.692596); // 4 - 27 bond( 0.525009, 0.525009, 2.276398, -0.525009, -0.525009, 2.276398); // 5 - 8 bond( 0.525009, 0.525009, 2.276398, -0.058762, 1.692596, 1.692596); // 5 - 21 bond( 0.525009, 0.525009, 2.276398, 1.692596, -0.058762, 1.692596); // 5 - 25 bond( 0.525009, -0.525009, -2.276398, -0.525009, 0.525009, -2.276398); // 6 - 7 bond( 0.525009, -0.525009, -2.276398, -0.058762, -1.692596, -1.692596); // 6 - 24 bond( 0.525009, -0.525009, -2.276398, 1.692596, 0.058762, -1.692596); // 6 - 27 bond( -0.525009, 0.525009, -2.276398, 0.058762, 1.692596, -1.692596); // 7 - 22 bond( -0.525009, 0.525009, -2.276398, -1.692596, -0.058762, -1.692596); // 7 - 28 bond( -0.525009, -0.525009, 2.276398, 0.058762, -1.692596, 1.692596); // 8 - 23 bond( -0.525009, -0.525009, 2.276398, -1.692596, 0.058762, 1.692596); // 8 - 26 bond( 2.276398, 0.525009, 0.525009, 2.276398, -0.525009, -0.525009); // 9 - 12 bond( 2.276398, 0.525009, 0.525009, 1.692596, 1.692596, -0.058762); // 9 - 17 bond( 2.276398, 0.525009, 0.525009, 1.692596, -0.058762, 1.692596); // 9 - 25 bond( -2.276398, 0.525009, -0.525009, -2.276398, -0.525009, 0.525009); // 10 - 11 bond( -2.276398, 0.525009, -0.525009, -1.692596, 1.692596, 0.058762); // 10 - 19 bond( -2.276398, 0.525009, -0.525009, -1.692596, -0.058762, -1.692596); // 10 - 28 bond( -2.276398, -0.525009, 0.525009, -1.692596, -1.692596, -0.058762); // 11 - 20 bond( -2.276398, -0.525009, 0.525009, -1.692596, 0.058762, 1.692596); // 11 - 26 bond( 2.276398, -0.525009, -0.525009, 1.692596, -1.692596, 0.058762); // 12 - 18 bond( 2.276398, -0.525009, -0.525009, 1.692596, 0.058762, -1.692596); // 12 - 27 bond( 0.525009, 2.276398, 0.525009, -0.525009, 2.276398, -0.525009); // 13 - 16 bond( 0.525009, 2.276398, 0.525009, 1.692596, 1.692596, -0.058762); // 13 - 17 bond( 0.525009, 2.276398, 0.525009, -0.058762, 1.692596, 1.692596); // 13 - 21 bond( -0.525009, -2.276398, 0.525009, 0.525009, -2.276398, -0.525009); // 14 - 15 bond( -0.525009, -2.276398, 0.525009, -1.692596, -1.692596, -0.058762); // 14 - 20 bond( -0.525009, -2.276398, 0.525009, 0.058762, -1.692596, 1.692596); // 14 - 23 bond( 0.525009, -2.276398, -0.525009, 1.692596, -1.692596, 0.058762); // 15 - 18 bond( 0.525009, -2.276398, -0.525009, -0.058762, -1.692596, -1.692596); // 15 - 24 bond( -0.525009, 2.276398, -0.525009, -1.692596, 1.692596, 0.058762); // 16 - 19 bond( -0.525009, 2.276398, -0.525009, 0.058762, 1.692596, -1.692596); // 16 - 22 } } module c30_down_z(rcircle,dsquare,scale,ht) { /* Creates a 2d projection of a molcule from a set of orthogonal coordinates this is down z axis rcircle = radius of circles dsquare = basic length of square side scale = overall scale factor ht = height of extrude */ echo (" projection down z axis"); module atom(rx,x0,y0,z0) { translate(v=[scale*x0,scale*y0,0]) circle(rcircle,$fn=16); } module bond(x2,y2,z2,x1,y1,z1) { tx =scale*(x2 + x1)/2; ty =scale* (y2 + y1)/2; tz =scale* (z2 + z1)/2; ax =scale*( x2 - x1 ); ay =scale*( y2 - y1); az = scale*(z2 - z1); translate(v=[tx,ty,0]) rotate(a = [0,0, -atan2(ax, ay)]) scale([1,sqrt(ax*ax+ay*ay),1]) square(dsquare,center=true); } linear_extrude(height=ht) union() { atom(.5, -2.017624, 0.000000, 0.712753); // 1 atom(.5, -0.585114, -1.971680, 0.712753); // 2 atom(.5, 1.732742, -1.218567, 0.712753); // 3 atom(.5, 1.732758, 1.218567, 0.712753); // 4 atom(.5, -0.585098, 1.971680, 0.712753); // 5 atom(.5, -2.017624, 0.000000, -0.712753); // 6 atom(.5, -0.585098, -1.971680, -0.712753); // 7 atom(.5, 1.732758, -1.218567, -0.712753); // 8 atom(.5, 1.732742, 1.218567, -0.712753); // 9 atom(.5, -0.585114, 1.971680, -0.712753); // 10 atom(.5, 2.017624, 0.000000, 1.424500); // 11 atom(.5, 0.661835, 1.866104, 1.424500); // 12 atom(.5, -1.531860, 1.153305, 1.424500); // 13 atom(.5, -1.531860, -1.153305, 1.424500); // 14 atom(.5, 0.661850, -1.866104, 1.424500); // 15 atom(.5, 2.017624, 0.000000, -1.424500); // 16 atom(.5, 0.661850, 1.866104, -1.424500); // 17 atom(.5, -1.531860, 1.153305, -1.424500); // 18 atom(.5, -1.531860, -1.153305, -1.424500); // 19 atom(.5, 0.661835, -1.866104, -1.424500); // 20 atom(.5, 1.270035, 0.000000, 2.671921); // 21 atom(.5, 0.430832, 1.155075, 2.671921); // 22 atom(.5, -0.927002, 0.713852, 2.671921); // 23 atom(.5, -0.927002, -0.713852, 2.671921); // 24 atom(.5, 0.430817, -1.155075, 2.671921); // 25 atom(.5, 1.270035, 0.000000, -2.671921); // 26 atom(.5, 0.430817, 1.155075, -2.671921); // 27 atom(.5, -0.927002, 0.713852, -2.671921); // 28 atom(.5, -0.927002, -0.713852, -2.671921); // 29 atom(.5, 0.430832, -1.155075, -2.671921); // 30 bond( -2.017624, 0.000000, 0.712753, -2.017624, 0.000000, -0.712753); // 1 - 6 bond( -2.017624, 0.000000, 0.712753, -1.531860, 1.153305, 1.424500); // 1 - 13 bond( -2.017624, 0.000000, 0.712753, -1.531860, -1.153305, 1.424500); // 1 - 14 bond( -0.585114, -1.971680, 0.712753, -0.585098, -1.971680, -0.712753); // 2 - 7 bond( -0.585114, -1.971680, 0.712753, -1.531860, -1.153305, 1.424500); // 2 - 14 bond( -0.585114, -1.971680, 0.712753, 0.661850, -1.866104, 1.424500); // 2 - 15 bond( 1.732742, -1.218567, 0.712753, 1.732758, -1.218567, -0.712753); // 3 - 8 bond( 1.732742, -1.218567, 0.712753, 2.017624, 0.000000, 1.424500); // 3 - 11 bond( 1.732742, -1.218567, 0.712753, 0.661850, -1.866104, 1.424500); // 3 - 15 bond( 1.732758, 1.218567, 0.712753, 1.732742, 1.218567, -0.712753); // 4 - 9 bond( 1.732758, 1.218567, 0.712753, 2.017624, 0.000000, 1.424500); // 4 - 11 bond( 1.732758, 1.218567, 0.712753, 0.661835, 1.866104, 1.424500); // 4 - 12 bond( -0.585098, 1.971680, 0.712753, -0.585114, 1.971680, -0.712753); // 5 - 10 bond( -0.585098, 1.971680, 0.712753, 0.661835, 1.866104, 1.424500); // 5 - 12 bond( -0.585098, 1.971680, 0.712753, -1.531860, 1.153305, 1.424500); // 5 - 13 bond( -2.017624, 0.000000, -0.712753, -1.531860, 1.153305, -1.424500); // 6 - 18 bond( -2.017624, 0.000000, -0.712753, -1.531860, -1.153305, -1.424500); // 6 - 19 bond( -0.585098, -1.971680, -0.712753, -1.531860, -1.153305, -1.424500); // 7 - 19 bond( -0.585098, -1.971680, -0.712753, 0.661835, -1.866104, -1.424500); // 7 - 20 bond( 1.732758, -1.218567, -0.712753, 2.017624, 0.000000, -1.424500); // 8 - 16 bond( 1.732758, -1.218567, -0.712753, 0.661835, -1.866104, -1.424500); // 8 - 20 bond( 1.732742, 1.218567, -0.712753, 2.017624, 0.000000, -1.424500); // 9 - 16 bond( 1.732742, 1.218567, -0.712753, 0.661850, 1.866104, -1.424500); // 9 - 17 bond( -0.585114, 1.971680, -0.712753, 0.661850, 1.866104, -1.424500); // 10 - 17 bond( -0.585114, 1.971680, -0.712753, -1.531860, 1.153305, -1.424500); // 10 - 18 bond( 2.017624, 0.000000, 1.424500, 1.270035, 0.000000, 2.671921); // 11 - 21 bond( 0.661835, 1.866104, 1.424500, 0.430832, 1.155075, 2.671921); // 12 - 22 bond( -1.531860, 1.153305, 1.424500, -0.927002, 0.713852, 2.671921); // 13 - 23 bond( -1.531860, -1.153305, 1.424500, -0.927002, -0.713852, 2.671921); // 14 - 24 bond( 0.661850, -1.866104, 1.424500, 0.430817, -1.155075, 2.671921); // 15 - 25 bond( 2.017624, 0.000000, -1.424500, 1.270035, 0.000000, -2.671921); // 16 - 26 bond( 0.661850, 1.866104, -1.424500, 0.430817, 1.155075, -2.671921); // 17 - 27 bond( -1.531860, 1.153305, -1.424500, -0.927002, 0.713852, -2.671921); // 18 - 28 bond( -1.531860, -1.153305, -1.424500, -0.927002, -0.713852, -2.671921); // 19 - 29 bond( 0.661835, -1.866104, -1.424500, 0.430832, -1.155075, -2.671921); // 20 - 30 bond( 1.270035, 0.000000, 2.671921, 0.430832, 1.155075, 2.671921); // 21 - 22 bond( 1.270035, 0.000000, 2.671921, 0.430817, -1.155075, 2.671921); // 21 - 25 bond( 0.430832, 1.155075, 2.671921, -0.927002, 0.713852, 2.671921); // 22 - 23 bond( -0.927002, 0.713852, 2.671921, -0.927002, -0.713852, 2.671921); // 23 - 24 bond( -0.927002, -0.713852, 2.671921, 0.430817, -1.155075, 2.671921); // 24 - 25 bond( 1.270035, 0.000000, -2.671921, 0.430817, 1.155075, -2.671921); // 26 - 27 bond( 1.270035, 0.000000, -2.671921, 0.430832, -1.155075, -2.671921); // 26 - 30 bond( 0.430817, 1.155075, -2.671921, -0.927002, 0.713852, -2.671921); // 27 - 28 bond( -0.927002, 0.713852, -2.671921, -0.927002, -0.713852, -2.671921); // 28 - 29 bond( -0.927002, -0.713852, -2.671921, 0.430832, -1.155075, -2.671921); // 29 - 30 } } module c80_down_x(rcircle,dsquare,scale,ht) { /* Creates a 2d projection of a molcule from a set of orthogonal coordinates this is down x axis rcircle = radius of circles dsquare = basic length of square side scale = overall scale factor */ echo (" projection down x axis"); module atom(rx,z0,y0,x0) { translate(v=[scale*x0,scale*y0,0]) circle(rcircle,$fn=16); } module bond(z2,y2,x2,z1,y1,x1) { tx =scale*(x2 + x1)/2; ty =scale* (y2 + y1)/2; tz =scale* (z2 + z1)/2; ax =scale*( x2 - x1 ); ay =scale*( y2 - y1); az = scale*(z2 - z1); translate(v=[tx,ty,0]) rotate(a = [0,0, -atan2(ax, ay)]) scale([1,sqrt(ax*ax+ay*ay),1]) square(dsquare,center=true); } linear_extrude(height=ht) union() { atom(.5, 2.379500, -2.035004, 2.690826); // 1 atom(.5, 3.096390, -2.269333, 1.463257); // 2 atom(.5, 2.376511, -3.262863, 0.706100); // 3 atom(.5, 1.208771, -3.646896, 1.468979); // 4 atom(.5, 1.213333, -2.883118, 2.697876); // 5 atom(.5, 3.080856, 0.334351, 2.615128); // 6 atom(.5, 3.770508, 0.109436, 1.433929); // 7 atom(.5, 3.751221, -1.159042, 0.776505); // 8 atom(.5, 2.306793, -0.686813, 3.246826); // 9 atom(.5, 3.089661, -2.150665, -1.380783); // 10 atom(.5, 2.331100, -3.175720, -0.747253); // 11 atom(.5, 3.769211, -1.179200, -0.651932); // 12 atom(.5, -0.043152, -4.037613, -0.647568); // 13 atom(.5, -0.039093, -3.982758, 0.804169); // 14 atom(.5, 1.123215, -3.653549, -1.410095); // 15 atom(.5, -1.276321, -2.873306, 2.700912); // 16 atom(.5, -0.029404, -2.402954, 3.287949); // 17 atom(.5, -1.281600, -3.636017, 1.473907); // 18 atom(.5, -0.025208, -1.121109, 3.913452); // 19 atom(.5, 1.096573, -0.305847, 3.903580); // 20 atom(.5, -3.171478, -2.254684, 1.481506); // 21 atom(.5, -2.440445, -2.022598, 2.705200); // 22 atom(.5, -2.452850, -3.250763, 0.717804); // 23 atom(.5, -0.715225, 1.015167, 3.920532); // 24 atom(.5, 0.669220, 1.011810, 3.900375); // 25 atom(.5, -1.146515, -0.302948, 3.919708); // 26 atom(.5, 3.124100, -0.210175, -2.595398); // 27 atom(.5, 2.677139, -1.574020, -2.595245); // 28 atom(.5, 3.789398, 0.006851, -1.378418); // 29 atom(.5, -0.771454, -3.040924, -2.635223); // 30 atom(.5, -1.214752, -3.654694, -1.403870); // 31 atom(.5, 0.672562, -3.044571, -2.638657); // 32 atom(.5, 0.680908, -0.924881, -3.942749); // 33 atom(.5, -0.765991, -0.921265, -3.941620); // 34 atom(.5, -1.516495, -1.949005, -3.237930); // 35 atom(.5, 1.422806, -1.953934, -3.234360); // 36 atom(.5, -3.225830, -2.187119, -1.396027); // 37 atom(.5, -3.943405, -1.190552, -0.631546); // 38 atom(.5, -3.883102, -1.174194, 0.820053); // 39 atom(.5, -2.421585, -3.200409, -0.733978); // 40 atom(.5, -3.205597, 0.347580, 2.715073); // 41 atom(.5, -2.753708, 1.718445, 2.715973); // 42 atom(.5, -1.461243, 2.056152, 3.296295); // 43 atom(.5, -2.369034, -0.694138, 3.297836); // 44 atom(.5, 3.101746, 2.385605, -1.408325); // 45 atom(.5, 2.386169, 2.165405, -2.644028); // 46 atom(.5, 2.340866, 0.839905, -3.236084); // 47 atom(.5, 3.758118, 1.273468, -0.722519); // 48 atom(.5, 0.695908, 3.122421, 2.644028); // 49 atom(.5, -0.712692, 3.156265, 2.689133); // 50 atom(.5, 3.083755, 2.245026, 1.436844); // 51 atom(.5, 3.771851, 1.289642, 0.705704); // 52 atom(.5, 2.653549, 1.651611, 2.612213); // 53 atom(.5, -3.216263, -0.195053, -2.616500); // 54 atom(.5, -3.932739, 0.039642, -1.388260); // 55 atom(.5, -2.779663, -1.571716, -2.626831); // 56 atom(.5, -3.831085, 1.330872, -0.722473); // 57 atom(.5, -3.063980, 2.352859, -1.355820); // 58 atom(.5, -0.036148, 1.299240, -3.934830); // 59 atom(.5, -1.204391, 0.455017, -3.931305); // 60 atom(.5, 1.132629, 0.449234, -3.942581); // 61 atom(.5, -2.391174, 0.859070, -3.190277); // 62 atom(.5, -2.375229, 2.127075, -2.538040); // 63 atom(.5, 1.222687, 3.769638, -1.406509); // 64 atom(.5, 1.217484, 3.015640, -2.635971); // 65 atom(.5, 2.384384, 3.379318, -0.645737); // 66 atom(.5, -0.045288, 2.557632, -3.200363); // 67 atom(.5, -1.251755, 2.939819, -2.542282); // 68 atom(.5, -3.926025, 1.346588, 0.730728); // 69 atom(.5, -3.199249, 2.335587, 1.488724); // 70 atom(.5, -3.936447, 0.115433, 1.489349); // 71 atom(.5, -2.371780, 3.316895, 0.798370); // 72 atom(.5, -2.365570, 3.303986, -0.627655); // 73 atom(.5, 1.128922, 3.720093, 1.463150); // 74 atom(.5, 2.318222, 3.276230, 0.811157); // 75 atom(.5, 1.414154, 2.029800, 3.221008); // 76 atom(.5, -0.002914, 4.135971, 0.728700); // 77 atom(.5, -1.171997, 3.782959, 1.482100); // 78 atom(.5, -0.030655, 4.069351, -0.731094); // 79 atom(.5, -1.245056, 3.665619, -1.360474); // 80 bond( 2.379500, -2.035004, 2.690826, 3.096390, -2.269333, 1.463257); // 1 - 2 bond( 2.379500, -2.035004, 2.690826, 1.213333, -2.883118, 2.697876); // 1 - 5 bond( 2.379500, -2.035004, 2.690826, 2.306793, -0.686813, 3.246826); // 1 - 9 bond( 3.096390, -2.269333, 1.463257, 2.376511, -3.262863, 0.706100); // 2 - 3 bond( 3.096390, -2.269333, 1.463257, 3.751221, -1.159042, 0.776505); // 2 - 8 bond( 2.376511, -3.262863, 0.706100, 1.208771, -3.646896, 1.468979); // 3 - 4 bond( 2.376511, -3.262863, 0.706100, 2.331100, -3.175720, -0.747253); // 3 - 11 bond( 1.208771, -3.646896, 1.468979, 1.213333, -2.883118, 2.697876); // 4 - 5 bond( 1.208771, -3.646896, 1.468979, -0.039093, -3.982758, 0.804169); // 4 - 14 bond( 1.213333, -2.883118, 2.697876, -0.029404, -2.402954, 3.287949); // 5 - 17 bond( 3.080856, 0.334351, 2.615128, 3.770508, 0.109436, 1.433929); // 6 - 7 bond( 3.080856, 0.334351, 2.615128, 2.306793, -0.686813, 3.246826); // 6 - 9 bond( 3.080856, 0.334351, 2.615128, 2.653549, 1.651611, 2.612213); // 6 - 53 bond( 3.770508, 0.109436, 1.433929, 3.751221, -1.159042, 0.776505); // 7 - 8 bond( 3.770508, 0.109436, 1.433929, 3.771851, 1.289642, 0.705704); // 7 - 52 bond( 3.751221, -1.159042, 0.776505, 3.769211, -1.179200, -0.651932); // 8 - 12 bond( 2.306793, -0.686813, 3.246826, 1.096573, -0.305847, 3.903580); // 9 - 20 bond( 3.089661, -2.150665, -1.380783, 2.331100, -3.175720, -0.747253); // 10 - 11 bond( 3.089661, -2.150665, -1.380783, 3.769211, -1.179200, -0.651932); // 10 - 12 bond( 3.089661, -2.150665, -1.380783, 2.677139, -1.574020, -2.595245); // 10 - 28 bond( 2.331100, -3.175720, -0.747253, 1.123215, -3.653549, -1.410095); // 11 - 15 bond( 3.769211, -1.179200, -0.651932, 3.789398, 0.006851, -1.378418); // 12 - 29 bond( -0.043152, -4.037613, -0.647568, -0.039093, -3.982758, 0.804169); // 13 - 14 bond( -0.043152, -4.037613, -0.647568, 1.123215, -3.653549, -1.410095); // 13 - 15 bond( -0.043152, -4.037613, -0.647568, -1.214752, -3.654694, -1.403870); // 13 - 31 bond( -0.039093, -3.982758, 0.804169, -1.281600, -3.636017, 1.473907); // 14 - 18 bond( 1.123215, -3.653549, -1.410095, 0.672562, -3.044571, -2.638657); // 15 - 32 bond( -1.276321, -2.873306, 2.700912, -0.029404, -2.402954, 3.287949); // 16 - 17 bond( -1.276321, -2.873306, 2.700912, -1.281600, -3.636017, 1.473907); // 16 - 18 bond( -1.276321, -2.873306, 2.700912, -2.440445, -2.022598, 2.705200); // 16 - 22 bond( -0.029404, -2.402954, 3.287949, -0.025208, -1.121109, 3.913452); // 17 - 19 bond( -1.281600, -3.636017, 1.473907, -2.452850, -3.250763, 0.717804); // 18 - 23 bond( -0.025208, -1.121109, 3.913452, 1.096573, -0.305847, 3.903580); // 19 - 20 bond( -0.025208, -1.121109, 3.913452, -1.146515, -0.302948, 3.919708); // 19 - 26 bond( 1.096573, -0.305847, 3.903580, 0.669220, 1.011810, 3.900375); // 20 - 25 bond( -3.171478, -2.254684, 1.481506, -2.440445, -2.022598, 2.705200); // 21 - 22 bond( -3.171478, -2.254684, 1.481506, -2.452850, -3.250763, 0.717804); // 21 - 23 bond( -3.171478, -2.254684, 1.481506, -3.883102, -1.174194, 0.820053); // 21 - 39 bond( -2.440445, -2.022598, 2.705200, -2.369034, -0.694138, 3.297836); // 22 - 44 bond( -2.452850, -3.250763, 0.717804, -2.421585, -3.200409, -0.733978); // 23 - 40 bond( -0.715225, 1.015167, 3.920532, 0.669220, 1.011810, 3.900375); // 24 - 25 bond( -0.715225, 1.015167, 3.920532, -1.146515, -0.302948, 3.919708); // 24 - 26 bond( -0.715225, 1.015167, 3.920532, -1.461243, 2.056152, 3.296295); // 24 - 43 bond( 0.669220, 1.011810, 3.900375, 1.414154, 2.029800, 3.221008); // 25 - 76 bond( -1.146515, -0.302948, 3.919708, -2.369034, -0.694138, 3.297836); // 26 - 44 bond( 3.124100, -0.210175, -2.595398, 2.677139, -1.574020, -2.595245); // 27 - 28 bond( 3.124100, -0.210175, -2.595398, 3.789398, 0.006851, -1.378418); // 27 - 29 bond( 3.124100, -0.210175, -2.595398, 2.340866, 0.839905, -3.236084); // 27 - 47 bond( 2.677139, -1.574020, -2.595245, 1.422806, -1.953934, -3.234360); // 28 - 36 bond( 3.789398, 0.006851, -1.378418, 3.758118, 1.273468, -0.722519); // 29 - 48 bond( -0.771454, -3.040924, -2.635223, -1.214752, -3.654694, -1.403870); // 30 - 31 bond( -0.771454, -3.040924, -2.635223, 0.672562, -3.044571, -2.638657); // 30 - 32 bond( -0.771454, -3.040924, -2.635223, -1.516495, -1.949005, -3.237930); // 30 - 35 bond( -1.214752, -3.654694, -1.403870, -2.421585, -3.200409, -0.733978); // 31 - 40 bond( 0.672562, -3.044571, -2.638657, 1.422806, -1.953934, -3.234360); // 32 - 36 bond( 0.680908, -0.924881, -3.942749, -0.765991, -0.921265, -3.941620); // 33 - 34 bond( 0.680908, -0.924881, -3.942749, 1.422806, -1.953934, -3.234360); // 33 - 36 bond( 0.680908, -0.924881, -3.942749, 1.132629, 0.449234, -3.942581); // 33 - 61 bond( -0.765991, -0.921265, -3.941620, -1.516495, -1.949005, -3.237930); // 34 - 35 bond( -0.765991, -0.921265, -3.941620, -1.204391, 0.455017, -3.931305); // 34 - 60 bond( -1.516495, -1.949005, -3.237930, -2.779663, -1.571716, -2.626831); // 35 - 56 bond( -3.225830, -2.187119, -1.396027, -3.943405, -1.190552, -0.631546); // 37 - 38 bond( -3.225830, -2.187119, -1.396027, -2.421585, -3.200409, -0.733978); // 37 - 40 bond( -3.225830, -2.187119, -1.396027, -2.779663, -1.571716, -2.626831); // 37 - 56 bond( -3.943405, -1.190552, -0.631546, -3.883102, -1.174194, 0.820053); // 38 - 39 bond( -3.943405, -1.190552, -0.631546, -3.932739, 0.039642, -1.388260); // 38 - 55 bond( -3.883102, -1.174194, 0.820053, -3.936447, 0.115433, 1.489349); // 39 - 71 bond( -3.205597, 0.347580, 2.715073, -2.753708, 1.718445, 2.715973); // 41 - 42 bond( -3.205597, 0.347580, 2.715073, -2.369034, -0.694138, 3.297836); // 41 - 44 bond( -3.205597, 0.347580, 2.715073, -3.936447, 0.115433, 1.489349); // 41 - 71 bond( -2.753708, 1.718445, 2.715973, -1.461243, 2.056152, 3.296295); // 42 - 43 bond( -2.753708, 1.718445, 2.715973, -3.199249, 2.335587, 1.488724); // 42 - 70 bond( -1.461243, 2.056152, 3.296295, -0.712692, 3.156265, 2.689133); // 43 - 50 bond( 3.101746, 2.385605, -1.408325, 2.386169, 2.165405, -2.644028); // 45 - 46 bond( 3.101746, 2.385605, -1.408325, 3.758118, 1.273468, -0.722519); // 45 - 48 bond( 3.101746, 2.385605, -1.408325, 2.384384, 3.379318, -0.645737); // 45 - 66 bond( 2.386169, 2.165405, -2.644028, 2.340866, 0.839905, -3.236084); // 46 - 47 bond( 2.386169, 2.165405, -2.644028, 1.217484, 3.015640, -2.635971); // 46 - 65 bond( 2.340866, 0.839905, -3.236084, 1.132629, 0.449234, -3.942581); // 47 - 61 bond( 3.758118, 1.273468, -0.722519, 3.771851, 1.289642, 0.705704); // 48 - 52 bond( 0.695908, 3.122421, 2.644028, -0.712692, 3.156265, 2.689133); // 49 - 50 bond( 0.695908, 3.122421, 2.644028, 1.128922, 3.720093, 1.463150); // 49 - 74 bond( 0.695908, 3.122421, 2.644028, 1.414154, 2.029800, 3.221008); // 49 - 76 bond( -0.712692, 3.156265, 2.689133, -1.171997, 3.782959, 1.482100); // 50 - 78 bond( 3.083755, 2.245026, 1.436844, 3.771851, 1.289642, 0.705704); // 51 - 52 bond( 3.083755, 2.245026, 1.436844, 2.653549, 1.651611, 2.612213); // 51 - 53 bond( 3.083755, 2.245026, 1.436844, 2.318222, 3.276230, 0.811157); // 51 - 75 bond( 2.653549, 1.651611, 2.612213, 1.414154, 2.029800, 3.221008); // 53 - 76 bond( -3.216263, -0.195053, -2.616500, -3.932739, 0.039642, -1.388260); // 54 - 55 bond( -3.216263, -0.195053, -2.616500, -2.779663, -1.571716, -2.626831); // 54 - 56 bond( -3.216263, -0.195053, -2.616500, -2.391174, 0.859070, -3.190277); // 54 - 62 bond( -3.932739, 0.039642, -1.388260, -3.831085, 1.330872, -0.722473); // 55 - 57 bond( -3.831085, 1.330872, -0.722473, -3.063980, 2.352859, -1.355820); // 57 - 58 bond( -3.831085, 1.330872, -0.722473, -3.926025, 1.346588, 0.730728); // 57 - 69 bond( -3.063980, 2.352859, -1.355820, -2.375229, 2.127075, -2.538040); // 58 - 63 bond( -3.063980, 2.352859, -1.355820, -2.365570, 3.303986, -0.627655); // 58 - 73 bond( -0.036148, 1.299240, -3.934830, -1.204391, 0.455017, -3.931305); // 59 - 60 bond( -0.036148, 1.299240, -3.934830, 1.132629, 0.449234, -3.942581); // 59 - 61 bond( -0.036148, 1.299240, -3.934830, -0.045288, 2.557632, -3.200363); // 59 - 67 bond( -1.204391, 0.455017, -3.931305, -2.391174, 0.859070, -3.190277); // 60 - 62 bond( -2.391174, 0.859070, -3.190277, -2.375229, 2.127075, -2.538040); // 62 - 63 bond( -2.375229, 2.127075, -2.538040, -1.251755, 2.939819, -2.542282); // 63 - 68 bond( 1.222687, 3.769638, -1.406509, 1.217484, 3.015640, -2.635971); // 64 - 65 bond( 1.222687, 3.769638, -1.406509, 2.384384, 3.379318, -0.645737); // 64 - 66 bond( 1.222687, 3.769638, -1.406509, -0.030655, 4.069351, -0.731094); // 64 - 79 bond( 1.217484, 3.015640, -2.635971, -0.045288, 2.557632, -3.200363); // 65 - 67 bond( 2.384384, 3.379318, -0.645737, 2.318222, 3.276230, 0.811157); // 66 - 75 bond( -0.045288, 2.557632, -3.200363, -1.251755, 2.939819, -2.542282); // 67 - 68 bond( -1.251755, 2.939819, -2.542282, -1.245056, 3.665619, -1.360474); // 68 - 80 bond( -3.926025, 1.346588, 0.730728, -3.199249, 2.335587, 1.488724); // 69 - 70 bond( -3.926025, 1.346588, 0.730728, -3.936447, 0.115433, 1.489349); // 69 - 71 bond( -3.199249, 2.335587, 1.488724, -2.371780, 3.316895, 0.798370); // 70 - 72 bond( -2.371780, 3.316895, 0.798370, -2.365570, 3.303986, -0.627655); // 72 - 73 bond( -2.371780, 3.316895, 0.798370, -1.171997, 3.782959, 1.482100); // 72 - 78 bond( -2.365570, 3.303986, -0.627655, -1.245056, 3.665619, -1.360474); // 73 - 80 bond( 1.128922, 3.720093, 1.463150, 2.318222, 3.276230, 0.811157); // 74 - 75 bond( 1.128922, 3.720093, 1.463150, -0.002914, 4.135971, 0.728700); // 74 - 77 bond( -0.002914, 4.135971, 0.728700, -1.171997, 3.782959, 1.482100); // 77 - 78 bond( -0.002914, 4.135971, 0.728700, -0.030655, 4.069351, -0.731094); // 77 - 79 bond( -0.030655, 4.069351, -0.731094, -1.245056, 3.665619, -1.360474); // 79 - 80 } } module c50_down_z(rcircle,dsquare,scale,ht) { /* Creates a 2d projection of a molcule from a set of orthogonal coordinates this is down z axis rcircle = radius of circles dsquare = basic length of square side scale = overall scale factor ht = height of extrude */ echo (" projection down z axis"); module atom(rx,x0,y0,z0) { translate(v=[scale*x0,scale*y0,0]) circle(rcircle,$fn=16); } module bond(x2,y2,z2,x1,y1,z1) { tx =scale*(x2 + x1)/2; ty =scale* (y2 + y1)/2; tz =scale* (z2 + z1)/2; ax =scale*( x2 - x1 ); ay =scale*( y2 - y1); az = scale*(z2 - z1); translate(v=[tx,ty,0]) rotate(a = [0,0, -atan2(ax, ay)]) scale([1,sqrt(ax*ax+ay*ay),1]) square(dsquare,center=true); } linear_extrude(height=ht) union() { atom(.5, 1.148453, 0.000000, 2.660248); // 1 atom(.5, 0.284546, 1.189056, 2.660248); // 2 atom(.5, -1.113266, 0.734879, 2.660248); // 3 atom(.5, -1.113266, -0.734879, 2.660248); // 4 atom(.5, 0.284546, -1.189056, 2.660248); // 5 atom(.5, 1.148453, 0.000000, -2.660248); // 6 atom(.5, 0.284546, 1.189056, -2.660248); // 7 atom(.5, -1.113266, 0.734879, -2.660248); // 8 atom(.5, -1.113266, -0.734879, -2.660248); // 9 atom(.5, 0.284546, -1.189056, -2.660248); // 10 atom(.5, 2.339752, 0.000000, 2.002457); // 11 atom(.5, 0.652664, 2.322037, 2.002457); // 12 atom(.5, -2.077057, 1.435089, 2.002457); // 13 atom(.5, -2.077057, -1.435089, 2.002457); // 14 atom(.5, 0.652664, -2.322037, 2.002457); // 15 atom(.5, 2.339752, 0.000000, -2.002457); // 16 atom(.5, 0.652664, 2.322037, -2.002457); // 17 atom(.5, -2.077057, 1.435089, -2.002457); // 18 atom(.5, -2.077057, -1.435089, -2.002457); // 19 atom(.5, 0.652664, -2.322037, -2.002457); // 20 atom(.5, 2.728806, 1.193878, 1.224472); // 21 atom(.5, -0.362534, 3.061005, 1.224472); // 22 atom(.5, -3.093536, 0.697906, 1.224472); // 23 atom(.5, -1.690033, -2.629654, 1.224472); // 24 atom(.5, 1.908371, -2.323135, 1.224472); // 25 atom(.5, 2.728806, 1.193878, -1.224472); // 26 atom(.5, -0.362534, 3.061005, -1.224472); // 27 atom(.5, -3.093536, 0.697906, -1.224472); // 28 atom(.5, -1.690033, -2.629654, -1.224472); // 29 atom(.5, 1.908371, -2.323135, -1.224472); // 30 atom(.5, 2.728806, -1.193878, -1.224472); // 31 atom(.5, 1.908371, 2.323135, -1.224472); // 32 atom(.5, -1.690033, 2.629654, -1.224472); // 33 atom(.5, -3.093536, -0.697906, -1.224472); // 34 atom(.5, -0.362534, -3.061005, -1.224472); // 35 atom(.5, 2.728806, -1.193878, 1.224472); // 36 atom(.5, 1.908371, 2.323135, 1.224472); // 37 atom(.5, -1.690033, 2.629654, 1.224472); // 38 atom(.5, -3.093536, -0.697906, 1.224472); // 39 atom(.5, -0.362534, -3.061005, 1.224472); // 40 atom(.5, 3.237640, 0.738693, 0.000000); // 41 atom(.5, 0.227600, 3.404251, 0.000000); // 42 atom(.5, -3.237640, 1.365234, 0.000000); // 43 atom(.5, -2.369247, -2.560486, 0.000000); // 44 atom(.5, 1.632675, -2.947723, 0.000000); // 45 atom(.5, 3.237640, -0.738693, 0.000000); // 46 atom(.5, 1.632675, 2.947723, 0.000000); // 47 atom(.5, -2.369247, 2.560486, 0.000000); // 48 atom(.5, -3.237640, -1.365234, 0.000000); // 49 atom(.5, 0.227600, -3.404251, 0.000000); // 50 bond( 1.148453, 0.000000, 2.660248, 0.284546, 1.189056, 2.660248); // 1 - 2 bond( 1.148453, 0.000000, 2.660248, 0.284546, -1.189056, 2.660248); // 1 - 5 bond( 1.148453, 0.000000, 2.660248, 2.339752, 0.000000, 2.002457); // 1 - 11 bond( 0.284546, 1.189056, 2.660248, -1.113266, 0.734879, 2.660248); // 2 - 3 bond( 0.284546, 1.189056, 2.660248, 0.652664, 2.322037, 2.002457); // 2 - 12 bond( -1.113266, 0.734879, 2.660248, -1.113266, -0.734879, 2.660248); // 3 - 4 bond( -1.113266, 0.734879, 2.660248, -2.077057, 1.435089, 2.002457); // 3 - 13 bond( -1.113266, -0.734879, 2.660248, 0.284546, -1.189056, 2.660248); // 4 - 5 bond( -1.113266, -0.734879, 2.660248, -2.077057, -1.435089, 2.002457); // 4 - 14 bond( 0.284546, -1.189056, 2.660248, 0.652664, -2.322037, 2.002457); // 5 - 15 bond( 1.148453, 0.000000, -2.660248, 0.284546, 1.189056, -2.660248); // 6 - 7 bond( 1.148453, 0.000000, -2.660248, 0.284546, -1.189056, -2.660248); // 6 - 10 bond( 1.148453, 0.000000, -2.660248, 2.339752, 0.000000, -2.002457); // 6 - 16 bond( 0.284546, 1.189056, -2.660248, -1.113266, 0.734879, -2.660248); // 7 - 8 bond( 0.284546, 1.189056, -2.660248, 0.652664, 2.322037, -2.002457); // 7 - 17 bond( -1.113266, 0.734879, -2.660248, -1.113266, -0.734879, -2.660248); // 8 - 9 bond( -1.113266, 0.734879, -2.660248, -2.077057, 1.435089, -2.002457); // 8 - 18 bond( -1.113266, -0.734879, -2.660248, 0.284546, -1.189056, -2.660248); // 9 - 10 bond( -1.113266, -0.734879, -2.660248, -2.077057, -1.435089, -2.002457); // 9 - 19 bond( 0.284546, -1.189056, -2.660248, 0.652664, -2.322037, -2.002457); // 10 - 20 bond( 2.339752, 0.000000, 2.002457, 2.728806, 1.193878, 1.224472); // 11 - 21 bond( 2.339752, 0.000000, 2.002457, 2.728806, -1.193878, 1.224472); // 11 - 36 bond( 0.652664, 2.322037, 2.002457, -0.362534, 3.061005, 1.224472); // 12 - 22 bond( 0.652664, 2.322037, 2.002457, 1.908371, 2.323135, 1.224472); // 12 - 37 bond( -2.077057, 1.435089, 2.002457, -3.093536, 0.697906, 1.224472); // 13 - 23 bond( -2.077057, 1.435089, 2.002457, -1.690033, 2.629654, 1.224472); // 13 - 38 bond( -2.077057, -1.435089, 2.002457, -1.690033, -2.629654, 1.224472); // 14 - 24 bond( -2.077057, -1.435089, 2.002457, -3.093536, -0.697906, 1.224472); // 14 - 39 bond( 0.652664, -2.322037, 2.002457, 1.908371, -2.323135, 1.224472); // 15 - 25 bond( 0.652664, -2.322037, 2.002457, -0.362534, -3.061005, 1.224472); // 15 - 40 bond( 2.339752, 0.000000, -2.002457, 2.728806, 1.193878, -1.224472); // 16 - 26 bond( 2.339752, 0.000000, -2.002457, 2.728806, -1.193878, -1.224472); // 16 - 31 bond( 0.652664, 2.322037, -2.002457, -0.362534, 3.061005, -1.224472); // 17 - 27 bond( 0.652664, 2.322037, -2.002457, 1.908371, 2.323135, -1.224472); // 17 - 32 bond( -2.077057, 1.435089, -2.002457, -3.093536, 0.697906, -1.224472); // 18 - 28 bond( -2.077057, 1.435089, -2.002457, -1.690033, 2.629654, -1.224472); // 18 - 33 bond( -2.077057, -1.435089, -2.002457, -1.690033, -2.629654, -1.224472); // 19 - 29 bond( -2.077057, -1.435089, -2.002457, -3.093536, -0.697906, -1.224472); // 19 - 34 bond( 0.652664, -2.322037, -2.002457, 1.908371, -2.323135, -1.224472); // 20 - 30 bond( 0.652664, -2.322037, -2.002457, -0.362534, -3.061005, -1.224472); // 20 - 35 bond( 2.728806, 1.193878, 1.224472, 1.908371, 2.323135, 1.224472); // 21 - 37 bond( 2.728806, 1.193878, 1.224472, 3.237640, 0.738693, 0.000000); // 21 - 41 bond( -0.362534, 3.061005, 1.224472, -1.690033, 2.629654, 1.224472); // 22 - 38 bond( -0.362534, 3.061005, 1.224472, 0.227600, 3.404251, 0.000000); // 22 - 42 bond( -3.093536, 0.697906, 1.224472, -3.093536, -0.697906, 1.224472); // 23 - 39 bond( -3.093536, 0.697906, 1.224472, -3.237640, 1.365234, 0.000000); // 23 - 43 bond( -1.690033, -2.629654, 1.224472, -0.362534, -3.061005, 1.224472); // 24 - 40 bond( -1.690033, -2.629654, 1.224472, -2.369247, -2.560486, 0.000000); // 24 - 44 bond( 1.908371, -2.323135, 1.224472, 2.728806, -1.193878, 1.224472); // 25 - 36 bond( 1.908371, -2.323135, 1.224472, 1.632675, -2.947723, 0.000000); // 25 - 45 bond( 2.728806, 1.193878, -1.224472, 1.908371, 2.323135, -1.224472); // 26 - 32 bond( 2.728806, 1.193878, -1.224472, 3.237640, 0.738693, 0.000000); // 26 - 41 bond( -0.362534, 3.061005, -1.224472, -1.690033, 2.629654, -1.224472); // 27 - 33 bond( -0.362534, 3.061005, -1.224472, 0.227600, 3.404251, 0.000000); // 27 - 42 bond( -3.093536, 0.697906, -1.224472, -3.093536, -0.697906, -1.224472); // 28 - 34 bond( -3.093536, 0.697906, -1.224472, -3.237640, 1.365234, 0.000000); // 28 - 43 bond( -1.690033, -2.629654, -1.224472, -0.362534, -3.061005, -1.224472); // 29 - 35 bond( -1.690033, -2.629654, -1.224472, -2.369247, -2.560486, 0.000000); // 29 - 44 bond( 1.908371, -2.323135, -1.224472, 2.728806, -1.193878, -1.224472); // 30 - 31 bond( 1.908371, -2.323135, -1.224472, 1.632675, -2.947723, 0.000000); // 30 - 45 bond( 2.728806, -1.193878, -1.224472, 3.237640, -0.738693, 0.000000); // 31 - 46 bond( 1.908371, 2.323135, -1.224472, 1.632675, 2.947723, 0.000000); // 32 - 47 bond( -1.690033, 2.629654, -1.224472, -2.369247, 2.560486, 0.000000); // 33 - 48 bond( -3.093536, -0.697906, -1.224472, -3.237640, -1.365234, 0.000000); // 34 - 49 bond( -0.362534, -3.061005, -1.224472, 0.227600, -3.404251, 0.000000); // 35 - 50 bond( 2.728806, -1.193878, 1.224472, 3.237640, -0.738693, 0.000000); // 36 - 46 bond( 1.908371, 2.323135, 1.224472, 1.632675, 2.947723, 0.000000); // 37 - 47 bond( -1.690033, 2.629654, 1.224472, -2.369247, 2.560486, 0.000000); // 38 - 48 bond( -3.093536, -0.697906, 1.224472, -3.237640, -1.365234, 0.000000); // 39 - 49 bond( -0.362534, -3.061005, 1.224472, 0.227600, -3.404251, 0.000000); // 40 - 50 bond( 3.237640, 0.738693, 0.000000, 3.237640, -0.738693, 0.000000); // 41 - 46 bond( 0.227600, 3.404251, 0.000000, 1.632675, 2.947723, 0.000000); // 42 - 47 bond( -3.237640, 1.365234, 0.000000, -2.369247, 2.560486, 0.000000); // 43 - 48 bond( -2.369247, -2.560486, 0.000000, -3.237640, -1.365234, 0.000000); // 44 - 49 bond( 1.632675, -2.947723, 0.000000, 0.227600, -3.404251, 0.000000); // 45 - 50 } } module c26_down_z(rcircle,dsquare,scale,ht) { /* Creates a 2d projection of a molcule from a set of orthogonal coordinates this is down z axis rcircle = radius of circles dsquare = basic length of square side scale = overall scale factor ht = height of extrude */ echo (" projection down z axis"); module atom(rx,x0,y0,z0) { translate(v=[scale*x0,scale*y0,0]) circle(rcircle,$fn=16); } module bond(x2,y2,z2,x1,y1,z1) { tx =scale*(x2 + x1)/2; ty =scale* (y2 + y1)/2; tz =scale* (z2 + z1)/2; ax =scale*( x2 - x1 ); ay =scale*( y2 - y1); az = scale*(z2 - z1); translate(v=[tx,ty,0]) rotate(a = [0,0, -atan2(ax, ay)]) scale([1,sqrt(ax*ax+ay*ay),1]) square(dsquare,center=true); } linear_extrude(height=ht) union() { atom(.5, 1.930649, 0.781616, 0.000000); // 1 atom(.5, -1.850586, 1.401459, 0.000000); // 2 atom(.5, -0.496750, -2.183105, 0.000000); // 3 atom(.5, 1.930649, -0.781616, 0.000000); // 4 atom(.5, -0.496750, 2.183105, 0.000000); // 5 atom(.5, -1.850586, -1.401459, 0.000000); // 6 atom(.5, -1.930634, 0.711868, 1.212433); // 7 atom(.5, 0.140457, -1.907623, 1.212433); // 8 atom(.5, 1.373459, 1.195755, 1.212433); // 9 atom(.5, -1.930634, 0.711868, -1.212433); // 10 atom(.5, 0.140457, -1.907623, -1.212433); // 11 atom(.5, 1.373459, 1.195755, -1.212433); // 12 atom(.5, -1.930634, -0.711868, -1.212433); // 13 atom(.5, 1.373459, -1.195755, -1.212433); // 14 atom(.5, 0.140457, 1.907623, -1.212433); // 15 atom(.5, -1.930634, -0.711868, 1.212433); // 16 atom(.5, 1.373459, -1.195755, 1.212433); // 17 atom(.5, 0.140457, 1.907623, 1.212433); // 18 atom(.5, 1.197937, 0.000000, 2.104965); // 19 atom(.5, -0.807312, 1.157745, 2.104965); // 20 atom(.5, -0.807312, -1.157745, 2.104965); // 21 atom(.5, 1.197937, 0.000000, -2.104965); // 22 atom(.5, -0.807312, 1.157745, -2.104965); // 23 atom(.5, -0.807312, -1.157745, -2.104965); // 24 atom(.5, -0.138900, 0.000000, 2.575195); // 25 atom(.5, -0.138900, 0.000000, -2.575195); // 26 bond( 1.930649, 0.781616, 0.000000, 1.930649, -0.781616, 0.000000); // 1 - 4 bond( 1.930649, 0.781616, 0.000000, 1.373459, 1.195755, 1.212433); // 1 - 9 bond( 1.930649, 0.781616, 0.000000, 1.373459, 1.195755, -1.212433); // 1 - 12 bond( -1.850586, 1.401459, 0.000000, -0.496750, 2.183105, 0.000000); // 2 - 5 bond( -1.850586, 1.401459, 0.000000, -1.930634, 0.711868, 1.212433); // 2 - 7 bond( -1.850586, 1.401459, 0.000000, -1.930634, 0.711868, -1.212433); // 2 - 10 bond( -0.496750, -2.183105, 0.000000, -1.850586, -1.401459, 0.000000); // 3 - 6 bond( -0.496750, -2.183105, 0.000000, 0.140457, -1.907623, 1.212433); // 3 - 8 bond( -0.496750, -2.183105, 0.000000, 0.140457, -1.907623, -1.212433); // 3 - 11 bond( 1.930649, -0.781616, 0.000000, 1.373459, -1.195755, -1.212433); // 4 - 14 bond( 1.930649, -0.781616, 0.000000, 1.373459, -1.195755, 1.212433); // 4 - 17 bond( -0.496750, 2.183105, 0.000000, 0.140457, 1.907623, -1.212433); // 5 - 15 bond( -0.496750, 2.183105, 0.000000, 0.140457, 1.907623, 1.212433); // 5 - 18 bond( -1.850586, -1.401459, 0.000000, -1.930634, -0.711868, -1.212433); // 6 - 13 bond( -1.850586, -1.401459, 0.000000, -1.930634, -0.711868, 1.212433); // 6 - 16 bond( -1.930634, 0.711868, 1.212433, -1.930634, -0.711868, 1.212433); // 7 - 16 bond( -1.930634, 0.711868, 1.212433, -0.807312, 1.157745, 2.104965); // 7 - 20 bond( 0.140457, -1.907623, 1.212433, 1.373459, -1.195755, 1.212433); // 8 - 17 bond( 0.140457, -1.907623, 1.212433, -0.807312, -1.157745, 2.104965); // 8 - 21 bond( 1.373459, 1.195755, 1.212433, 0.140457, 1.907623, 1.212433); // 9 - 18 bond( 1.373459, 1.195755, 1.212433, 1.197937, 0.000000, 2.104965); // 9 - 19 bond( -1.930634, 0.711868, -1.212433, -1.930634, -0.711868, -1.212433); // 10 - 13 bond( -1.930634, 0.711868, -1.212433, -0.807312, 1.157745, -2.104965); // 10 - 23 bond( 0.140457, -1.907623, -1.212433, 1.373459, -1.195755, -1.212433); // 11 - 14 bond( 0.140457, -1.907623, -1.212433, -0.807312, -1.157745, -2.104965); // 11 - 24 bond( 1.373459, 1.195755, -1.212433, 0.140457, 1.907623, -1.212433); // 12 - 15 bond( 1.373459, 1.195755, -1.212433, 1.197937, 0.000000, -2.104965); // 12 - 22 bond( -1.930634, -0.711868, -1.212433, -0.807312, -1.157745, -2.104965); // 13 - 24 bond( 1.373459, -1.195755, -1.212433, 1.197937, 0.000000, -2.104965); // 14 - 22 bond( 0.140457, 1.907623, -1.212433, -0.807312, 1.157745, -2.104965); // 15 - 23 bond( -1.930634, -0.711868, 1.212433, -0.807312, -1.157745, 2.104965); // 16 - 21 bond( 1.373459, -1.195755, 1.212433, 1.197937, 0.000000, 2.104965); // 17 - 19 bond( 0.140457, 1.907623, 1.212433, -0.807312, 1.157745, 2.104965); // 18 - 20 bond( 1.197937, 0.000000, 2.104965, -0.138900, 0.000000, 2.575195); // 19 - 25 bond( -0.807312, 1.157745, 2.104965, -0.138900, 0.000000, 2.575195); // 20 - 25 bond( -0.807312, -1.157745, 2.104965, -0.138900, 0.000000, 2.575195); // 21 - 25 bond( 1.197937, 0.000000, -2.104965, -0.138900, 0.000000, -2.575195); // 22 - 26 bond( -0.807312, 1.157745, -2.104965, -0.138900, 0.000000, -2.575195); // 23 - 26 bond( -0.807312, -1.157745, -2.104965, -0.138900, 0.000000, -2.575195); // 24 - 26 } } module c32_down_z(rcircle,dsquare,scale,ht) { /* Creates a 2d projection of a molcule from a set of orthogonal coordinates this is down z axis rcircle = radius of circles dsquare = basic length of square side scale = overall scale factor ht = height of extrude */ echo (" projection down z axis"); module atom(rx,x0,y0,z0) { translate(v=[scale*x0,scale*y0,0]) circle(rcircle,$fn=16); } module bond(x2,y2,z2,x1,y1,z1) { tx =scale*(x2 + x1)/2; ty =scale* (y2 + y1)/2; tz =scale* (z2 + z1)/2; ax =scale*( x2 - x1 ); ay =scale*( y2 - y1); az = scale*(z2 - z1); translate(v=[tx,ty,0]) rotate(a = [0,0, -atan2(ax, ay)]) scale([1,sqrt(ax*ax+ay*ay),1]) square(dsquare,center=true); } linear_extrude(height=ht) union() { atom(.5, 0.033005, 0.000000, 2.795197); // 1 atom(.5, 0.033005, 0.000000, -2.795197); // 2 atom(.5, 1.354370, 0.328934, 2.345688); // 3 atom(.5, -0.912567, 0.979874, 2.345688); // 4 atom(.5, -0.342804, -1.308807, 2.345688); // 5 atom(.5, 1.354370, -0.328934, -2.345688); // 6 atom(.5, -0.342804, 1.308807, -2.345688); // 7 atom(.5, -0.912567, -0.979874, -2.345688); // 8 atom(.5, -1.968536, 0.260406, 1.681396); // 9 atom(.5, 0.808228, -1.863586, 1.681396); // 10 atom(.5, 1.259293, 1.603165, 1.681396); // 11 atom(.5, -1.968536, -0.260406, -1.681396); // 12 atom(.5, 1.259293, -1.603165, -1.681396); // 13 atom(.5, 0.808228, 1.863586, -1.681396); // 14 atom(.5, -1.544357, -1.208435, 1.643250); // 15 atom(.5, 1.868195, -0.761780, 1.643250); // 16 atom(.5, -0.224838, 1.970245, 1.643250); // 17 atom(.5, -1.544357, 1.208435, -1.643250); // 18 atom(.5, -0.224838, -1.970245, -1.643250); // 19 atom(.5, 1.868195, 0.761780, -1.643250); // 20 atom(.5, 1.758911, 1.756104, 0.438232); // 21 atom(.5, -2.350784, 0.616653, 0.438232); // 22 atom(.5, 0.690842, -2.372757, 0.438232); // 23 atom(.5, 1.758911, -1.756104, -0.438232); // 24 atom(.5, 0.690842, 2.372757, -0.438232); // 25 atom(.5, -2.350784, -0.616653, -0.438232); // 26 atom(.5, 2.350784, -0.645828, 0.314133); // 27 atom(.5, -0.566574, 2.330185, 0.314133); // 28 atom(.5, -1.685211, -1.684341, 0.314133); // 29 atom(.5, 2.350784, 0.645828, -0.314133); // 30 atom(.5, -1.685211, 1.684341, -0.314133); // 31 atom(.5, -0.566574, -2.330185, -0.314133); // 32 bond( 0.033005, 0.000000, 2.795197, 1.354370, 0.328934, 2.345688); // 1 - 3 bond( 0.033005, 0.000000, 2.795197, -0.912567, 0.979874, 2.345688); // 1 - 4 bond( 0.033005, 0.000000, 2.795197, -0.342804, -1.308807, 2.345688); // 1 - 5 bond( 0.033005, 0.000000, -2.795197, 1.354370, -0.328934, -2.345688); // 2 - 6 bond( 0.033005, 0.000000, -2.795197, -0.342804, 1.308807, -2.345688); // 2 - 7 bond( 0.033005, 0.000000, -2.795197, -0.912567, -0.979874, -2.345688); // 2 - 8 bond( 1.354370, 0.328934, 2.345688, 1.259293, 1.603165, 1.681396); // 3 - 11 bond( 1.354370, 0.328934, 2.345688, 1.868195, -0.761780, 1.643250); // 3 - 16 bond( -0.912567, 0.979874, 2.345688, -1.968536, 0.260406, 1.681396); // 4 - 9 bond( -0.912567, 0.979874, 2.345688, -0.224838, 1.970245, 1.643250); // 4 - 17 bond( -0.342804, -1.308807, 2.345688, 0.808228, -1.863586, 1.681396); // 5 - 10 bond( -0.342804, -1.308807, 2.345688, -1.544357, -1.208435, 1.643250); // 5 - 15 bond( 1.354370, -0.328934, -2.345688, 1.259293, -1.603165, -1.681396); // 6 - 13 bond( 1.354370, -0.328934, -2.345688, 1.868195, 0.761780, -1.643250); // 6 - 20 bond( -0.342804, 1.308807, -2.345688, 0.808228, 1.863586, -1.681396); // 7 - 14 bond( -0.342804, 1.308807, -2.345688, -1.544357, 1.208435, -1.643250); // 7 - 18 bond( -0.912567, -0.979874, -2.345688, -1.968536, -0.260406, -1.681396); // 8 - 12 bond( -0.912567, -0.979874, -2.345688, -0.224838, -1.970245, -1.643250); // 8 - 19 bond( -1.968536, 0.260406, 1.681396, -1.544357, -1.208435, 1.643250); // 9 - 15 bond( -1.968536, 0.260406, 1.681396, -2.350784, 0.616653, 0.438232); // 9 - 22 bond( 0.808228, -1.863586, 1.681396, 1.868195, -0.761780, 1.643250); // 10 - 16 bond( 0.808228, -1.863586, 1.681396, 0.690842, -2.372757, 0.438232); // 10 - 23 bond( 1.259293, 1.603165, 1.681396, -0.224838, 1.970245, 1.643250); // 11 - 17 bond( 1.259293, 1.603165, 1.681396, 1.758911, 1.756104, 0.438232); // 11 - 21 bond( -1.968536, -0.260406, -1.681396, -1.544357, 1.208435, -1.643250); // 12 - 18 bond( -1.968536, -0.260406, -1.681396, -2.350784, -0.616653, -0.438232); // 12 - 26 bond( 1.259293, -1.603165, -1.681396, -0.224838, -1.970245, -1.643250); // 13 - 19 bond( 1.259293, -1.603165, -1.681396, 1.758911, -1.756104, -0.438232); // 13 - 24 bond( 0.808228, 1.863586, -1.681396, 1.868195, 0.761780, -1.643250); // 14 - 20 bond( 0.808228, 1.863586, -1.681396, 0.690842, 2.372757, -0.438232); // 14 - 25 bond( -1.544357, -1.208435, 1.643250, -1.685211, -1.684341, 0.314133); // 15 - 29 bond( 1.868195, -0.761780, 1.643250, 2.350784, -0.645828, 0.314133); // 16 - 27 bond( -0.224838, 1.970245, 1.643250, -0.566574, 2.330185, 0.314133); // 17 - 28 bond( -1.544357, 1.208435, -1.643250, -1.685211, 1.684341, -0.314133); // 18 - 31 bond( -0.224838, -1.970245, -1.643250, -0.566574, -2.330185, -0.314133); // 19 - 32 bond( 1.868195, 0.761780, -1.643250, 2.350784, 0.645828, -0.314133); // 20 - 30 bond( 1.758911, 1.756104, 0.438232, 0.690842, 2.372757, -0.438232); // 21 - 25 bond( 1.758911, 1.756104, 0.438232, 2.350784, 0.645828, -0.314133); // 21 - 30 bond( -2.350784, 0.616653, 0.438232, -2.350784, -0.616653, -0.438232); // 22 - 26 bond( -2.350784, 0.616653, 0.438232, -1.685211, 1.684341, -0.314133); // 22 - 31 bond( 0.690842, -2.372757, 0.438232, 1.758911, -1.756104, -0.438232); // 23 - 24 bond( 0.690842, -2.372757, 0.438232, -0.566574, -2.330185, -0.314133); // 23 - 32 bond( 1.758911, -1.756104, -0.438232, 2.350784, -0.645828, 0.314133); // 24 - 27 bond( 0.690842, 2.372757, -0.438232, -0.566574, 2.330185, 0.314133); // 25 - 28 bond( -2.350784, -0.616653, -0.438232, -1.685211, -1.684341, 0.314133); // 26 - 29 bond( 2.350784, -0.645828, 0.314133, 2.350784, 0.645828, -0.314133); // 27 - 30 bond( -0.566574, 2.330185, 0.314133, -1.685211, 1.684341, -0.314133); // 28 - 31 bond( -1.685211, -1.684341, 0.314133, -0.566574, -2.330185, -0.314133); // 29 - 32 } } module c36_down_z(rcircle,dsquare,scale,ht) { /* Creates a 2d projection of a molcule from a set of orthogonal coordinates this is down z axis rcircle = radius of circles dsquare = basic length of square side scale = overall scale factor ht = height of extrude */ echo (" projection down z axis"); module atom(rx,x0,y0,z0) { translate(v=[scale*x0,scale*y0,0]) circle(rcircle,$fn=16); } module bond(x2,y2,z2,x1,y1,z1) { tx =scale*(x2 + x1)/2; ty =scale* (y2 + y1)/2; tz =scale* (z2 + z1)/2; ax =scale*( x2 - x1 ); ay =scale*( y2 - y1); az = scale*(z2 - z1); translate(v=[tx,ty,0]) rotate(a = [0,0, -atan2(ax, ay)]) scale([1,sqrt(ax*ax+ay*ay),1]) square(dsquare,center=true); } linear_extrude(height=ht) union() { atom(.5, 2.457138, 0.000000, 0.718750); // 1 atom(.5, 1.228561, 2.127945, 0.718750); // 2 atom(.5, -1.228561, 2.127945, 0.718750); // 3 atom(.5, -2.457138, 0.000000, 0.718750); // 4 atom(.5, -1.228561, -2.127945, 0.718750); // 5 atom(.5, 1.228561, -2.127945, 0.718750); // 6 atom(.5, 2.457138, 0.000000, -0.718750); // 7 atom(.5, 1.228561, 2.127945, -0.718750); // 8 atom(.5, -1.228561, 2.127945, -0.718750); // 9 atom(.5, -2.457138, 0.000000, -0.718750); // 10 atom(.5, -1.228561, -2.127945, -0.718750); // 11 atom(.5, 1.228561, -2.127945, -0.718750); // 12 atom(.5, 1.988266, 1.147919, 1.409744); // 13 atom(.5, 0.000000, 2.295853, 1.409744); // 14 atom(.5, -1.988266, 1.147919, 1.409744); // 15 atom(.5, -1.988266, -1.147919, 1.409744); // 16 atom(.5, 0.000000, -2.295853, 1.409744); // 17 atom(.5, 1.988266, -1.147919, 1.409744); // 18 atom(.5, 1.988266, -1.147919, -1.409744); // 19 atom(.5, 1.988266, 1.147919, -1.409744); // 20 atom(.5, 0.000000, 2.295853, -1.409744); // 21 atom(.5, -1.988266, 1.147919, -1.409744); // 22 atom(.5, -1.988266, -1.147919, -1.409744); // 23 atom(.5, 0.000000, -2.295853, -1.409744); // 24 atom(.5, 1.209015, 0.698013, 2.612564); // 25 atom(.5, 0.000000, 1.396042, 2.612564); // 26 atom(.5, -1.209015, 0.698013, 2.612564); // 27 atom(.5, -1.209015, -0.698013, 2.612564); // 28 atom(.5, 0.000000, -1.396042, 2.612564); // 29 atom(.5, 1.209015, -0.698013, 2.612564); // 30 atom(.5, 1.209015, -0.698013, -2.612564); // 31 atom(.5, 1.209015, 0.698013, -2.612564); // 32 atom(.5, 0.000000, 1.396042, -2.612564); // 33 atom(.5, -1.209015, 0.698013, -2.612564); // 34 atom(.5, -1.209015, -0.698013, -2.612564); // 35 atom(.5, 0.000000, -1.396042, -2.612564); // 36 bond( 2.457138, 0.000000, 0.718750, 2.457138, 0.000000, -0.718750); // 1 - 7 bond( 2.457138, 0.000000, 0.718750, 1.988266, 1.147919, 1.409744); // 1 - 13 bond( 2.457138, 0.000000, 0.718750, 1.988266, -1.147919, 1.409744); // 1 - 18 bond( 1.228561, 2.127945, 0.718750, 1.228561, 2.127945, -0.718750); // 2 - 8 bond( 1.228561, 2.127945, 0.718750, 1.988266, 1.147919, 1.409744); // 2 - 13 bond( 1.228561, 2.127945, 0.718750, 0.000000, 2.295853, 1.409744); // 2 - 14 bond( -1.228561, 2.127945, 0.718750, -1.228561, 2.127945, -0.718750); // 3 - 9 bond( -1.228561, 2.127945, 0.718750, 0.000000, 2.295853, 1.409744); // 3 - 14 bond( -1.228561, 2.127945, 0.718750, -1.988266, 1.147919, 1.409744); // 3 - 15 bond( -2.457138, 0.000000, 0.718750, -2.457138, 0.000000, -0.718750); // 4 - 10 bond( -2.457138, 0.000000, 0.718750, -1.988266, 1.147919, 1.409744); // 4 - 15 bond( -2.457138, 0.000000, 0.718750, -1.988266, -1.147919, 1.409744); // 4 - 16 bond( -1.228561, -2.127945, 0.718750, -1.228561, -2.127945, -0.718750); // 5 - 11 bond( -1.228561, -2.127945, 0.718750, -1.988266, -1.147919, 1.409744); // 5 - 16 bond( -1.228561, -2.127945, 0.718750, 0.000000, -2.295853, 1.409744); // 5 - 17 bond( 1.228561, -2.127945, 0.718750, 1.228561, -2.127945, -0.718750); // 6 - 12 bond( 1.228561, -2.127945, 0.718750, 0.000000, -2.295853, 1.409744); // 6 - 17 bond( 1.228561, -2.127945, 0.718750, 1.988266, -1.147919, 1.409744); // 6 - 18 bond( 2.457138, 0.000000, -0.718750, 1.988266, -1.147919, -1.409744); // 7 - 19 bond( 2.457138, 0.000000, -0.718750, 1.988266, 1.147919, -1.409744); // 7 - 20 bond( 1.228561, 2.127945, -0.718750, 1.988266, 1.147919, -1.409744); // 8 - 20 bond( 1.228561, 2.127945, -0.718750, 0.000000, 2.295853, -1.409744); // 8 - 21 bond( -1.228561, 2.127945, -0.718750, 0.000000, 2.295853, -1.409744); // 9 - 21 bond( -1.228561, 2.127945, -0.718750, -1.988266, 1.147919, -1.409744); // 9 - 22 bond( -2.457138, 0.000000, -0.718750, -1.988266, 1.147919, -1.409744); // 10 - 22 bond( -2.457138, 0.000000, -0.718750, -1.988266, -1.147919, -1.409744); // 10 - 23 bond( -1.228561, -2.127945, -0.718750, -1.988266, -1.147919, -1.409744); // 11 - 23 bond( -1.228561, -2.127945, -0.718750, 0.000000, -2.295853, -1.409744); // 11 - 24 bond( 1.228561, -2.127945, -0.718750, 1.988266, -1.147919, -1.409744); // 12 - 19 bond( 1.228561, -2.127945, -0.718750, 0.000000, -2.295853, -1.409744); // 12 - 24 bond( 1.988266, 1.147919, 1.409744, 1.209015, 0.698013, 2.612564); // 13 - 25 bond( 0.000000, 2.295853, 1.409744, 0.000000, 1.396042, 2.612564); // 14 - 26 bond( -1.988266, 1.147919, 1.409744, -1.209015, 0.698013, 2.612564); // 15 - 27 bond( -1.988266, -1.147919, 1.409744, -1.209015, -0.698013, 2.612564); // 16 - 28 bond( 0.000000, -2.295853, 1.409744, 0.000000, -1.396042, 2.612564); // 17 - 29 bond( 1.988266, -1.147919, 1.409744, 1.209015, -0.698013, 2.612564); // 18 - 30 bond( 1.988266, -1.147919, -1.409744, 1.209015, -0.698013, -2.612564); // 19 - 31 bond( 1.988266, 1.147919, -1.409744, 1.209015, 0.698013, -2.612564); // 20 - 32 bond( 0.000000, 2.295853, -1.409744, 0.000000, 1.396042, -2.612564); // 21 - 33 bond( -1.988266, 1.147919, -1.409744, -1.209015, 0.698013, -2.612564); // 22 - 34 bond( -1.988266, -1.147919, -1.409744, -1.209015, -0.698013, -2.612564); // 23 - 35 bond( 0.000000, -2.295853, -1.409744, 0.000000, -1.396042, -2.612564); // 24 - 36 bond( 1.209015, 0.698013, 2.612564, 0.000000, 1.396042, 2.612564); // 25 - 26 bond( 1.209015, 0.698013, 2.612564, 1.209015, -0.698013, 2.612564); // 25 - 30 bond( 0.000000, 1.396042, 2.612564, -1.209015, 0.698013, 2.612564); // 26 - 27 bond( -1.209015, 0.698013, 2.612564, -1.209015, -0.698013, 2.612564); // 27 - 28 bond( -1.209015, -0.698013, 2.612564, 0.000000, -1.396042, 2.612564); // 28 - 29 bond( 0.000000, -1.396042, 2.612564, 1.209015, -0.698013, 2.612564); // 29 - 30 bond( 1.209015, -0.698013, -2.612564, 1.209015, 0.698013, -2.612564); // 31 - 32 bond( 1.209015, -0.698013, -2.612564, 0.000000, -1.396042, -2.612564); // 31 - 36 bond( 1.209015, 0.698013, -2.612564, 0.000000, 1.396042, -2.612564); // 32 - 33 bond( 0.000000, 1.396042, -2.612564, -1.209015, 0.698013, -2.612564); // 33 - 34 bond( -1.209015, 0.698013, -2.612564, -1.209015, -0.698013, -2.612564); // 34 - 35 bond( -1.209015, -0.698013, -2.612564, 0.000000, -1.396042, -2.612564); // 35 - 36 } } module c60_down_y(rcircle,dsquare,scale,ht) { /* Creates a 2d projection of a molcule from a set of orthogonal coordinates this is down y axis rcircle = radius of circles dsquare = basic length of square side scale = overall scale factor ht = height of extrude */ echo (" projection down y axis"); module atom(rx,x0,z0,y0) { translate(v=[scale*x0,scale*y0,0]) circle(rcircle,$fn=16); } module bond(x2,z2,y2,x1,z1,y1) { tx =scale*(x2 + x1)/2; ty =scale* (y2 + y1)/2; tz =scale* (z2 + z1)/2; ax =scale*( x2 - x1 ); ay =scale*( y2 - y1); az = scale*(z2 - z1); translate(v=[tx,ty,0]) rotate(a = [0,0, -atan2(ax, ay)]) scale([1,sqrt(ax*ax+ay*ay),1]) square(dsquare,center=true); } linear_extrude(height=ht) union() { atom(.5, 0.000000, 3.449997, 0.684800); // 1 atom(.5, 3.002716, 1.408493, -1.170975); // 2 atom(.5, 0.000000, -3.449997, 0.684800); // 3 atom(.5, 2.279007, -2.579483, -0.723694); // 4 atom(.5, -2.579483, -0.723694, 2.279007); // 5 atom(.5, -1.170975, -3.002716, 1.408493); // 6 atom(.5, -1.170975, 3.002716, 1.408493); // 7 atom(.5, -2.579483, 0.723694, 2.279007); // 8 atom(.5, 2.279007, 2.579483, -0.723694); // 9 atom(.5, 3.002716, -1.408493, -1.170975); // 10 atom(.5, -3.002716, -1.408493, -1.170975); // 11 atom(.5, -3.002716, 1.408493, -1.170975); // 12 atom(.5, -0.723694, 2.279007, -2.579483); // 13 atom(.5, 0.684800, 0.000000, -3.449997); // 14 atom(.5, -0.723694, -2.279007, -2.579483); // 15 atom(.5, -2.279007, 2.579483, -0.723694); // 16 atom(.5, 0.723694, 2.279007, -2.579483); // 17 atom(.5, 1.408493, -1.170975, -3.002716); // 18 atom(.5, -1.170975, -3.002716, -1.408493); // 19 atom(.5, -3.449997, -0.684800, 0.000000); // 20 atom(.5, 2.579483, 0.723694, 2.279007); // 21 atom(.5, 2.579483, -0.723694, 2.279007); // 22 atom(.5, 1.408493, -1.170975, 3.002716); // 23 atom(.5, 0.684800, 0.000000, 3.449997); // 24 atom(.5, 1.408493, 1.170975, 3.002716); // 25 atom(.5, 1.170975, 3.002716, 1.408493); // 26 atom(.5, 3.449997, 0.684800, 0.000000); // 27 atom(.5, 2.279007, -2.579483, 0.723694); // 28 atom(.5, -0.723694, -2.279007, 2.579483); // 29 atom(.5, -1.408493, 1.170975, 3.002716); // 30 atom(.5, 1.170975, -3.002716, 1.408493); // 31 atom(.5, -1.408493, -1.170975, 3.002716); // 32 atom(.5, -0.723694, 2.279007, 2.579483); // 33 atom(.5, 2.279007, 2.579483, 0.723694); // 34 atom(.5, 3.449997, -0.684800, 0.000000); // 35 atom(.5, -2.279007, -2.579483, -0.723694); // 36 atom(.5, -3.449997, 0.684800, 0.000000); // 37 atom(.5, -1.170975, 3.002716, -1.408493); // 38 atom(.5, 1.408493, 1.170975, -3.002716); // 39 atom(.5, 0.723694, -2.279007, -2.579483); // 40 atom(.5, -0.684800, 0.000000, -3.449997); // 41 atom(.5, -1.408493, -1.170975, -3.002716); // 42 atom(.5, -2.579483, -0.723694, -2.279007); // 43 atom(.5, -2.579483, 0.723694, -2.279007); // 44 atom(.5, -1.408493, 1.170975, -3.002716); // 45 atom(.5, 1.170975, 3.002716, -1.408493); // 46 atom(.5, 2.579483, -0.723694, -2.279007); // 47 atom(.5, 0.000000, -3.449997, -0.684800); // 48 atom(.5, -3.002716, -1.408493, 1.170975); // 49 atom(.5, -2.279007, 2.579483, 0.723694); // 50 atom(.5, -0.684800, 0.000000, 3.449997); // 51 atom(.5, 0.723694, 2.279007, 2.579483); // 52 atom(.5, 3.002716, 1.408493, 1.170975); // 53 atom(.5, 3.002716, -1.408493, 1.170975); // 54 atom(.5, 0.723694, -2.279007, 2.579483); // 55 atom(.5, -2.279007, -2.579483, 0.723694); // 56 atom(.5, -3.002716, 1.408493, 1.170975); // 57 atom(.5, 0.000000, 3.449997, -0.684800); // 58 atom(.5, 2.579483, 0.723694, -2.279007); // 59 atom(.5, 1.170975, -3.002716, -1.408493); // 60 bond( 0.000000, 3.449997, 0.684800, -1.170975, 3.002716, 1.408493); // 1 - 7 bond( 0.000000, 3.449997, 0.684800, 1.170975, 3.002716, 1.408493); // 1 - 26 bond( 0.000000, 3.449997, 0.684800, 0.000000, 3.449997, -0.684800); // 1 - 58 bond( 3.002716, 1.408493, -1.170975, 2.279007, 2.579483, -0.723694); // 2 - 9 bond( 3.002716, 1.408493, -1.170975, 3.449997, 0.684800, 0.000000); // 2 - 27 bond( 3.002716, 1.408493, -1.170975, 2.579483, 0.723694, -2.279007); // 2 - 59 bond( 0.000000, -3.449997, 0.684800, -1.170975, -3.002716, 1.408493); // 3 - 6 bond( 0.000000, -3.449997, 0.684800, 1.170975, -3.002716, 1.408493); // 3 - 31 bond( 0.000000, -3.449997, 0.684800, 0.000000, -3.449997, -0.684800); // 3 - 48 bond( 2.279007, -2.579483, -0.723694, 3.002716, -1.408493, -1.170975); // 4 - 10 bond( 2.279007, -2.579483, -0.723694, 2.279007, -2.579483, 0.723694); // 4 - 28 bond( 2.279007, -2.579483, -0.723694, 1.170975, -3.002716, -1.408493); // 4 - 60 bond( -2.579483, -0.723694, 2.279007, -2.579483, 0.723694, 2.279007); // 5 - 8 bond( -2.579483, -0.723694, 2.279007, -1.408493, -1.170975, 3.002716); // 5 - 32 bond( -2.579483, -0.723694, 2.279007, -3.002716, -1.408493, 1.170975); // 5 - 49 bond( -1.170975, -3.002716, 1.408493, -0.723694, -2.279007, 2.579483); // 6 - 29 bond( -1.170975, -3.002716, 1.408493, -2.279007, -2.579483, 0.723694); // 6 - 56 bond( -1.170975, 3.002716, 1.408493, -0.723694, 2.279007, 2.579483); // 7 - 33 bond( -1.170975, 3.002716, 1.408493, -2.279007, 2.579483, 0.723694); // 7 - 50 bond( -2.579483, 0.723694, 2.279007, -1.408493, 1.170975, 3.002716); // 8 - 30 bond( -2.579483, 0.723694, 2.279007, -3.002716, 1.408493, 1.170975); // 8 - 57 bond( 2.279007, 2.579483, -0.723694, 2.279007, 2.579483, 0.723694); // 9 - 34 bond( 2.279007, 2.579483, -0.723694, 1.170975, 3.002716, -1.408493); // 9 - 46 bond( 3.002716, -1.408493, -1.170975, 3.449997, -0.684800, 0.000000); // 10 - 35 bond( 3.002716, -1.408493, -1.170975, 2.579483, -0.723694, -2.279007); // 10 - 47 bond( -3.002716, -1.408493, -1.170975, -3.449997, -0.684800, 0.000000); // 11 - 20 bond( -3.002716, -1.408493, -1.170975, -2.279007, -2.579483, -0.723694); // 11 - 36 bond( -3.002716, -1.408493, -1.170975, -2.579483, -0.723694, -2.279007); // 11 - 43 bond( -3.002716, 1.408493, -1.170975, -2.279007, 2.579483, -0.723694); // 12 - 16 bond( -3.002716, 1.408493, -1.170975, -3.449997, 0.684800, 0.000000); // 12 - 37 bond( -3.002716, 1.408493, -1.170975, -2.579483, 0.723694, -2.279007); // 12 - 44 bond( -0.723694, 2.279007, -2.579483, 0.723694, 2.279007, -2.579483); // 13 - 17 bond( -0.723694, 2.279007, -2.579483, -1.170975, 3.002716, -1.408493); // 13 - 38 bond( -0.723694, 2.279007, -2.579483, -1.408493, 1.170975, -3.002716); // 13 - 45 bond( 0.684800, 0.000000, -3.449997, 1.408493, -1.170975, -3.002716); // 14 - 18 bond( 0.684800, 0.000000, -3.449997, 1.408493, 1.170975, -3.002716); // 14 - 39 bond( 0.684800, 0.000000, -3.449997, -0.684800, 0.000000, -3.449997); // 14 - 41 bond( -0.723694, -2.279007, -2.579483, -1.170975, -3.002716, -1.408493); // 15 - 19 bond( -0.723694, -2.279007, -2.579483, 0.723694, -2.279007, -2.579483); // 15 - 40 bond( -0.723694, -2.279007, -2.579483, -1.408493, -1.170975, -3.002716); // 15 - 42 bond( -2.279007, 2.579483, -0.723694, -1.170975, 3.002716, -1.408493); // 16 - 38 bond( -2.279007, 2.579483, -0.723694, -2.279007, 2.579483, 0.723694); // 16 - 50 bond( 0.723694, 2.279007, -2.579483, 1.408493, 1.170975, -3.002716); // 17 - 39 bond( 0.723694, 2.279007, -2.579483, 1.170975, 3.002716, -1.408493); // 17 - 46 bond( 1.408493, -1.170975, -3.002716, 0.723694, -2.279007, -2.579483); // 18 - 40 bond( 1.408493, -1.170975, -3.002716, 2.579483, -0.723694, -2.279007); // 18 - 47 bond( -1.170975, -3.002716, -1.408493, -2.279007, -2.579483, -0.723694); // 19 - 36 bond( -1.170975, -3.002716, -1.408493, 0.000000, -3.449997, -0.684800); // 19 - 48 bond( -3.449997, -0.684800, 0.000000, -3.449997, 0.684800, 0.000000); // 20 - 37 bond( -3.449997, -0.684800, 0.000000, -3.002716, -1.408493, 1.170975); // 20 - 49 bond( 2.579483, 0.723694, 2.279007, 2.579483, -0.723694, 2.279007); // 21 - 22 bond( 2.579483, 0.723694, 2.279007, 1.408493, 1.170975, 3.002716); // 21 - 25 bond( 2.579483, 0.723694, 2.279007, 3.002716, 1.408493, 1.170975); // 21 - 53 bond( 2.579483, -0.723694, 2.279007, 1.408493, -1.170975, 3.002716); // 22 - 23 bond( 2.579483, -0.723694, 2.279007, 3.002716, -1.408493, 1.170975); // 22 - 54 bond( 1.408493, -1.170975, 3.002716, 0.684800, 0.000000, 3.449997); // 23 - 24 bond( 1.408493, -1.170975, 3.002716, 0.723694, -2.279007, 2.579483); // 23 - 55 bond( 0.684800, 0.000000, 3.449997, 1.408493, 1.170975, 3.002716); // 24 - 25 bond( 0.684800, 0.000000, 3.449997, -0.684800, 0.000000, 3.449997); // 24 - 51 bond( 1.408493, 1.170975, 3.002716, 0.723694, 2.279007, 2.579483); // 25 - 52 bond( 1.170975, 3.002716, 1.408493, 2.279007, 2.579483, 0.723694); // 26 - 34 bond( 1.170975, 3.002716, 1.408493, 0.723694, 2.279007, 2.579483); // 26 - 52 bond( 3.449997, 0.684800, 0.000000, 3.449997, -0.684800, 0.000000); // 27 - 35 bond( 3.449997, 0.684800, 0.000000, 3.002716, 1.408493, 1.170975); // 27 - 53 bond( 2.279007, -2.579483, 0.723694, 1.170975, -3.002716, 1.408493); // 28 - 31 bond( 2.279007, -2.579483, 0.723694, 3.002716, -1.408493, 1.170975); // 28 - 54 bond( -0.723694, -2.279007, 2.579483, -1.408493, -1.170975, 3.002716); // 29 - 32 bond( -0.723694, -2.279007, 2.579483, 0.723694, -2.279007, 2.579483); // 29 - 55 bond( -1.408493, 1.170975, 3.002716, -0.723694, 2.279007, 2.579483); // 30 - 33 bond( -1.408493, 1.170975, 3.002716, -0.684800, 0.000000, 3.449997); // 30 - 51 bond( 1.170975, -3.002716, 1.408493, 0.723694, -2.279007, 2.579483); // 31 - 55 bond( -1.408493, -1.170975, 3.002716, -0.684800, 0.000000, 3.449997); // 32 - 51 bond( -0.723694, 2.279007, 2.579483, 0.723694, 2.279007, 2.579483); // 33 - 52 bond( 2.279007, 2.579483, 0.723694, 3.002716, 1.408493, 1.170975); // 34 - 53 bond( 3.449997, -0.684800, 0.000000, 3.002716, -1.408493, 1.170975); // 35 - 54 bond( -2.279007, -2.579483, -0.723694, -2.279007, -2.579483, 0.723694); // 36 - 56 bond( -3.449997, 0.684800, 0.000000, -3.002716, 1.408493, 1.170975); // 37 - 57 bond( -1.170975, 3.002716, -1.408493, 0.000000, 3.449997, -0.684800); // 38 - 58 bond( 1.408493, 1.170975, -3.002716, 2.579483, 0.723694, -2.279007); // 39 - 59 bond( 0.723694, -2.279007, -2.579483, 1.170975, -3.002716, -1.408493); // 40 - 60 bond( -0.684800, 0.000000, -3.449997, -1.408493, -1.170975, -3.002716); // 41 - 42 bond( -0.684800, 0.000000, -3.449997, -1.408493, 1.170975, -3.002716); // 41 - 45 bond( -1.408493, -1.170975, -3.002716, -2.579483, -0.723694, -2.279007); // 42 - 43 bond( -2.579483, -0.723694, -2.279007, -2.579483, 0.723694, -2.279007); // 43 - 44 bond( -2.579483, 0.723694, -2.279007, -1.408493, 1.170975, -3.002716); // 44 - 45 bond( 1.170975, 3.002716, -1.408493, 0.000000, 3.449997, -0.684800); // 46 - 58 bond( 2.579483, -0.723694, -2.279007, 2.579483, 0.723694, -2.279007); // 47 - 59 bond( 0.000000, -3.449997, -0.684800, 1.170975, -3.002716, -1.408493); // 48 - 60 bond( -3.002716, -1.408493, 1.170975, -2.279007, -2.579483, 0.723694); // 49 - 56 bond( -2.279007, 2.579483, 0.723694, -3.002716, 1.408493, 1.170975); // 50 - 57 } } module c78d_down_x(rcircle,dsquare,scale,ht) { /* Creates a 2d projection of a molcule from a set of orthogonal coordinates this is down x axis rcircle = radius of circles dsquare = basic length of square side scale = overall scale factor */ echo (" projection down x axis"); module atom(rx,z0,y0,x0) { translate(v=[scale*x0,scale*y0,0]) circle(rcircle,$fn=16); } module bond(z2,y2,x2,z1,y1,x1) { tx =scale*(x2 + x1)/2; ty =scale* (y2 + y1)/2; tz =scale* (z2 + z1)/2; ax =scale*( x2 - x1 ); ay =scale*( y2 - y1); az = scale*(z2 - z1); translate(v=[tx,ty,0]) rotate(a = [0,0, -atan2(ax, ay)]) scale([1,sqrt(ax*ax+ay*ay),1]) square(dsquare,center=true); } linear_extrude(height=ht) union() { atom(.5, 1.182327, -3.114639, 2.342819); // 1 atom(.5, 0.737198, -3.829514, 1.226624); // 2 atom(.5, 3.216095, -0.002167, 2.543808); // 3 atom(.5, 2.372955, -1.030212, 3.000076); // 4 atom(.5, 2.375610, -2.314987, 2.296280); // 5 atom(.5, 3.198166, -2.460297, 1.169205); // 6 atom(.5, 4.215759, 1.052582, -0.697311); // 7 atom(.5, 4.215759, 1.052597, 0.697311); // 8 atom(.5, 4.113480, -0.197586, 1.415039); // 9 atom(.5, 4.076569, -1.394775, 0.723114); // 10 atom(.5, 2.372955, -1.030212, -3.000076); // 11 atom(.5, 3.216095, -0.002197, -2.543808); // 12 atom(.5, 4.113480, -0.197600, -1.415039); // 13 atom(.5, 4.076569, -1.394775, -0.723068); // 14 atom(.5, 2.375610, -2.315002, -2.296265); // 15 atom(.5, 3.198166, -2.460312, -1.169189); // 16 atom(.5, 2.721710, -3.155884, 0.000000); // 17 atom(.5, 1.471954, -3.797012, 0.000000); // 18 atom(.5, 0.737198, -3.829529, -1.226593); // 19 atom(.5, 1.182327, -3.114639, -2.342789); // 20 atom(.5, 2.721237, 2.999481, -0.726593); // 21 atom(.5, 3.415695, 2.025696, -1.413269); // 22 atom(.5, 3.415695, 2.025696, 1.413254); // 23 atom(.5, 2.721237, 2.999481, 0.726547); // 24 atom(.5, 2.772949, 1.361557, -2.529358); // 25 atom(.5, 1.467087, 1.705338, -2.937668); // 26 atom(.5, 0.735550, 2.756302, -2.224472); // 27 atom(.5, 1.403870, 3.405594, -1.174118); // 28 atom(.5, 1.180023, -0.627991, -3.670914); // 29 atom(.5, 0.730713, 0.702423, -3.616516); // 30 atom(.5, 2.772949, 1.361572, 2.529358); // 31 atom(.5, 1.467087, 1.705368, 2.937668); // 32 atom(.5, 0.730743, 0.702454, 3.616516); // 33 atom(.5, 1.180038, -0.627945, 3.670914); // 34 atom(.5, 1.403870, 3.405594, 1.174103); // 35 atom(.5, 0.735550, 2.756302, 2.224457); // 36 atom(.5, -1.403870, 3.405594, -1.174118); // 37 atom(.5, -0.735550, 2.756302, -2.224472); // 38 atom(.5, -3.415695, 2.025696, 1.413254); // 39 atom(.5, -2.721237, 2.999481, 0.726547); // 40 atom(.5, -2.721237, 2.999481, -0.726593); // 41 atom(.5, -3.415695, 2.025696, -1.413269); // 42 atom(.5, -4.076569, -1.394775, 0.723114); // 43 atom(.5, -4.113480, -0.197586, 1.415039); // 44 atom(.5, -4.215759, 1.052597, 0.697311); // 45 atom(.5, -4.215759, 1.052582, -0.697311); // 46 atom(.5, -2.375610, -2.315002, -2.296265); // 47 atom(.5, -3.198166, -2.460312, -1.169189); // 48 atom(.5, -4.076569, -1.394775, -0.723068); // 49 atom(.5, -4.113480, -0.197600, -1.415039); // 50 atom(.5, -2.372955, -1.030212, -3.000076); // 51 atom(.5, -3.216095, -0.002197, -2.543808); // 52 atom(.5, -2.772949, 1.361572, -2.529358); // 53 atom(.5, -1.467087, 1.705338, -2.937668); // 54 atom(.5, -0.730743, 0.702423, -3.616516); // 55 atom(.5, -1.180038, -0.627960, -3.670914); // 56 atom(.5, -2.375610, -2.314987, 2.296280); // 57 atom(.5, -3.198166, -2.460297, 1.169205); // 58 atom(.5, -3.216095, -0.002167, 2.543808); // 59 atom(.5, -2.372955, -1.030212, 3.000076); // 60 atom(.5, -2.721710, -3.155884, 0.000000); // 61 atom(.5, -1.471954, -3.797012, 0.000000); // 62 atom(.5, -0.737198, -3.829514, 1.226624); // 63 atom(.5, -1.182327, -3.114639, 2.342819); // 64 atom(.5, -1.182327, -3.114639, -2.342789); // 65 atom(.5, -0.737198, -3.829529, -1.226593); // 66 atom(.5, -2.772949, 1.361572, 2.529358); // 67 atom(.5, -1.467087, 1.705368, 2.937668); // 68 atom(.5, -0.735550, 2.756302, 2.224457); // 69 atom(.5, -1.403870, 3.405624, 1.174103); // 70 atom(.5, -1.180023, -0.627945, 3.670914); // 71 atom(.5, -0.730713, 0.702454, 3.616516); // 72 atom(.5, 0.000000, -1.481522, 3.724152); // 73 atom(.5, 0.000000, -2.685928, 3.081177); // 74 atom(.5, 0.000000, -2.685959, -3.081146); // 75 atom(.5, 0.000000, -1.481567, -3.724152); // 76 atom(.5, -0.684189, 3.829544, -0.000015); // 77 atom(.5, 0.684189, 3.829544, -0.000015); // 78 bond( 1.182327, -3.114639, 2.342819, 0.737198, -3.829514, 1.226624); // 1 - 2 bond( 1.182327, -3.114639, 2.342819, 2.375610, -2.314987, 2.296280); // 1 - 5 bond( 1.182327, -3.114639, 2.342819, 0.000000, -2.685928, 3.081177); // 1 - 74 bond( 0.737198, -3.829514, 1.226624, 1.471954, -3.797012, 0.000000); // 2 - 18 bond( 0.737198, -3.829514, 1.226624, -0.737198, -3.829514, 1.226624); // 2 - 63 bond( 3.216095, -0.002167, 2.543808, 2.372955, -1.030212, 3.000076); // 3 - 4 bond( 3.216095, -0.002167, 2.543808, 4.113480, -0.197586, 1.415039); // 3 - 9 bond( 3.216095, -0.002167, 2.543808, 2.772949, 1.361572, 2.529358); // 3 - 31 bond( 2.372955, -1.030212, 3.000076, 2.375610, -2.314987, 2.296280); // 4 - 5 bond( 2.372955, -1.030212, 3.000076, 1.180038, -0.627945, 3.670914); // 4 - 34 bond( 2.375610, -2.314987, 2.296280, 3.198166, -2.460297, 1.169205); // 5 - 6 bond( 3.198166, -2.460297, 1.169205, 4.076569, -1.394775, 0.723114); // 6 - 10 bond( 3.198166, -2.460297, 1.169205, 2.721710, -3.155884, 0.000000); // 6 - 17 bond( 4.215759, 1.052582, -0.697311, 4.215759, 1.052597, 0.697311); // 7 - 8 bond( 4.215759, 1.052582, -0.697311, 4.113480, -0.197600, -1.415039); // 7 - 13 bond( 4.215759, 1.052582, -0.697311, 3.415695, 2.025696, -1.413269); // 7 - 22 bond( 4.215759, 1.052597, 0.697311, 4.113480, -0.197586, 1.415039); // 8 - 9 bond( 4.215759, 1.052597, 0.697311, 3.415695, 2.025696, 1.413254); // 8 - 23 bond( 4.113480, -0.197586, 1.415039, 4.076569, -1.394775, 0.723114); // 9 - 10 bond( 4.076569, -1.394775, 0.723114, 4.076569, -1.394775, -0.723068); // 10 - 14 bond( 2.372955, -1.030212, -3.000076, 3.216095, -0.002197, -2.543808); // 11 - 12 bond( 2.372955, -1.030212, -3.000076, 2.375610, -2.315002, -2.296265); // 11 - 15 bond( 2.372955, -1.030212, -3.000076, 1.180023, -0.627991, -3.670914); // 11 - 29 bond( 3.216095, -0.002197, -2.543808, 4.113480, -0.197600, -1.415039); // 12 - 13 bond( 3.216095, -0.002197, -2.543808, 2.772949, 1.361557, -2.529358); // 12 - 25 bond( 4.113480, -0.197600, -1.415039, 4.076569, -1.394775, -0.723068); // 13 - 14 bond( 4.076569, -1.394775, -0.723068, 3.198166, -2.460312, -1.169189); // 14 - 16 bond( 2.375610, -2.315002, -2.296265, 3.198166, -2.460312, -1.169189); // 15 - 16 bond( 2.375610, -2.315002, -2.296265, 1.182327, -3.114639, -2.342789); // 15 - 20 bond( 3.198166, -2.460312, -1.169189, 2.721710, -3.155884, 0.000000); // 16 - 17 bond( 2.721710, -3.155884, 0.000000, 1.471954, -3.797012, 0.000000); // 17 - 18 bond( 1.471954, -3.797012, 0.000000, 0.737198, -3.829529, -1.226593); // 18 - 19 bond( 0.737198, -3.829529, -1.226593, 1.182327, -3.114639, -2.342789); // 19 - 20 bond( 0.737198, -3.829529, -1.226593, -0.737198, -3.829529, -1.226593); // 19 - 66 bond( 1.182327, -3.114639, -2.342789, 0.000000, -2.685959, -3.081146); // 20 - 75 bond( 2.721237, 2.999481, -0.726593, 3.415695, 2.025696, -1.413269); // 21 - 22 bond( 2.721237, 2.999481, -0.726593, 2.721237, 2.999481, 0.726547); // 21 - 24 bond( 2.721237, 2.999481, -0.726593, 1.403870, 3.405594, -1.174118); // 21 - 28 bond( 3.415695, 2.025696, -1.413269, 2.772949, 1.361557, -2.529358); // 22 - 25 bond( 3.415695, 2.025696, 1.413254, 2.721237, 2.999481, 0.726547); // 23 - 24 bond( 3.415695, 2.025696, 1.413254, 2.772949, 1.361572, 2.529358); // 23 - 31 bond( 2.721237, 2.999481, 0.726547, 1.403870, 3.405594, 1.174103); // 24 - 35 bond( 2.772949, 1.361557, -2.529358, 1.467087, 1.705338, -2.937668); // 25 - 26 bond( 1.467087, 1.705338, -2.937668, 0.735550, 2.756302, -2.224472); // 26 - 27 bond( 1.467087, 1.705338, -2.937668, 0.730713, 0.702423, -3.616516); // 26 - 30 bond( 0.735550, 2.756302, -2.224472, 1.403870, 3.405594, -1.174118); // 27 - 28 bond( 0.735550, 2.756302, -2.224472, -0.735550, 2.756302, -2.224472); // 27 - 38 bond( 1.403870, 3.405594, -1.174118, 0.684189, 3.829544, -0.000015); // 28 - 78 bond( 1.180023, -0.627991, -3.670914, 0.730713, 0.702423, -3.616516); // 29 - 30 bond( 1.180023, -0.627991, -3.670914, 0.000000, -1.481567, -3.724152); // 29 - 76 bond( 0.730713, 0.702423, -3.616516, -0.730743, 0.702423, -3.616516); // 30 - 55 bond( 2.772949, 1.361572, 2.529358, 1.467087, 1.705368, 2.937668); // 31 - 32 bond( 1.467087, 1.705368, 2.937668, 0.730743, 0.702454, 3.616516); // 32 - 33 bond( 1.467087, 1.705368, 2.937668, 0.735550, 2.756302, 2.224457); // 32 - 36 bond( 0.730743, 0.702454, 3.616516, 1.180038, -0.627945, 3.670914); // 33 - 34 bond( 0.730743, 0.702454, 3.616516, -0.730713, 0.702454, 3.616516); // 33 - 72 bond( 1.180038, -0.627945, 3.670914, 0.000000, -1.481522, 3.724152); // 34 - 73 bond( 1.403870, 3.405594, 1.174103, 0.735550, 2.756302, 2.224457); // 35 - 36 bond( 1.403870, 3.405594, 1.174103, 0.684189, 3.829544, -0.000015); // 35 - 78 bond( 0.735550, 2.756302, 2.224457, -0.735550, 2.756302, 2.224457); // 36 - 69 bond( -1.403870, 3.405594, -1.174118, -0.735550, 2.756302, -2.224472); // 37 - 38 bond( -1.403870, 3.405594, -1.174118, -2.721237, 2.999481, -0.726593); // 37 - 41 bond( -1.403870, 3.405594, -1.174118, -0.684189, 3.829544, -0.000015); // 37 - 77 bond( -0.735550, 2.756302, -2.224472, -1.467087, 1.705338, -2.937668); // 38 - 54 bond( -3.415695, 2.025696, 1.413254, -2.721237, 2.999481, 0.726547); // 39 - 40 bond( -3.415695, 2.025696, 1.413254, -4.215759, 1.052597, 0.697311); // 39 - 45 bond( -3.415695, 2.025696, 1.413254, -2.772949, 1.361572, 2.529358); // 39 - 67 bond( -2.721237, 2.999481, 0.726547, -2.721237, 2.999481, -0.726593); // 40 - 41 bond( -2.721237, 2.999481, 0.726547, -1.403870, 3.405624, 1.174103); // 40 - 70 bond( -2.721237, 2.999481, -0.726593, -3.415695, 2.025696, -1.413269); // 41 - 42 bond( -3.415695, 2.025696, -1.413269, -4.215759, 1.052582, -0.697311); // 42 - 46 bond( -3.415695, 2.025696, -1.413269, -2.772949, 1.361572, -2.529358); // 42 - 53 bond( -4.076569, -1.394775, 0.723114, -4.113480, -0.197586, 1.415039); // 43 - 44 bond( -4.076569, -1.394775, 0.723114, -4.076569, -1.394775, -0.723068); // 43 - 49 bond( -4.076569, -1.394775, 0.723114, -3.198166, -2.460297, 1.169205); // 43 - 58 bond( -4.113480, -0.197586, 1.415039, -4.215759, 1.052597, 0.697311); // 44 - 45 bond( -4.113480, -0.197586, 1.415039, -3.216095, -0.002167, 2.543808); // 44 - 59 bond( -4.215759, 1.052597, 0.697311, -4.215759, 1.052582, -0.697311); // 45 - 46 bond( -4.215759, 1.052582, -0.697311, -4.113480, -0.197600, -1.415039); // 46 - 50 bond( -2.375610, -2.315002, -2.296265, -3.198166, -2.460312, -1.169189); // 47 - 48 bond( -2.375610, -2.315002, -2.296265, -2.372955, -1.030212, -3.000076); // 47 - 51 bond( -2.375610, -2.315002, -2.296265, -1.182327, -3.114639, -2.342789); // 47 - 65 bond( -3.198166, -2.460312, -1.169189, -4.076569, -1.394775, -0.723068); // 48 - 49 bond( -3.198166, -2.460312, -1.169189, -2.721710, -3.155884, 0.000000); // 48 - 61 bond( -4.076569, -1.394775, -0.723068, -4.113480, -0.197600, -1.415039); // 49 - 50 bond( -4.113480, -0.197600, -1.415039, -3.216095, -0.002197, -2.543808); // 50 - 52 bond( -2.372955, -1.030212, -3.000076, -3.216095, -0.002197, -2.543808); // 51 - 52 bond( -2.372955, -1.030212, -3.000076, -1.180038, -0.627960, -3.670914); // 51 - 56 bond( -3.216095, -0.002197, -2.543808, -2.772949, 1.361572, -2.529358); // 52 - 53 bond( -2.772949, 1.361572, -2.529358, -1.467087, 1.705338, -2.937668); // 53 - 54 bond( -1.467087, 1.705338, -2.937668, -0.730743, 0.702423, -3.616516); // 54 - 55 bond( -0.730743, 0.702423, -3.616516, -1.180038, -0.627960, -3.670914); // 55 - 56 bond( -1.180038, -0.627960, -3.670914, 0.000000, -1.481567, -3.724152); // 56 - 76 bond( -2.375610, -2.314987, 2.296280, -3.198166, -2.460297, 1.169205); // 57 - 58 bond( -2.375610, -2.314987, 2.296280, -2.372955, -1.030212, 3.000076); // 57 - 60 bond( -2.375610, -2.314987, 2.296280, -1.182327, -3.114639, 2.342819); // 57 - 64 bond( -3.198166, -2.460297, 1.169205, -2.721710, -3.155884, 0.000000); // 58 - 61 bond( -3.216095, -0.002167, 2.543808, -2.372955, -1.030212, 3.000076); // 59 - 60 bond( -3.216095, -0.002167, 2.543808, -2.772949, 1.361572, 2.529358); // 59 - 67 bond( -2.372955, -1.030212, 3.000076, -1.180023, -0.627945, 3.670914); // 60 - 71 bond( -2.721710, -3.155884, 0.000000, -1.471954, -3.797012, 0.000000); // 61 - 62 bond( -1.471954, -3.797012, 0.000000, -0.737198, -3.829514, 1.226624); // 62 - 63 bond( -1.471954, -3.797012, 0.000000, -0.737198, -3.829529, -1.226593); // 62 - 66 bond( -0.737198, -3.829514, 1.226624, -1.182327, -3.114639, 2.342819); // 63 - 64 bond( -1.182327, -3.114639, 2.342819, 0.000000, -2.685928, 3.081177); // 64 - 74 bond( -1.182327, -3.114639, -2.342789, -0.737198, -3.829529, -1.226593); // 65 - 66 bond( -1.182327, -3.114639, -2.342789, 0.000000, -2.685959, -3.081146); // 65 - 75 bond( -2.772949, 1.361572, 2.529358, -1.467087, 1.705368, 2.937668); // 67 - 68 bond( -1.467087, 1.705368, 2.937668, -0.735550, 2.756302, 2.224457); // 68 - 69 bond( -1.467087, 1.705368, 2.937668, -0.730713, 0.702454, 3.616516); // 68 - 72 bond( -0.735550, 2.756302, 2.224457, -1.403870, 3.405624, 1.174103); // 69 - 70 bond( -1.403870, 3.405624, 1.174103, -0.684189, 3.829544, -0.000015); // 70 - 77 bond( -1.180023, -0.627945, 3.670914, -0.730713, 0.702454, 3.616516); // 71 - 72 bond( -1.180023, -0.627945, 3.670914, 0.000000, -1.481522, 3.724152); // 71 - 73 bond( 0.000000, -1.481522, 3.724152, 0.000000, -2.685928, 3.081177); // 73 - 74 bond( 0.000000, -2.685959, -3.081146, 0.000000, -1.481567, -3.724152); // 75 - 76 bond( -0.684189, 3.829544, -0.000015, 0.684189, 3.829544, -0.000015); // 77 - 78 } }