ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/5cb/Figure1/pov_header.pov
Revision: 4030
Committed: Wed Feb 19 15:47:18 2014 UTC (10 years, 6 months ago) by jmarr
File size: 20654 byte(s)
Log Message:
Images and raw data

File Contents

# User Rev Content
1 jmarr 4030 // The following script was automatically generated by:
2     // xyz2pov Copyright 2001 by MATTHEW A. MEINEKE
3    
4    
5     background { rgb <1.0, 1.0, 1.0> }
6    
7    
8     //******************************************************
9     // Declare the resolution, camera, and light sources.
10     //******************************************************
11    
12     // NOTE: if you plan to render at a different resoltion,
13     // be sure to update the following two lines to maintain
14     // the correct aspect ratio.
15    
16     #declare Width = 640.0;
17     #declare Height = 480.0;
18     #declare Ratio = Width / Height;
19    
20     #declare ATOM_SPHERE_FACTOR = 0.2;
21     #declare BOND_RADIUS = 0.1;
22     #declare VECTOR_SCALE = 1.0;
23     #declare STICK_RADIUS = 0.5 * BOND_RADIUS;
24     #declare CONE_RADIUS = 2.0 * STICK_RADIUS;
25     #declare CONE_FRACTION = 0.15;
26    
27     // declare camera, light, and system variables
28    
29     #declare sysCenterX = -0.063453;
30     #declare sysCenterY = -0.018804;
31     #declare sysCenterZ = 0.005904;
32    
33     #declare zoom = 44.183902;
34    
35     #declare cameraLookX = sysCenterX;
36     #declare cameraLookY = sysCenterY;
37     #declare cameraLookZ = sysCenterZ;
38    
39     #declare rotatePointX = cameraLookX;
40     #declare rotatePointY = cameraLookY;
41     #declare rotatePointZ = cameraLookZ;
42    
43     #declare cameraX = cameraLookX;
44     #declare cameraY = cameraLookY;
45     #declare cameraZ = cameraLookZ - zoom;
46    
47     #declare lightAx = cameraX;
48     #declare lightAy = cameraY;
49     #declare lightAz = cameraZ;
50    
51     #declare lightBx = cameraX - zoom;
52     #declare lightBy = cameraY + zoom;
53     #declare lightBz = cameraZ;
54    
55     #declare boxCenterX = cameraLookX;
56     #declare boxCenterY = cameraLookY;
57     #declare boxCenterZ = cameraLookZ;
58    
59     // declare the cameras and the light sources
60    
61     camera{
62     location < cameraX, cameraY, cameraZ>
63     right < Ratio , 0, 0>
64     look_at < cameraLookX, cameraLookY, cameraLookZ >
65     }
66    
67     light_source{
68     < lightAx, lightAy, lightAz >
69     rgb < 1.0, 1.0, 1.0 > }
70    
71     light_source{
72     < lightBx, lightBy, lightBz >
73     rgb < 1.0, 1.0, 1.0 > }
74    
75    
76     //************************************************************
77     // Set whether or not to rotate the system.
78     //
79     // To Rotate, set ROTATE to 1.0 (true),
80     // Then set the Euler Angles PHI, THETA, and PSI in degrees.
81     //************************************************************
82    
83     #declare ROTATE = 0.0;
84     #declare PHI = 0.0;
85     #declare THETA = 0.0;
86     #declare PSI = 0.0;
87    
88     #if(ROTATE)
89     #declare phi_r = radians(PHI);
90     #declare theta_r = radians(THETA);
91     #declare psi_r = radians(PSI);
92    
93     #declare A11 = cos(phi_r) * cos(psi_r) - sin(phi_r) * cos(theta_r) * sin(psi_r);
94     #declare A12 = sin(phi_r) * cos(psi_r) + cos(phi_r) * cos(theta_r) * sin(psi_r);
95     #declare A13 = sin(theta_r) * sin(psi_r);
96    
97     #declare A21 = -cos(phi_r) * sin(psi_r) - sin(phi_r) * cos(theta_r) * cos(psi_r);
98     #declare A22 = -sin(phi_r) * sin(psi_r) + cos(phi_r) * cos(theta_r) * cos(psi_r);
99     #declare A23 = sin(theta_r) * cos(psi_r);
100    
101     #declare A31 = sin(phi_r) * sin(theta_r);
102     #declare A32 = -cos(phi_r) * sin(theta_r);
103     #declare A33 = cos(theta_r);
104    
105     #end
106    
107    
108     //************************************************************
109     // declare the periodic box macro
110     //************************************************************
111    
112     #macro makePeriodicBox( bx1, by1, bz1, bx2, by2, bz2, bx3, by3, bz3 )
113    
114     #local bcx = (bx1 + bx2 + bx3) / 2.0;
115     #local bcy = (by1 + by2 + by3) / 2.0;
116     #local bcz = (bz1 + bz2 + bz3) / 2.0;
117    
118     #local pAx = boxCenterX - bcx;
119     #local pAy = boxCenterY - bcy;
120     #local pAz = boxCenterZ - bcz;
121     #local pBx = boxCenterX + bx1 - bcx;
122     #local pBy = boxCenterY + by1 - bcy;
123     #local pBz = boxCenterZ + bz1 - bcz;
124     #local pCx = boxCenterX + bx2 - bcx;
125     #local pCy = boxCenterY + by2 - bcy;
126     #local pCz = boxCenterZ + bz2 - bcz;
127     #local pDx = boxCenterX + bx3 - bcx;
128     #local pDy = boxCenterY + by3 - bcy;
129     #local pDz = boxCenterZ + bz3 - bcz;
130     #local pEx = boxCenterX + bx1 + bx2 - bcx;
131     #local pEy = boxCenterY + by1 + by2 - bcy;
132     #local pEz = boxCenterZ + bz1 + bz2 - bcz;
133     #local pFx = boxCenterX + bx1 + bx3 - bcx;
134     #local pFy = boxCenterY + by1 + by3 - bcy;
135     #local pFz = boxCenterZ + bz1 + bz3 - bcz;
136     #local pGx = boxCenterX + bx2 + bx3 - bcx;
137     #local pGy = boxCenterY + by2 + by3 - bcy;
138     #local pGz = boxCenterZ + bz2 + bz3 - bcz;
139     #local pHx = boxCenterX + bx1 + bx2 + bx3 - bcx;
140     #local pHy = boxCenterY + by1 + by2 + by3 - bcy;
141     #local pHz = boxCenterZ + bz1 + bz2 + bz3 - bcz;
142    
143     #if(ROTATE)
144     #local pAx_new = rotatePointX + A11 * (pAx-rotatePointX) + A12 * (pAy-rotatePointY) + A13 * (pAz-rotatePointZ);
145     #local pAy_new = rotatePointY + A21 * (pAx-rotatePointX) + A22 * (pAy-rotatePointY) + A23 * (pAz-rotatePointZ);
146     #local pAz_new = rotatePointZ + A31 * (pAx-rotatePointX) + A32 * (pAy-rotatePointY) + A33 * (pAz-rotatePointZ);
147    
148     #local pBx_new = rotatePointX + A11 * (pBx-rotatePointX) + A12 * (pBy-rotatePointY) + A13 * (pBz-rotatePointZ);
149     #local pBy_new = rotatePointY + A21 * (pBx-rotatePointX) + A22 * (pBy-rotatePointY) + A23 * (pBz-rotatePointZ);
150     #local pBz_new = rotatePointZ + A31 * (pBx-rotatePointX) + A32 * (pBy-rotatePointY) + A33 * (pBz-rotatePointZ);
151    
152     #local pCx_new = rotatePointX + A11 * (pCx-rotatePointX) + A12 * (pCy-rotatePointY) + A13 * (pCz-rotatePointZ);
153     #local pCy_new = rotatePointY + A21 * (pCx-rotatePointX) + A22 * (pCy-rotatePointY) + A23 * (pCz-rotatePointZ);
154     #local pCz_new = rotatePointZ + A31 * (pCx-rotatePointX) + A32 * (pCy-rotatePointY) + A33 * (pCz-rotatePointZ);
155    
156     #local pDx_new = rotatePointX + A11 * (pDx-rotatePointX) + A12 * (pDy-rotatePointY) + A13 * (pDz-rotatePointZ);
157     #local pDy_new = rotatePointY + A21 * (pDx-rotatePointX) + A22 * (pDy-rotatePointY) + A23 * (pDz-rotatePointZ);
158     #local pDz_new = rotatePointZ + A31 * (pDx-rotatePointX) + A32 * (pDy-rotatePointY) + A33 * (pDz-rotatePointZ);
159    
160     #local pEx_new = rotatePointX + A11 * (pEx-rotatePointX) + A12 * (pEy-rotatePointY) + A13 * (pEz-rotatePointZ);
161     #local pEy_new = rotatePointY + A21 * (pEx-rotatePointX) + A22 * (pEy-rotatePointY) + A23 * (pEz-rotatePointZ);
162     #local pEz_new = rotatePointZ + A31 * (pEx-rotatePointX) + A32 * (pEy-rotatePointY) + A33 * (pEz-rotatePointZ);
163    
164     #local pFx_new = rotatePointX + A11 * (pFx-rotatePointX) + A12 * (pFy-rotatePointY) + A13 * (pFz-rotatePointZ);
165     #local pFy_new = rotatePointY + A21 * (pFx-rotatePointX) + A22 * (pFy-rotatePointY) + A23 * (pFz-rotatePointZ);
166     #local pFz_new = rotatePointZ + A31 * (pFx-rotatePointX) + A32 * (pFy-rotatePointY) + A33 * (pFz-rotatePointZ);
167    
168     #local pGx_new = rotatePointX + A11 * (pGx-rotatePointX) + A12 * (pGy-rotatePointY) + A13 * (pGz-rotatePointZ);
169     #local pGy_new = rotatePointY + A21 * (pGx-rotatePointX) + A22 * (pGy-rotatePointY) + A23 * (pGz-rotatePointZ);
170     #local pGz_new = rotatePointZ + A31 * (pGx-rotatePointX) + A32 * (pGy-rotatePointY) + A33 * (pGz-rotatePointZ);
171    
172     #local pHx_new = rotatePointX + A11 * (pHx-rotatePointX) + A12 * (pHy-rotatePointY) + A13 * (pHz-rotatePointZ);
173     #local pHy_new = rotatePointY + A21 * (pHx-rotatePointX) + A22 * (pHy-rotatePointY) + A23 * (pHz-rotatePointZ);
174     #local pHz_new = rotatePointZ + A31 * (pHx-rotatePointX) + A32 * (pHy-rotatePointY) + A33 * (pHz-rotatePointZ);
175    
176     #else
177     #local pAx_new = pAx; #local pAy_new = pAy; #local pAz_new = pAz;
178     #local pBx_new = pBx; #local pBy_new = pBy; #local pBz_new = pBz;
179     #local pCx_new = pCx; #local pCy_new = pCy; #local pCz_new = pCz;
180     #local pDx_new = pDx; #local pDy_new = pDy; #local pDz_new = pDz;
181     #local pEx_new = pEx; #local pEy_new = pEy; #local pEz_new = pEz;
182     #local pFx_new = pFx; #local pFy_new = pFy; #local pFz_new = pFz;
183     #local pGx_new = pGx; #local pGy_new = pGy; #local pGz_new = pGz;
184     #local pHx_new = pHx; #local pHy_new = pHy; #local pHz_new = pHz;
185     #end
186     #local pAx = pAx_new; #local pAy = pAy_new; #local pAz = pAz_new;
187     #local pBx = pBx_new; #local pBy = pBy_new; #local pBz = pBz_new;
188     #local pCx = pCx_new; #local pCy = pCy_new; #local pCz = pCz_new;
189     #local pDx = pDx_new; #local pDy = pDy_new; #local pDz = pDz_new;
190     #local pEx = pEx_new; #local pEy = pEy_new; #local pEz = pEz_new;
191     #local pFx = pFx_new; #local pFy = pFy_new; #local pFz = pFz_new;
192     #local pGx = pGx_new; #local pGy = pGy_new; #local pGz = pGz_new;
193     #local pHx = pHx_new; #local pHy = pHy_new; #local pHz = pHz_new;
194     #local colorR = 0.90;
195     #local colorG = 0.91;
196     #local colorB = 0.98;
197    
198     #local pipeWidth = 0.4;
199    
200     // 1
201     cylinder{
202     < pAx, pAy, pAz >,
203     < pBx, pBy, pBz >,
204     pipeWidth
205     texture{
206     pigment{ rgb < colorR, colorG, colorB > }
207     finish{
208     ambient .2
209     diffuse .6
210     specular 1
211     roughness .001
212     metallic
213     }
214     }
215     }
216    
217     // 2
218     cylinder{
219     < pAx, pAy, pAz >,
220     < pCx, pCy, pCz >,
221     pipeWidth
222     texture{
223     pigment{ rgb < colorR, colorG, colorB > }
224     finish{
225     ambient .2
226     diffuse .6
227     specular 1
228     roughness .001
229     metallic
230     }
231     }
232     }
233    
234     // 3
235     cylinder{
236     < pAx, pAy, pAz >,
237     < pDx, pDy, pDz >,
238     pipeWidth
239     texture{
240     pigment{ rgb < colorR, colorG, colorB > }
241     finish{
242     ambient .2
243     diffuse .6
244     specular 1
245     roughness .001
246     metallic
247     }
248     }
249     }
250    
251     // 4
252     cylinder{
253     < pBx, pBy, pBz >,
254     < pEx, pEy, pEz >,
255     pipeWidth
256     texture{
257     pigment{ rgb < colorR, colorG, colorB > }
258     finish{
259     ambient .2
260     diffuse .6
261     specular 1
262     roughness .001
263     metallic
264     }
265     }
266     }
267    
268     // 5
269     cylinder{
270     < pCx, pCy, pCz >,
271     < pEx, pEy, pEz >,
272     pipeWidth
273     texture{
274     pigment{ rgb < colorR, colorG, colorB > }
275     finish{
276     ambient .2
277     diffuse .6
278     specular 1
279     roughness .001
280     metallic
281     }
282     }
283     }
284    
285     // 6
286     cylinder{
287     < pBx, pBy, pBz >,
288     < pFx, pFy, pFz >,
289     pipeWidth
290     texture{
291     pigment{ rgb < colorR, colorG, colorB > }
292     finish{
293     ambient .2
294     diffuse .6
295     specular 1
296     roughness .001
297     metallic
298     }
299     }
300     }
301    
302     // 7
303     cylinder{
304     < pCx, pCy, pCz >,
305     < pGx, pGy, pGz >,
306     pipeWidth
307     texture{
308     pigment{ rgb < colorR, colorG, colorB > }
309     finish{
310     ambient .2
311     diffuse .6
312     specular 1
313     roughness .001
314     metallic
315     }
316     }
317     }
318    
319     // 8
320     cylinder{
321     < pDx, pDy, pDz >,
322     < pGx, pGy, pGz >,
323     pipeWidth
324     texture{
325     pigment{ rgb < colorR, colorG, colorB > }
326     finish{
327     ambient .2
328     diffuse .6
329     specular 1
330     roughness .001
331     metallic
332     }
333     }
334     }
335    
336     // 9
337     cylinder{
338     < pDx, pDy, pDz >,
339     < pFx, pFy, pFz >,
340     pipeWidth
341     texture{
342     pigment{ rgb < colorR, colorG, colorB > }
343     finish{
344     ambient .2
345     diffuse .6
346     specular 1
347     roughness .001
348     metallic
349     }
350     }
351     }
352    
353     // 10
354     cylinder{
355     < pEx, pEy, pEz >,
356     < pHx, pHy, pHz >,
357     pipeWidth
358     texture{
359     pigment{ rgb < colorR, colorG, colorB > }
360     finish{
361     ambient .2
362     diffuse .6
363     specular 1
364     roughness .001
365     metallic
366     }
367     }
368     }
369    
370     // 11
371     cylinder{
372     < pFx, pFy, pFz >,
373     < pHx, pHy, pHz >,
374     pipeWidth
375     texture{
376     pigment{ rgb < colorR, colorG, colorB > }
377     finish{
378     ambient .2
379     diffuse .6
380     specular 1
381     roughness .001
382     metallic
383     }
384     }
385     }
386    
387     // 12
388     cylinder{
389     < pGx, pGy, pGz >,
390     < pHx, pHy, pHz >,
391     pipeWidth
392     texture{
393     pigment{ rgb < colorR, colorG, colorB > }
394     finish{
395     ambient .2
396     diffuse .6
397     specular 1
398     roughness .001
399     metallic
400     }
401     }
402     }
403    
404     #end
405    
406    
407     //****************************************************
408     // DEFINE GBDPPCt MACROS
409     //****************************************************
410    
411     #macro make_GBDPPCt_bond (end_1x, end_1y, end_1z, end_2x, end_2y, end_2z)
412    
413     #local x1 = end_1x;
414     #local y1 = end_1y;
415     #local z1 = end_1z;
416     #local x2 = end_2x;
417     #local y2 = end_2y;
418     #local z2 = end_2z;
419    
420     #if(ROTATE)
421     #local x1_new = rotatePointX + A11 * (x1-rotatePointX) + A12 * (y1-rotatePointY) + A13 * (z1-rotatePointZ);
422     #local y1_new = rotatePointY + A21 * (x1-rotatePointX) + A22 * (y1-rotatePointY) + A23 * (z1-rotatePointZ);
423     #local z1_new = rotatePointZ + A31 * (x1-rotatePointX) + A32 * (y1-rotatePointY) + A33 * (z1-rotatePointZ);
424    
425     #local x2_new = rotatePointX + A11 * (x2-rotatePointX) + A12 * (y2-rotatePointY) + A13 * (z2-rotatePointZ);
426     #local y2_new = rotatePointY + A21 * (x2-rotatePointX) + A22 * (y2-rotatePointY) + A23 * (z2-rotatePointZ);
427     #local z2_new = rotatePointZ + A31 * (x2-rotatePointX) + A32 * (y2-rotatePointY) + A33 * (z2-rotatePointZ);
428    
429     #else
430     #local x1_new = x1; #local y1_new = y1; #local z1_new = z1;
431     #local x2_new = x2; #local y2_new = y2; #local z2_new = z2;
432     #end
433    
434     cylinder{
435     < x1_new, y1_new, z1_new >,
436     < x2_new, y2_new, z2_new >,
437     BOND_RADIUS
438     texture{
439     pigment{ rgb < 1.000000, 0.078431, 0.576471 > }
440     finish{
441     ambient .2
442     diffuse .6
443     specular 1
444     roughness .001
445     metallic
446     }
447     }
448     }
449     #end
450     #macro make_GBDPPCt_atom (center_x, center_y, center_z)
451    
452     #local x1 = center_x;
453     #local y1 = center_y;
454     #local z1 = center_z;
455    
456     #if(ROTATE)
457    
458     #local x1_new = rotatePointX + A11 * (x1-rotatePointX) + A12 * (y1-rotatePointY) + A13 * (z1-rotatePointZ);
459     #local y1_new = rotatePointY + A21 * (x1-rotatePointX) + A22 * (y1-rotatePointY) + A23 * (z1-rotatePointZ);
460     #local z1_new = rotatePointZ + A31 * (x1-rotatePointX) + A32 * (y1-rotatePointY) + A33 * (z1-rotatePointZ);
461    
462     #else
463    
464     #local x1_new = x1; #local y1_new = y1; #local z1_new = z1;
465     #end
466    
467     sphere{
468     < x1_new, y1_new, z1_new >,
469     ATOM_SPHERE_FACTOR * 10.000000
470     texture{
471     pigment{ rgb < 1.000000, 0.078431, 0.576471 > }
472     finish{
473     ambient .2
474     diffuse .6
475     specular 1
476     roughness .001
477     metallic
478     }
479     }
480     }
481     #end
482     #macro make_GBDPPCt_ellipse (center_x, center_y, center_z, ecc, u_x, u_y, u_z)
483    
484     #local x1 = center_x;
485     #local y1 = center_y;
486     #local z1 = center_z;
487     #local x2 = u_x;
488     #local y2 = u_y;
489     #local z2 = u_z;
490    
491     #if(ROTATE)
492    
493     #local x1_new = rotatePointX + A11 * (x1-rotatePointX) + A12 * (y1-rotatePointY) + A13 * (z1-rotatePointZ);
494     #local y1_new = rotatePointY + A21 * (x1-rotatePointX) + A22 * (y1-rotatePointY) + A23 * (z1-rotatePointZ);
495     #local z1_new = rotatePointZ + A31 * (x1-rotatePointX) + A32 * (y1-rotatePointY) + A33 * (z1-rotatePointZ);
496    
497     #local x2_new = rotatePointX + A11 * (x2-rotatePointX) + A12 * (y2-rotatePointY) + A13 * (z2-rotatePointZ);
498     #local y2_new = rotatePointY + A21 * (x2-rotatePointX) + A22 * (y2-rotatePointY) + A23 * (z2-rotatePointZ);
499     #local z2_new = rotatePointZ + A31 * (x2-rotatePointX) + A32 * (y2-rotatePointY) + A33 * (z2-rotatePointZ);
500    
501     #else
502    
503     #local x1_new = x1; #local y1_new = y1; #local z1_new = z1;
504     #local x2_new = x2; #local y2_new = y2; #local z2_new = z2;
505     #end
506    
507     #local myUlen = sqrt(x2_new*x2_new + y2_new*y2_new + z2_new*z2_new);
508     #local uux = x2_new / myUlen;
509     #local uuy = y2_new / myUlen;
510     #local uuz = z2_new / myUlen;
511     #local myTheta = degrees(acos(uuz));
512     #local myPsi = -degrees(atan(uux/uuy));
513     #local myScale = ATOM_SPHERE_FACTOR * 10.000000;
514    
515     sphere{
516     < 0, 0, 0 >, 1
517     texture{
518     pigment{
519     average
520     pigment_map{
521     [1.0 grad1]
522     [1.0 grad2]
523     [1.0 grad3]
524     [5.0 gradz]
525     }
526     }
527     finish{
528     ambient .2
529     diffuse .6
530     specular 1
531     roughness .001
532     metallic
533     }
534     }
535     scale<myScale,myScale,ecc*myScale>
536     rotate<myTheta,0,myPsi>
537     translate< x1_new, y1_new, z1_new>
538     }
539     #end
540     #macro make_GBDPPCt_shaded_ellipse (center_x, center_y, center_z, ecc, u_x, u_y, u_z, v_x, v_y, v_z)
541    
542     #local x1 = center_x;
543     #local y1 = center_y;
544     #local z1 = center_z;
545     #local x2 = u_x;
546     #local y2 = u_y;
547     #local z2 = u_z;
548     #local x3 = v_x;
549     #local y3 = v_y;
550     #local z3 = v_z;
551    
552     #if(ROTATE)
553    
554     #local x1_new = rotatePointX + A11 * (x1-rotatePointX) + A12 * (y1-rotatePointY) + A13 * (z1-rotatePointZ);
555     #local y1_new = rotatePointY + A21 * (x1-rotatePointX) + A22 * (y1-rotatePointY) + A23 * (z1-rotatePointZ);
556     #local z1_new = rotatePointZ + A31 * (x1-rotatePointX) + A32 * (y1-rotatePointY) + A33 * (z1-rotatePointZ);
557    
558     #local x2_new = rotatePointX + A11 * (x2-rotatePointX) + A12 * (y2-rotatePointY) + A13 * (z2-rotatePointZ);
559     #local y2_new = rotatePointY + A21 * (x2-rotatePointX) + A22 * (y2-rotatePointY) + A23 * (z2-rotatePointZ);
560     #local z2_new = rotatePointZ + A31 * (x2-rotatePointX) + A32 * (y2-rotatePointY) + A33 * (z2-rotatePointZ);
561    
562     #local x3_new = rotatePointX + A11 * (x3-rotatePointX) + A12 * (y3-rotatePointY) + A13 * (z3-rotatePointZ);
563     #local y3_new = rotatePointY + A21 * (x3-rotatePointX) + A22 * (y3-rotatePointY) + A23 * (z3-rotatePointZ);
564     #local z3_new = rotatePointZ + A31 * (x3-rotatePointX) + A32 * (y3-rotatePointY) + A33 * (z3-rotatePointZ);
565    
566     #else
567    
568     #local x1_new = x1; #local y1_new = y1; #local z1_new = z1;
569     #local x2_new = x2; #local y2_new = y2; #local z2_new = z2;
570     #local x3_new = x3; #local y3_new = y3; #local z3_new = z3;
571     #end
572    
573     #local myUlen = sqrt(x2_new*x2_new + y2_new*y2_new + z2_new*z2_new);
574     #local uux = x2_new / myUlen;
575     #local uuy = y2_new / myUlen;
576     #local uuz = z2_new / myUlen;
577     #local myVlen = sqrt(x3_new*x3_new + y3_new*y3_new + z3_new*z3_new);
578     #local vvx = x3_new / myVlen;
579     #local vvy = y3_new / myVlen;
580     #local vvz = z3_new / myVlen;
581    
582     #local myTheta = degrees(acos(uuz));
583     #local myPsi = -degrees(atan(uux/uuy));
584     #local myPhi = degrees(acos(vvz));
585     #local myScale = ATOM_SPHERE_FACTOR * 10.000000;
586    
587     sphere{
588     < 0, 0, 0 >, 1
589     texture{
590     pigment{
591     average
592     pigment_map{
593     [1.0 grad1]
594     [1.0 grad2]
595     [1.0 grad3]
596     [5.0 gradz]
597     }
598     }
599     finish{
600     ambient .2
601     diffuse .6
602     specular 1
603     roughness .001
604     metallic
605     }
606     }
607     scale<myScale,myScale,ecc*myScale>
608     rotate<myTheta,myPhi,myPsi>
609     translate< x1_new, y1_new, z1_new>
610     }
611     #end
612     #macro make_GBDPPCt_vector (center_x, center_y, center_z, ux, uy, uz)
613    
614     #local vx = VECTOR_SCALE * ux;
615     #local vy = VECTOR_SCALE * uy;
616     #local vz = VECTOR_SCALE * uz;
617     #local x1 = center_x - 0.5 * vx;
618     #local y1 = center_y - 0.5 * vy;
619     #local z1 = center_z - 0.5 * vz;
620     #local x2 = center_x + 0.5 * vx;
621     #local y2 = center_y + 0.5 * vy;
622     #local z2 = center_z + 0.5 * vz;
623     #local v2 = vx*vx + vy*vy + vz*vz;
624     #local vl = sqrt(v2);
625     #local x3 = x1 + vx * (1.0 - CONE_FRACTION);
626     #local y3 = y1 + vy * (1.0 - CONE_FRACTION);
627     #local z3 = z1 + vz * (1.0 - CONE_FRACTION);
628    
629     #if(ROTATE)
630     #local x1_new = rotatePointX + A11 * (x1-rotatePointX) + A12 * (y1-rotatePointY) + A13 * (z1-rotatePointZ);
631     #local y1_new = rotatePointY + A21 * (x1-rotatePointX) + A22 * (y1-rotatePointY) + A23 * (z1-rotatePointZ);
632     #local z1_new = rotatePointZ + A31 * (x1-rotatePointX) + A32 * (y1-rotatePointY) + A33 * (z1-rotatePointZ);
633    
634     #local x2_new = rotatePointX + A11 * (x2-rotatePointX) + A12 * (y2-rotatePointY) + A13 * (z2-rotatePointZ);
635     #local y2_new = rotatePointY + A21 * (x2-rotatePointX) + A22 * (y2-rotatePointY) + A23 * (z2-rotatePointZ);
636     #local z2_new = rotatePointZ + A31 * (x2-rotatePointX) + A32 * (y2-rotatePointY) + A33 * (z2-rotatePointZ);
637    
638     #local x3_new = rotatePointX + A11 * (x3-rotatePointX) + A12 * (y3-rotatePointY) + A13 * (z3-rotatePointZ);
639     #local y3_new = rotatePointY + A21 * (x3-rotatePointX) + A22 * (y3-rotatePointY) + A23 * (z3-rotatePointZ);
640     #local z3_new = rotatePointZ + A31 * (x3-rotatePointX) + A32 * (y3-rotatePointY) + A33 * (z3-rotatePointZ);
641    
642     #else
643     #local x1_new = x1; #local y1_new = y1; #local z1_new = z1;
644     #local x2_new = x2; #local y2_new = y2; #local z2_new = z2;
645     #local x3_new = x3; #local y3_new = y3; #local z3_new = z3;
646     #end
647    
648     cylinder{
649     < x1_new, y1_new, z1_new >,
650     < x3_new, y3_new, z3_new >,
651     STICK_RADIUS
652     texture{
653     pigment{ rgb < 1.000000, 0.078431, 0.576471 > }
654     finish{
655     ambient .2
656     diffuse .6
657     specular 1
658     roughness .001
659     metallic
660     }
661     }
662     }
663     cone{
664     < x2_new, y2_new, z2_new >, 0.0
665     < x3_new, y3_new, z3_new >, CONE_RADIUS
666     texture{
667     pigment{ rgb < 1.000000, 0.078431, 0.576471 > }
668     finish{
669     ambient .2
670     diffuse .6
671     specular 1
672     roughness .001
673     metallic
674     }
675     }
676     }
677     #end
678    
679