/* Persistence of Vision Ray Tracer Scene Description File File: H_Wave_Functions v4_1.pov Version: 3.5 Date: 15 januari 2003 Author: Jaap Frank Desc: With media one can display the various wave functions of Hydrogen. In this version the derivatives are generated by functions and can in principle be expanded for all values for n. The function that discribes all the wavefunctions of hydrogen is: r l+1 - - { v } 2 l n k { v ( n+l ) 1 ( 2r ) } U = U (r) = -------------------------- . r . e . Sigma { (-1) . ( ) . - . ( -- ) } ,with: k = n-l-1 n,l __________________ v=0 { ( k-v ) v! ( n ) } l+2 / ( n+l ) n . / (2l+1)! . ( ) V ( k ) ______________ m { l ( ) } m m /2l+1 (l-m)! imPhi m d { 1 d ( 2 l ) } Y = Y (Theta,Phi) = (-1) . / ---- . ------ . e . sin (Theta) . --- { ------ . --- ( [µ - 1] ) } , with µ = cos(Theta) l V 4Pi (l+m)! m { l l ( ) } dµ { 2 * l! dµ ( ) } Psi = U * Y Prob = 4.pi.r^2.Psi^2 */ //------------ Do not change !!!! -------------------------------------------------------------------------------------- #declare Low = 1; #declare Medium = 2; #declare High = 3; //Declarations needed below. //---------------------------------------------------------------------------------------------------------------------- #version 3.5; // ***************** Variables to change ************************************************************************************* // Quantum numbers of Wave Function #declare n = 2; // n = 1, 2, .. , 10 #declare l = 1; // l = n-1. n-2, .. , 0 #declare m = -1; // m = -l, -l+1, .. , l-1, l // Probability or Wave Function #declare Prob = on; // off; // // Switch between Probability and Wave function. // Visible Density (Probability Function only) #declare Dens = Medium; // Low; // High; // // Switch low and medium density parts of the Probability cloud on/off. // Toggle Cross section on/off #declare Cross = off; // on; // // on = Cross section of electron cloud. Always perpendicular to view. #declare Thick = 5; //10; //2; // // Percentage of Radius for cross section. #declare Shift = 0; // If Cross=0n; -100% .. 0% .. 100%; shifts Cross-section forward or backward. // Be aware that you get three different cross sections if you use Multiple. // Intensity of cloud #declare Intens = 1.0; //0.5; // 1.5; //2; // // Regulates the emission of the cloud. Default=1.0. Mainly meant for Cross. #declare Absorb = 0.25; //0.5; //0.75; //0; // // Absorption of the cloud. Bigger values give deeper look. // 0: mainly surface, 0.25: Higher density is visible (default), // 0.5: Good inner look, 0.75: Gives sometimes inner structure. // Toggle Numbers and Axis on/off #declare Axis = on; // off; // // Toggles axis on/off. #declare Numbers = off; // on; // // Toggle numbers on axis on/off. // Rotate Total Structure (including Axis/Numbers) #declare RotX = 0; // Rotations of cloud and axis. Don't change camera, but only this, #declare RotY = 0; // because labels and cross-section are counter-rotated #declare RotZ = 0; // to hold them in view. #declare RotX2 = 0; // Expand or thrink the cloud // With higher values of n the volume of the cloud depends strongly #declare Exp = 1.0; // on the value of l. ('Exp' actually changes the container radius // by dividing the radius with 'Exp'.) // Toggle Multiple/single view on/off #declare Multiple = on; // off; // // Switch between single (Front) or multiple view (Top, Front, Side). // Toggle quality of media #declare Qual = off; // on; // // With quality on the trace time more than triples, // but it is much more accurate. // Toggle Perspective/Orthographic camera #declare Pers = on; // off; // // Toggle between perspective or orthographic camera. // **************** End of Variables to change ********************************************************************************** //++++++++++++++++++++++++++++++++ Do NOT change the rest of the file +++++++++++++++++++++++++++++++++++++++++++++++++++++ #if ((n>10)|(n<1)|(l>=n)|(l<0)|(m<-l)|(m>l)) // Check if numbers are in range. #error "Quantum numbers out of range !!!!!" #end #if (Cross) #declare Intensity = 1*Intens; // Switch intensity of emission. #if (Shift<-100) #declare Shift = -100; #end // Limit variables #if (Shift>+100) #declare Shift = +100; #end #if (Thick<1) #declare Thick = 1; #end #if (Thick>100) #declare Thick = 100; #end #else #declare Intensity = 0.15*Intens; // Switch intensity of emission. #end #switch (n) // Switch container radius for electron cloud. #case (1) #declare Radius = 7.1/Exp; #break #case (2) #declare Radius = 17/Exp; #break #case (3) #declare Radius = 30/Exp; #break #case (4) #declare Radius = 50/Exp; #break #case (5) #declare Radius = 70/Exp; #break #case (6) #declare Radius = 90/Exp; #break #case (7) #declare Radius = 115/Exp; #break #case (8) #declare Radius = 140/Exp; #break #case (9) #declare Radius = 165/Exp; #break #case (10) #declare Radius = 190/Exp; #break #end #declare Trans = transform{ rotate RotX*x rotate RotY*y rotate RotZ*z rotate RotX2*x } #declare StrN = concat("n = ",str(n,1,0)); #declare StrL = concat("l = ",str(l,1,0)); #declare StrM = concat("m = ",str(m,1,0)); #switch (Dens) #case (Low) #declare StrDens = "Low"; #break #case (Medium) #declare StrDens = "Medium"; #break #case (High) #declare StrDens = "High"; #break #end #declare StrT = str(n,0,0); #if (l=0) #declare StrT = concat(StrT,"s"); #end #if (l=1) #declare StrT = concat(StrT,"p"); #end #if (l=2) #declare StrT = concat(StrT,"d"); #end #if (l=3) #declare StrT = concat(StrT,"f"); #end #if (l=4) #declare StrT = concat(StrT,"g"); #end #if (l=5) #declare StrT = concat(StrT,"h"); #end #if (l=6) #declare StrT = concat(StrT,"i"); #end #if (l=7) #declare StrT = concat(StrT,"j"); #end #if (l=8) #declare StrT = concat(StrT,"k"); #end #if (l=9) #declare StrT = concat(StrT,"l"); #end #include "functions.inc" //---------------------------------------------------------------------------------------------------------------------------------- // p! = p.(p-1).(p-2) .. .3.2.1 #declare Fac = function(Val){select(Val,1,1,prod(i, 1, Val, i))} //---------------------------------------------------------------------------------------------------------------------------------- /* ( p ) p! ( ) = -------- ( q ) q!(p-q)! */ #declare Binom = function(P, Q) { Fac(P)/Fac(Q)/Fac(P - Q) } //---------------------------------------------------------------------------------------------------------------------------------- /* 1 l [ p ( l ) l+m-1 { } 2(l-p)-(l+m) ] ------- . Sigma [ (-1) . ( ) . Tau { (2(l-p)-q) } . µ ] , with µ = cos(Theta) and |m| !! l p=0 [ ( p ) q=0 { } ] 2 * l! Derivative = 1 /2^l /Fac(l) * SUM(p=0 -> l) { (-1)^p*Binom(l, p)* PRODUCT(q=0 -> l+m-1) [2(l-p)-q] * µ^(2(l-p)-(l+m)) } = Constant(l) * SUM(p=0 -> l) { Constant(l,m,p) * µ^(2(l-p)-(l+m)) } = SUM(p=0 -> l) { Constant(l) * Constant(l,m,p) * µ^(2(l-p)-(l+m)) } = SUM(p=0 -> l) { Constant_(l,m,p) * µ^(l-2p-m) } */ #macro Product(L, absM, P) #local Prod = 1; #local Q = 0; #while (Q <= L + absM - 1) #local Prod = Prod*(2*(L - P) - Q); #local Q = Q + 1; #end // while Prod #end // macro Product #macro DerivateFunction(L, M) #if (L = 0) #local DerFn = function { 1 } #else #local absM = abs(M); #local ConstL = 1/pow(2, L)/Fac(L); #local DerFn = function { #local P = 0; #while (P <= L) #local ConstLMP = ConstL*pow(-1, P)*Binom(L, P)*Product(L, absM, P); #local EE = L - 2*P - absM; #if (EE >= 0) + ConstLMP*pow(x/f_r(x, y, z), EE) #end // if #local P = P + 1; #end // while } #end // if function { DerFn(x, y, z) } #end // macro DerivateFunction //---------------------------------------------------------------------------------------------------------------------------------- // Sigma_n_l = SUM(v=0 -> k) {Binom(n+l,k-v)/Fac(v)*(-2r/n)^v} // = 2^0/(0!.n^0).Binom(n+l,k-0).r^0 + // - 2^1/(1!.n^1).Binom(n+l,k-1).r^1 + // + 2^2/(2!.n^2).Binom(n+l,k-2).r^2 + // - 2^3/(3!.n^3).Binom(n+l,k-3).r^3 + ..... #macro SigmaFunction(N, L) #local K = N - L - 1; #local SumFn = function(x, y, z, R) { #local V = 0; #while (V <= K) #local CS = Binom(N + L, K - V)/Fac(V)*pow(-2/N, V); + CS*pow(R, V) #local V = V + 1; #end // while } function { SumFn(x, y, z, f_r(x, y, z)) } #end // macro SigmaFunction //---------------------------------------------------------------------------------------------------------------------------------- #macro Exp_imPhiFunction(M) #local absM = abs(M); function { #if (absM <= 0) 1 #else cos(absM*atan2(y, z)) + m/abs(m)*sin(absM*atan2(y, z)) // #end // if } #end // macro Exp_imPhiFunction //---------------------------------------------------------------------------------------------------------------------------------- #declare Derivative = DerivateFunction(l, m) #declare Sigma_n_l = SigmaFunction(n, l) #declare Exp_imPhi = Exp_imPhiFunction(m) #declare abs_m = abs(m); #declare C_U = pow(2, l + 1) / pow(n, l + 2) / sqrt( Fac(2*l + 1)*Binom(n + l, n - l - 1) ); #declare C_Y = pow(-1, abs_m) * sqrt( (2*l + 1)/4/pi * Fac(l - abs_m)/Fac(l + abs_m) ); #declare Psi = function { select(f_r(x, y, z), 0, 0, // To prevent division by zero errors C_U*pow(f_r(x, y, z), l) / exp(f_r(x, y, z)/n) * Sigma_n_l(x,y,z) *C_Y*Exp_imPhi(x, y, z) * pow(f_r(0, y, z)/f_r(x, y, z), abs_m) * Derivative(x, y, z) ) } #if (Prob) #declare Func = function { 4*pi*(x*x + y*y + z*z)*pow(Psi(x, y, z), 2) } #else #declare Func = function { Psi(x, y, z) + 0.5 } #end // // -------------------------------------------------------------------------------------------------------------------- #macro ColorMap () #if (Prob) [0.00 rgb <0.0, 0.0, 0.0>] #if (Dens=Low) // Color_map for Low density [0.001 rgb <0.4, 0.0, 0.0>] [0.003 rgb <0.5, 0.1, 0.0>] [0.005 rgb <0.6, 0.2, 0.0>] [0.01 rgb <0.7, 0.3, 0.0>] [0.015 rgb <0.7, 0.7, 0.0>] [0.02 rgb <0.0, 0.7, 0.0>] [0.03 rgb <0.0, 0.0, 0.7>] [0.05 rgb <0.0, 0.4, 0.7>] [0.07 rgb <0.0, 0.7, 0.7>] [0.50 rgb <0.7, 0.7, 0.7>] [0.75 rgb <0.7, 0.7, 0.7>] [1.00 rgb <1.0, 0.7, 0.7>] #else #if (Dens = Medium) // Color_map for Medium density. [0.01 rgb <0.0, 0.0, 0.0>] [0.015 rgb <0.7, 0.7, 0.0>] [0.02 rgb <0.0, 0.7, 0.0>] [0.03 rgb <0.0, 0.0, 0.7>] [0.05 rgb <0.0, 0.4, 0.7>] [0.07 rgb <0.0, 0.7, 0.7>] [0.50 rgb <0.7, 0.7, 0.7>] [0.75 rgb <0.7, 0.7, 0.7>] [1.00 rgb <1.0, 0.7, 0.7>] #else //#if (Dens = Medium) // Color_map for High density. [0.05 rgb <0.0, 0.0, 0.0>] [0.07 rgb <0.0, 0.7, 0.7>] [0.50 rgb <0.7, 0.7, 0.7>] [0.75 rgb <0.7, 0.7, 0.7>] [1.00 rgb <1.0, 0.7, 0.7>] #end #end //#if (Dens=Low) #else //#if (Prob) // Color_map for Wavefunction. [0.00 rgb <0.0, 0.0, 0.0>] [0.25 rgb <1.0, 0.0, 0.0>] [0.43 rgb <0.7, 0.7, 0.0>] [0.45 rgb <0.0, 1.0, 0.0>] [0.47 rgb <0.0, 0.7, 0.7>] [0.48 rgb <0.0, 0.0, 1.0>] [0.485 rgb <0.7, 0.0, 0.7>] [0.49 rgb <0.3, 0.7, 0.3>] [0.495 rgb <0.2, 0.1, 0.1>] [0.49999 rgb <0.2, 0.0, 0.0>] [0.50 rgb <0.2, 0.0, 0.0>] [0.50 rgb <0.0, 0.0, 0.1>] [0.50001 rgb <0.0, 0.0, 0.1>] [0.505 rgb <0.0, 0.2, 0.1>] [0.51 rgb <0.7, 0.7, 0.0>] [0.515 rgb <0.0, 1.0, 0.0>] [0.52 rgb <0.0, 0.7, 0.7>] [0.53 rgb <0.0, 0.0, 1.0>] [0.55 rgb <0.7, 0.0, 0.7>] [0.57 rgb <0.3, 0.7, 0.3>] [0.75 rgb <1.0, 0.0, 0.0>] [1.00 rgb <0.3, 0.3, 0.4>] #end //#if (Prob) #end //#macro ColorMap () #macro CreateAxis(Trans,RotView) #if (Axis) #local TransView = transform { rotate RotView } // In order to inverse RotView. cylinder {-Radius*x, Radius*x, 0.004*Radius/5} // x-axis cylinder {-Radius*y, Radius*y, 0.004*Radius/5} // y-axis cylinder {-Radius*z, Radius*z, 0.004*Radius/5} // z-axis text { ttf "crystal.ttf" "x" 0.1, 0 // Create labels scale Radius/10 transform {TransView inverse } transform {Trans inverse } // Counter rotation to keep good visibility. translate < Radius+0.5*Radius/10, -Radius/10, 0> // Translate to position no_shadow } text { ttf "crystal.ttf" "-x" 0.1, 0 scale Radius/10 transform {TransView inverse } transform {Trans inverse } translate < -Radius-Radius/10, -Radius/10, 0> no_shadow } text { ttf "crystal.ttf" "y" 0.1, 0 scale Radius/10 transform {TransView inverse } transform {Trans inverse } translate < -Radius/10, Radius, 0> no_shadow } text { ttf "crystal.ttf" "-y" 0.1, 0 scale Radius/10 transform {TransView inverse } transform {Trans inverse } translate < -1.5*Radius/10, -Radius-0.5*Radius/10, 0> no_shadow } text { ttf "crystal.ttf" "z" 0.1, 0 scale Radius/10 transform {TransView inverse } transform {Trans inverse } translate < -Radius/10, 0, Radius+Radius/10 > no_shadow } text { ttf "crystal.ttf" "-z" 0.1, 0 scale Radius/10 transform {TransView inverse } transform {Trans inverse } translate < -1.5*Radius/10, 0, -Radius-Radius/10 > no_shadow } #declare Count = -floor(Radius); // Initiation #while (Count <= Radius) // Create calibration stripes of axis #if (Count!=0) #if ( ( (Radius< 30) & (mod(Count, 5)=0) ) | ( (Radius< 110) & (mod(Count,10)=0) ) | ( (Radius>=110) & (mod(Count,50)=0) ) ) cylinder {0, 0.2*Radius/5*y, 0.004*Radius/5 transform {TransView inverse } transform {Trans inverse } translate Count*x} cylinder {0, 0.2*Radius/5*x, 0.004*Radius/5 transform {TransView inverse } transform {Trans inverse } translate Count*y} cylinder {0, 0.2*Radius/5*y, 0.004*Radius/5 transform {TransView inverse } transform {Trans inverse } translate Count*z} #if (Numbers) text { ttf "crystal.ttf" str(Count,2,0) 0.1, 0 scale Radius/17.5 transform {TransView inverse } transform {Trans inverse } translate < 0.2*Radius/4, Count, 0> no_shadow } text { ttf "crystal.ttf" str(Count,2,0) 0.1, 0 scale Radius/17.5 transform {TransView inverse } transform {Trans inverse } translate < Count, 0.2*Radius/4, 0> no_shadow } text { ttf "crystal.ttf" str(Count,2,0) 0.1, 0 scale Radius/17.5 transform {TransView inverse } transform {Trans inverse } translate < 0, 0.2*Radius/4, Count> no_shadow } #end //#if (Numbers) #else //if ((Count!=0) & ( ((Radius<10)&(mod(Count,5)=0)) | ((Radius>=10)&(mod(Count,10)=0)) ) ) #if ((Radius<10)&(Count!=0)) cylinder {0,0.1*Radius/5*y,0.004*Radius/5 transform {TransView inverse } transform {Trans inverse } translate Count*x} cylinder {0,0.1*Radius/5*x,0.004*Radius/5 transform {TransView inverse } transform {Trans inverse } translate Count*y} cylinder {0,0.1*Radius/5*y,0.004*Radius/5 transform {TransView inverse } transform {Trans inverse } translate Count*z} #end //#if (Radius<10) #end ////if ((Count!=0) & ( ((Radius<10)&(mod(Count,5)=0)) | ((Radius>=10)&(mod(Count,10)=0)) ) ) #end //#if (Count!=0) #declare Count = Count+1; // Next #end //while (Count <= Radius+1) #end //#if (Axis) #end //#macro CreateAxis() // Create object with density #macro ElectronCloud (Trans,RotView) // Total wave function. // The container #local TransView = transform { rotate RotView } #if (Cross) intersection { // Slize of x*Radius. sphere { 0, Radius} plane {-z, Thick/200*Radius-Shift/100*Radius // Shift Cross-section transform {TransView inverse } transform {Trans inverse } } // Counter rotates with rotations, so plane { z, Thick/200*Radius+Shift/100*Radius transform {TransView inverse } transform {Trans inverse } } // you always look perpendicular at it. #else sphere { 0, Radius // Intersection or sphere is closed at end of macro!!! #end //#if (Cross) pigment { color rgbt <1,1,1,1> } // Transparant container needed interior { media { absorption rgb<1,1,1>*Absorb // Regulates absorption. emission <1,1,1>*Intensity // Regulates emission. #if (Qual) method 3 samples 3,10 intervals 10 #else intervals 1 #end // // Let POV decide how many. density { function{Func(x,y,z)} // Switch functions with n,l and m. color_map { ColorMap () } // color_map depends on Prob or Wave func } //density } //media } //interior hollow on } //object or intersection #end //#macro ElectronCloud #declare TotalObjFront = union { object { ElectronCloud (Trans,<0,0,0>) } // The wave functions CreateAxis(Trans,<0,0,0>) // Front View pigment { color rgb <1,1,1> } finish { ambient 0.9 } transform Trans } //union #if (Multiple = on) #declare TotalObjSide = union { object { ElectronCloud (Trans,<0,90,0>) } // The wave functions CreateAxis(Trans,<0,90,0>) // Side View pigment { color rgb <1,1,1> } finish { ambient 0.9 } transform Trans } //union #declare TotalObjTop = union { object { ElectronCloud (Trans,<-90,0,0>) } // The wave functions CreateAxis(Trans,<-90,0,0>) // Top View pigment { color rgb <1,1,1> } finish { ambient 0.9 } transform Trans } //union object { TotalObjFront scale 0.5 translate < -0.450*Radius, -0.40*Radius, 0> } object { TotalObjSide scale 0.5 rotate <0,90,0> translate < 0.800*Radius, -0.40*Radius, 0> } object { TotalObjTop scale 0.5 rotate <-90,0,0> translate < 0.175*Radius, +0.45*Radius, 0> } text { ttf "crystal.ttf" "Top" 0.1, 0 scale Radius/10 translate < -0.5*Radius, 0.9*Radius, 0> pigment { color rgb <1,1,1> } finish { ambient 0.9 } no_shadow } text { ttf "crystal.ttf" "Front" 0.1, 0 scale Radius/10 translate < -0.95*Radius, 0.1*Radius, 0> pigment { color rgb <1,1,1> } finish { ambient 0.9 } no_shadow } text { ttf "crystal.ttf" "Side" 0.1, 0 scale Radius/10 translate < 1.1*Radius, 0.1*Radius, 0> pigment { color rgb <1,1,1> } finish { ambient 0.9 } no_shadow } #else object { TotalObjFront } #end // Info: Type, n, l, m union { text { ttf "crystal.ttf" StrT 0.1, 0 scale Radius/7 translate < -1.3*Radius, 0.9*Radius, 0> no_shadow } text { ttf "crystal.ttf" str(m,1,0) 0.1, 0 scale Radius/10 translate < -1.3*Radius+Radius/7*(n>=10?1.5:1), 0.9*Radius-0.5*Radius/10, 0> no_shadow } text { ttf "crystal.ttf" StrN 0.1, 0 scale Radius/10 translate < Radius, 0.95*Radius, 0> no_shadow } text { ttf "crystal.ttf" StrL 0.1, 0 scale Radius/10 translate < Radius, 0.95*Radius-Radius/10, 0> no_shadow } text { ttf "crystal.ttf" StrM 0.1, 0 scale Radius/10 translate < Radius, 0.95*Radius-2*Radius/10, 0> no_shadow } pigment { color rgb <1,1,1> } finish { ambient 0.9 } } //union // Calibration of cloud density for Calibration cylinder #if (Prob) #declare Cyl = function{(y/Radius*1.25)*(y/Radius*1.25)} // Quadratic distribution matches cloud distribution better. #else #declare Cyl = function{((y-Radius/2.5)/Radius*1.25)*abs((y-Radius/2.5)/Radius*1.25)*2+0.5} // Zero in middle of cylinder. #end // Calibration cylinder union { cylinder { <0, 0, 0>, <0, Radius/1.25, 0>, Radius/15 pigment { color rgbt <1,1,1,1> } interior { media { absorption rgb<1,1,1>*Absorb // Regulates absorption emission <1,1,1>*(Intensity<0.5?Intensity*2:Intensity*0.7)*(25/Radius+sqrt(Radius)/50) // Regulates emission intervals 1 // Let POV decide how many. density { function{Cyl(x,y,z)} color_map { ColorMap () } //color_map } //density } //media } //interior translate <-1.33*Radius, -Radius/2.5, 0> hollow on } //cylinder union { // Calibration labels and cylinder { <-1.33*Radius, Radius/2.5, 0>, <-1.33*Radius, Radius/2.5+Radius/100, 0>, Radius/15 } // type texts. cylinder { <-1.33*Radius, -Radius/2.5, 0>, <-1.33*Radius, -Radius/2.5-Radius/100, 0>, Radius/15 } #if (Prob) text { ttf "crystal.ttf" "1.00" 0.1, 0 scale Radius/10 translate <-1.33*Radius+Radius/15, Radius/2.5, 0> no_shadow } text { ttf "crystal.ttf" "0.75" 0.1, 0 scale Radius/10 translate <-1.33*Radius+Radius/15, (0.5*sqrt(3)-0.5)*Radius/2.5, 0> no_shadow } text { ttf "crystal.ttf" "0.10" 0.1, 0 scale Radius/10 translate <-1.33*Radius+Radius/15, (0.1*sqrt(10)-0.5)*Radius/2.5, 0> no_shadow } text { ttf "crystal.ttf" "0.00" 0.1, 0 scale Radius/10 translate <-1.33*Radius+Radius/15, -Radius/2.5-0.75*Radius/10, 0> no_shadow } text { ttf "crystal.ttf" StrDens 0.1, 0 scale Radius/15 translate <-1.33*Radius-Radius/15, Radius*0.4+Radius/10, 0> no_shadow } text { ttf "crystal.ttf" "Probability" 0.1, 0 scale Radius/15 translate <-1.33*Radius-Radius/15, -Radius*0.7, 0> no_shadow } text { ttf "crystal.ttf" "Distribution" 0.1, 0 scale Radius/15 translate <-1.33*Radius-Radius/15, -Radius*0.7-Radius/10, 0> no_shadow } #else //#if (Prob) text { ttf "crystal.ttf" "+0.50" 0.1, 0 scale Radius/10 translate <-1.33*Radius+Radius/15, Radius/2.5, 0> no_shadow } text { ttf "crystal.ttf" "+0.25" 0.1, 0 scale Radius/10 translate <-1.33*Radius+Radius/15, 0.1*sqrt(50)*Radius/2.5, 0> no_shadow } text { ttf "crystal.ttf" "+0.10" 0.1, 0 scale Radius/10 translate <-1.33*Radius+Radius/15, 0.1*sqrt(20)*Radius/2.5, 0> no_shadow } text { ttf "crystal.ttf" "-0.10" 0.1, 0 scale Radius/10 translate <-1.33*Radius+Radius/15, -0.1*sqrt(20)*Radius/2.5, 0> no_shadow } text { ttf "crystal.ttf" "-0.25" 0.1, 0 scale Radius/10 translate <-1.33*Radius+Radius/15, -0.1*sqrt(50)*Radius/2.5, 0> no_shadow } text { ttf "crystal.ttf" "-0.50" 0.1, 0 scale Radius/10 translate <-1.33*Radius+Radius/15, -Radius/2.5-0.75*Radius/10, 0> no_shadow } text { ttf "crystal.ttf" "Wave" 0.1, 0 scale Radius/15 translate <-1.33*Radius-Radius/15, -Radius*0.7, 0> no_shadow } text { ttf "crystal.ttf" "Function" 0.1, 0 scale Radius/15 translate <-1.33*Radius-Radius/15, -Radius*0.7-Radius/10, 0> no_shadow } #end //#if (Prob) #if (Cross) // text { ttf "crystal.ttf" "Cross-section" 0.1, 0 scale Radius/15 text { ttf "crystal.ttf" concat("Shift = ",str(Shift,1,0)," %") 0.1, 0 scale Radius/15 translate <-1.33*Radius-Radius/15, -Radius*0.7-2*Radius/10, 0> no_shadow } text { ttf "crystal.ttf" concat("Cross-section = ",str(Thick,1,0)," %") 0.1, 0 scale Radius/15 translate <-1.33*Radius-Radius/15, -Radius*0.7-3*Radius/10, 0> no_shadow } #end //#if (Cross) pigment { color rgb <0.8,0.8,1> } finish { ambient 0.9 } } //union } //union camera { #if (Pers) perspective #else orthographic #end // Toggle camera. right x*image_width/image_height location <0.0, 0.0, -3.5*Radius> // Location depends on Radius. look_at <0.0, 0.0, 0.0> angle 45 }