/* Persistence of Vision Ray Tracer Scene Description File File: H_Wave_Functions v3_8.pov Version: 3.5 beta-RC5 Date: 4 june 2002 Author: Jaap Frank Desc: With media one can display the various wave functions of Hydrogen: 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 that are needed below. //---------------------------------------------------------------------------------------------------------------------- #version 3.5; // ***************** Variables to change ************************************************************************** // Quantum numbers of Wave Function #declare n = 2; // n = 1, 2, 3, 4, (and for n=5,l=4,m=0 only) #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 (on) and Wave function (off). // Visible Density (Probability Function only) #declare Dens = Low; // Medium; // 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 = 2; // 5; // 10; // // Percentage of Radius for cross section = How thick is the slice. #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; //1.5; //2; //0.5; // // 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) // Warning: Combined with Cross these rotations sometimes give wrong results. // Maybe transform( ... inverse) goes wrong, but why only with the cross section and not with the axis and 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; // Toggle Multiple/single view on/off #declare Multiple = on; // off; // // Switch between single (Front) or multiple view (Top, Front, Side). // Toggle Camera Type #declare CamType = 2; // 1; // // 1 = perspective; 2 = orthographic (default) // ******************************************************************************************************************* //++++++++++++++++++++++++++++++++ Do not change the rest of the file +++++++++++++++++++++++++++++++++++++++++++++++++++++ #if ((n>5)|(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; #break #case (2) #declare Radius = 17; #break #case (3) #declare Radius = 30; #break #case (4) #declare Radius = 50; #break #case (5) #declare Radius = 70; #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 // +++++++++++++++++++++++++ Functions and constants for the wave functions ++++++++++++++++++++++++++++++++++++++++++++ // Some functions to use. #declare R = function{sqrt(x*x+y*y+z*z)} // Radius #declare R2 = function{x*x+y*y+z*z} // Radius^2 #declare R3 = function{(x*x+y*y+z*z)*sqrt(x*x+y*y+z*z)} // Radius^3 #declare R4 = function{(x*x+y*y+z*z)*(x*x+y*y+z*z)} // Radius^4 #declare R5 = function{(x*x+y*y+z*z)*(x*x+y*y+z*z)*sqrt(x*x+y*y+z*z)} // Radius^5 #declare _4piR2 = function{4*pi*(x*x+y*y+z*z)} // 4piR^2 #declare CosT = function{select(x*x+y*y+z*z,0,0,x/sqrt(x*x+y*y+z*z))} // Cosinus(Theta) #declare SinT = function{select(x*x+y*y+z*z,0,0,sqrt(y*y+z*z)/sqrt(x*x+y*y+z*z))} // Sinus(Theta) #declare CosInverse = function(y,z){ select(y*y+z*z, // Test = y*y+z*z 0, // Return 0 if Test<0 0, // Return 0 if Test=0 select(y, // Test >0: Test = y 2*pi-acos(z/sqrt(y*y+z*z)), // y <0: Third and fourth quadrant: 360 - acos. acos(z/sqrt(y*y+z*z)) // y >=0: First and second quadrant: acos gives correct answer. ) ) } #declare SinInverse = function(y,z){ select(y*y+z*z, // Test = y*y+z*z 0, // Return 0 if Test<0 0, // Return 0 if Test=0 select(z, // Test >0: Test = z pi-asin(y/sqrt(y*y+z*z)), // z <0: Second and third quadrant: 180 - asin. select(y, // z >=0: Test = y: 2*pi+asin(y/sqrt(y*y+z*z)), // y <0: Fourth quadrant: 360 + asin. asin(y/sqrt(y*y+z*z)) // y >=0: First quadrant: asin gives correct answer. ) ) ) } #declare Exp_imPhi = function{cos(abs(m)*CosInverse(y,z)) + m/abs(m)*sin(abs(m)*SinInverse(y,z))} // Prepare the Wave function // Wave functions: Psi(n,l,m) // Because color_map can't take negative values, the wave functions // are raised by 0.5 when Psi is virtualised and a different color map is used. // Probability of wave function: P = 4*pi*r^2*Psi(n,l,m)^2 #if (n=1) #declare C_10 = 2; #declare U_10 = function{C_10*exp(-R(x,y,z))} // u(n=1,l=0) 1s #declare Y_00 = (1/sqrt(4*pi)); // Y(l=0,m= 0) s0 #if (Prob) #declare Psi_1s = function{U_10(x,y,z)* Y_00}; // Psi(n,l,m) = Psi(1,0, 0) #declare P_1s = function{_4piR2(x,y,z)*pow(Psi_1s(x,y,z),2)}; // 1s #declare Func = function{P_1s(x,y,z)} // n=1,l=0,m=0, 1s #else #declare Psi_1s = function{U_10(x,y,z)* Y_00+0.5}; #declare Func = function{Psi_1s(x,y,z)} #end // Psi(n,l,m) = Psi(1,0, 0) #end //n=1 #if (n=2) #if (l=0) #declare C_20 = (1/sqrt(8)); #declare U_20 = function{C_20*(2-R(x,y,z))*exp(-R(x,y,z)/2)} // u(n=2,l=0) 2s #declare Y_00 = (1/sqrt(4*pi)); // Y(l=0,m= 0) s0 #if (Prob) #declare Psi_2s = function{U_20(x,y,z)* Y_00}; // Psi(n,l,m) = Psi(2,0, 0) #declare P_2s = function{_4piR2(x,y,z)*pow(Psi_2s(x,y,z),2)}; // 2s #declare Func = function{P_2s(x,y,z)} // n=2,l=0,m=0, 2s #else #declare Psi_2s = function{U_20(x,y,z)* Y_00+0.5}; #declare Func = function{Psi_2s(x,y,z)} #end // Psi(n,l,m) = Psi(2,0, 0) #end //l=0 #if (l=1) #declare C_21 = (1/sqrt(24)); #declare U_21 = function{C_21*R(x,y,z)*exp(-R(x,y,z)/2)} // u(n=2,l=1) 2p #if (m=-1) #declare Cy11 = (-sqrt(3/8/pi)); #declare Y_11m = function{Cy11*SinT(x,y,z)*Exp_imPhi(x,y,z)} // Y(l=1,m=-1) p-1 #if (Prob) #declare Psi_2p1m = function{U_21(x,y,z)*-Y_11m(x,y,z)}; // Psi(n,l,m) = Psi(2,1,-1) #declare P_2p1m = function{_4piR2(x,y,z)*pow(Psi_2p1m(x,y,z),2)}; // 2p-1 #declare Func = function{P_2p1m(x,y,z)} // n=2,l=1,m=-1, 2p-1 #else #declare Psi_2p1m = function{U_21(x,y,z)*-Y_11m(x,y,z)+0.5}; #declare Func = function{Psi_2p1m(x,y,z)} #end // Psi(n,l,m) = Psi(2,1,-1) #end //m=-1 #if (m=0) #declare Cy10 = (sqrt(3/4/pi)); #declare Y_10 = function{Cy10*CosT(x,y,z)} // Y(l=1,m= 0) p0 #if (Prob) #declare Psi_2p0 = function{U_21(x,y,z)* Y_10(x,y,z)}; // Psi(n,l,m) = Psi(2,1, 0) #declare P_2p0 = function{_4piR2(x,y,z)*pow(Psi_2p0(x,y,z),2)}; // 2p0 #declare Func = function{P_2p0(x,y,z)} // n=2,l=1,m= 0, 2p0 #else #declare Psi_2p0 = function{U_21(x,y,z)* Y_10(x,y,z)+0.5}; #declare Func = function{Psi_2p0(x,y,z)} #end // Psi(n,l,m) = Psi(2,1, 0) #end //m=0 #if (m=1) #declare Cy11 = (-sqrt(3/8/pi)); #declare Y_11 = function{Cy11*SinT(x,y,z)*Exp_imPhi(x,y,z)} // Y(l=1,m= 1) p1 #if (Prob) #declare Psi_2p1 = function{U_21(x,y,z)* Y_11(x,y,z)}; // Psi(n,l,m) = Psi(2,1, 1) #declare P_2p1 = function{_4piR2(x,y,z)*pow(Psi_2p1(x,y,z),2)}; // 2p1 #declare Func = function{P_2p1(x,y,z)} // n=2,l=1,m= 1, 2p1 #else #declare Psi_2p1 = function{U_21(x,y,z)* Y_11(x,y,z)+0.5}; #declare Func = function{Psi_2p1(x,y,z)} #end // Psi(n,l,m) = Psi(2,1, 1) #end //m=1 #end //l=1 #end //n=2 #if (n=3) #if (l=0) #declare C_30 = (2/81/sqrt(3)); #declare U_30 = function{C_30*(27-18*R(x,y,z)+2*R2(x,y,z))*exp(-R(x,y,z)/3)} // u(n=3,l=0) 3s #declare Y_00 = (1/sqrt(4*pi)); // Y(l=0,m= 0) s0 #if (Prob) #declare Psi_3s = function{U_30(x,y,z)* Y_00}; // Psi(n,l,m) = Psi(3,0, 0) #declare P_3s = function{_4piR2(x,y,z)*pow(Psi_3s(x,y,z),2)}; // 3s #declare Func = function{P_3s(x,y,z)} // n=3,l=0,m=0, 3s #else #declare Psi_3s = function{U_30(x,y,z)* Y_00+0.5}; #declare Func = function{Psi_3s(x,y,z)} #end // Psi(n,l,m) = Psi(3,0, 0) #end //l=0 #if (l=1) #declare C_31 = (4/81/sqrt(6)); #declare U_31 = function{C_31*R(x,y,z)*(6-R(x,y,z))*exp(-R(x,y,z)/3)} // u(n=3,l=1) 3p #if (m=-1) #declare Cy11 = (-sqrt(3/8/pi)); #declare Y_11m = function{Cy11*SinT(x,y,z)*Exp_imPhi(x,y,z)} // Y(l=1,m=-1) p-1 #if (Prob) #declare Psi_3p1m = function{U_31(x,y,z)*-Y_11m(x,y,z)}; // Psi(n,l,m) = Psi(3,1,-1) #declare P_3p1m = function{_4piR2(x,y,z)*pow(Psi_3p1m(x,y,z),2)}; // 3p-1 #declare Func = function{P_3p1m(x,y,z)} // n=3,l=1,m=-1, 3p-1 #else #declare Psi_3p1m = function{U_31(x,y,z)*-Y_11m(x,y,z)+0.5}; #declare Func = function{Psi_3p1m(x,y,z)} #end // Psi(n,l,m) = Psi(3,1,-1) #end //m=-1 #if (m=0) #declare Cy10 = (sqrt(3/4/pi)); #declare Y_10 = function{Cy10*CosT(x,y,z)} // Y(l=1,m= 0) p0 #if (Prob) #declare Psi_3p0 = function{U_31(x,y,z)* Y_10(x,y,z)}; // Psi(n,l,m) = Psi(3,1, 0) #declare P_3p0 = function{_4piR2(x,y,z)*pow(Psi_3p0(x,y,z),2)}; // 3p0 #declare Func = function{P_3p0(x,y,z)} // n=3,l=1,m= 0, 3p0 #else #declare Psi_3p0 = function{U_31(x,y,z)* Y_10(x,y,z)+0.5}; #declare Func = function{Psi_3p0(x,y,z)} #end // Psi(n,l,m) = Psi(3,1, 0) #end //m=0 #if (m=1) #declare Cy11 = (-sqrt(3/8/pi)); #declare Y_11 = function{Cy11*SinT(x,y,z)*Exp_imPhi(x,y,z)} // Y(l=1,m= 1) p1 #if (Prob) #declare Psi_3p1 = function{U_31(x,y,z)* Y_11(x,y,z)}; // Psi(n,l,m) = Psi(3,1, 1) #declare P_3p1 = function{_4piR2(x,y,z)*pow(Psi_3p1(x,y,z),2)}; // 3p1 #declare Func = function{P_3p1(x,y,z)} // n=3,l=1,m= 1, 3p1 #else #declare Psi_3p1 = function{U_31(x,y,z)* Y_11(x,y,z)+0.5}; #declare Func = function{Psi_3p1(x,y,z)} #end // Psi(n,l,m) = Psi(3,1, 1) #end //m=1 #end //l=1 #if (l=2) #declare C_32 = (4/81/sqrt(30)); #declare U_32 = function{C_32*R2(x,y,z)*exp(-R(x,y,z)/3)} // u(n=3,l=2) 3d #if (m=-2) #declare Cy22 = (sqrt(15/32/pi)); #declare Y_22m = function{Cy22*SinT(x,y,z)*SinT(x,y,z)*Exp_imPhi(x,y,z)} // Y(l=2,m=-2) d-2 #if (Prob) #declare Psi_3d2m = function{U_32(x,y,z)* Y_22m(x,y,z)}; // Psi(n,l,m) = Psi(3,2,-2) #declare P_3d2m = function{_4piR2(x,y,z)*pow(Psi_3d2m(x,y,z),2)}; // 3d-2 #declare Func = function{P_3d2m(x,y,z)} // n=3,l=2,m=-2, 3d-2 #else #declare Psi_3d2m = function{U_32(x,y,z)* Y_22m(x,y,z)+0.5}; #declare Func = function{Psi_3d2m(x,y,z)} #end // Psi(n,l,m) = Psi(3,2,-2) #end //m=-2 #if (m=-1) #declare Cy21 = (-sqrt(15/8/pi)); #declare Y_21m = function{Cy21*SinT(x,y,z)*CosT(x,y,z)*Exp_imPhi(x,y,z)} // Y(l=2,m=-1) d-1 #if (Prob) #declare Psi_3d1m = function{U_32(x,y,z)*-Y_21m(x,y,z)}; // Psi(n,l,m) = Psi(3,2,-1) #declare P_3d1m = function{_4piR2(x,y,z)*pow(Psi_3d1m(x,y,z),2)}; // 3d-1 #declare Func = function{P_3d1m(x,y,z)} // n=3,l=2,m=-1, 3d-1 #else #declare Psi_3d1m = function{U_32(x,y,z)*-Y_21m(x,y,z)+0.5}; #declare Func = function{Psi_3d1m(x,y,z)} #end // Psi(n,l,m) = Psi(3,2,-1) #end //m=-1 #if (m=0) #declare Cy20 = (sqrt(5/16/pi)); #declare Y_20 = function{Cy20*(3*CosT(x,y,z)*CosT(x,y,z)-1)} // Y(l=2,m= 0) d0 #if (Prob) #declare Psi_3d0 = function{U_32(x,y,z)* Y_20(x,y,z)}; // Psi(n,l,m) = Psi(3,2, 0) #declare P_3d0 = function{_4piR2(x,y,z)*pow(Psi_3d0(x,y,z),2)}; // 3d0 #declare Func = function{P_3d0(x,y,z)} // n=3,l=2,m= 0, 3d0 #else #declare Psi_3d0 = function{U_32(x,y,z)* Y_20(x,y,z)+0.5}; #declare Func = function{Psi_3d0(x,y,z)} #end // Psi(n,l,m) = Psi(3,2, 0) #end //m=0 #if (m=1) #declare Cy21 = (-sqrt(15/8/pi)); #declare Y_21 = function{Cy21*SinT(x,y,z)*CosT(x,y,z)*Exp_imPhi(x,y,z)} // Y(l=2,m= 1) d1 #if (Prob) #declare Psi_3d1 = function{U_32(x,y,z)* Y_21(x,y,z)}; // Psi(n,l,m) = Psi(3,2, 1) #declare P_3d1 = function{_4piR2(x,y,z)*pow(Psi_3d1(x,y,z),2)}; // 3d1 #declare Func = function{P_3d1(x,y,z)} // n=3,l=2,m= 1, 3d1 #else #declare Psi_3d1 = function{U_32(x,y,z)* Y_21(x,y,z)+0.5}; #declare Func = function{Psi_3d1(x,y,z)} #end // Psi(n,l,m) = Psi(3,2, 1) #end //m=1 #if (m=2) #declare Cy22 = (sqrt(15/32/pi)); #declare Y_22 = function{Cy22*SinT(x,y,z)*SinT(x,y,z)*Exp_imPhi(x,y,z)} // Y(l=2,m= 2) d2 #if (Prob) #declare Psi_3d2 = function{U_32(x,y,z)* Y_22(x,y,z)}; // Psi(n,l,m) = Psi(3,2, 2) #declare P_3d2 = function{_4piR2(x,y,z)*pow(Psi_3d2(x,y,z),2)}; // 3d2 #declare Func = function{P_3d2(x,y,z)} // n=3,l=2,m= 2, 3d2 #else #declare Psi_3d2 = function{U_32(x,y,z)* Y_22(x,y,z)+0.5}; #declare Func = function{Psi_3d2(x,y,z)} #end // Psi(n,l,m) = Psi(3,2, 2) #end //m=2 #end //l=2 #end //n=3 #if (n=4) #if (l=0) #declare C_40 = (1/768); #declare U_40 = function{C_40*(12-16*R(x,y,z)+ 24*R2(x,y,z)-R3(x,y,z))*exp(-R(x,y,z)/4)} // u(n=4,l=0) 4s #declare Y_00 = (1/sqrt(4*pi)); // Y(l=0,m= 0) s0 #if (Prob) #declare Psi_4s = function{U_40(x,y,z)* Y_00}; // Psi(n,l,m) = Psi(4,0, 0) #declare P_4s = function{_4piR2(x,y,z)*pow(Psi_4s(x,y,z),2)}; // 4s #declare Func = function{P_4s(x,y,z)} // n=4,l=0,m=0, 4s #else #declare Psi_4s = function{U_40(x,y,z)* Y_00+0.5}; #declare Func = function{Psi_4s(x,y,z)} #end // Psi(n,l,m) = Psi(4,0, 0) #end //l=0 #if (l=1) #declare C_41 = (1/256/sqrt(15)); #declare U_41 = function{C_41*R(x,y,z)*(80-20*R(x,y,z)+R2(x,y,z))*exp(-R(x,y,z)/4)} // u(n=4,l=1) 4p #if (m=-1) #declare Cy11 = (-sqrt(3/8/pi)); #declare Y_11m = function{Cy11*SinT(x,y,z)*Exp_imPhi(x,y,z)} // Y(l=1,m=-1) p-1 #if (Prob) #declare Psi_4p1m = function{U_41(x,y,z)*-Y_11m(x,y,z)}; // Psi(n,l,m) = Psi(4,1,-1) #declare P_4p1m = function{_4piR2(x,y,z)*pow(Psi_4p1m(x,y,z),2)}; // 4p-1 #declare Func = function{P_4p1m(x,y,z)} // n=4,l=1,m=-1, 4p-1 #else #declare Psi_4p1m = function{U_41(x,y,z)*-Y_11m(x,y,z)+0.5}; #declare Func = function{Psi_4p1m(x,y,z)} #end // Psi(n,l,m) = Psi(4,1,-1) #end //m=-1 #if (m=0) #declare Cy10 = (sqrt(3/4/pi)); #declare Y_10 = function{Cy10*CosT(x,y,z)} // Y(l=1,m= 0) p0 #if (Prob) #declare Psi_4p0 = function{U_41(x,y,z)* Y_10(x,y,z)}; // Psi(n,l,m) = Psi(4,1, 0) #declare P_4p0 = function{_4piR2(x,y,z)*pow(Psi_4p0(x,y,z),2)}; // 4p0 #declare Func = function{P_4p0(x,y,z)} // n=4,l=1,m= 0, 4p0 #else #declare Psi_4p0 = function{U_41(x,y,z)* Y_10(x,y,z)+0.5}; #declare Func = function{Psi_4p0(x,y,z)} #end // Psi(n,l,m) = Psi(4,1, 0) #end //m=0 #if (m=1) #declare Cy11 = (-sqrt(3/8/pi)); #declare Y_11 = function{Cy11*SinT(x,y,z)*Exp_imPhi(x,y,z)} // Y(l=1,m= 1) p1 #if (Prob) #declare Psi_4p1 = function{U_41(x,y,z)* Y_11(x,y,z)}; // Psi(n,l,m) = Psi(4,1, 1) #declare P_4p1 = function{_4piR2(x,y,z)*pow(Psi_4p1(x,y,z),2)}; // 4p1 #declare Func = function{P_4p1(x,y,z)} // n=4,l=1,m= 1, 4p1 #else #declare Psi_4p1 = function{U_41(x,y,z)* Y_11(x,y,z)+0.5}; #declare Func = function{Psi_4p1(x,y,z)} #end // Psi(n,l,m) = Psi(4,1, 1) #end //m=1 #end //l=1 #if (l=2) #declare C_42 = (1/768/sqrt(5)); #declare U_42 = function{C_42*R2(x,y,z)*(12-R(x,y,z))*exp(-R(x,y,z)/4)} // u(n=4,l=2) 4d #if (m=-2) #declare Cy22 = (sqrt(15/32/pi)); #declare Y_22m = function{Cy22*SinT(x,y,z)*SinT(x,y,z)*Exp_imPhi(x,y,z)} // Y(l=2,m=-2) d-2 #if (Prob) #declare Psi_4d2m = function{U_42(x,y,z)* Y_22m(x,y,z)}; // Psi(n,l,m) = Psi(4,2,-2) #declare P_4d2m = function{_4piR2(x,y,z)*pow(Psi_4d2m(x,y,z),2)}; // 4d-2 #declare Func = function{P_4d2m(x,y,z)} // n=4,l=2,m=-2, 4d-2 #else #declare Psi_4d2m = function{U_42(x,y,z)* Y_22m(x,y,z)+0.5}; #declare Func = function{Psi_4d2m(x,y,z)} #end // Psi(n,l,m) = Psi(4,2,-2) #end //m=-2 #if (m=-1) #declare Cy21 = (-sqrt(15/8/pi)); #declare Y_21m = function{Cy21*SinT(x,y,z)*CosT(x,y,z)*Exp_imPhi(x,y,z)} // Y(l=2,m=-1) d-1 #if (Prob) #declare Psi_4d1m = function{U_42(x,y,z)*-Y_21m(x,y,z)}; // Psi(n,l,m) = Psi(4,2,-1) #declare P_4d1m = function{_4piR2(x,y,z)*pow(Psi_4d1m(x,y,z),2)}; // 4d-1 #declare Func = function{P_4d1m(x,y,z)} // n=4,l=2,m=-1, 4d-1 #else #declare Psi_4d1m = function{U_42(x,y,z)*-Y_21m(x,y,z)+0.5}; #declare Func = function{Psi_4d1m(x,y,z)} #end // Psi(n,l,m) = Psi(4,2,-1) #end //m=-1 #if (m=0) #declare Cy20 = (sqrt(5/16/pi)); #declare Y_20 = function{Cy20*(3*CosT(x,y,z)*CosT(x,y,z)-1)} // Y(l=2,m= 0) d0 #if (Prob) #declare Psi_4d0 = function{U_42(x,y,z)* Y_20(x,y,z)}; // Psi(n,l,m) = Psi(4,2, 0) #declare P_4d0 = function{_4piR2(x,y,z)*pow(Psi_4d0(x,y,z),2)}; // 4d0 #declare Func = function{P_4d0(x,y,z)} // n=4,l=2,m= 0, 4d0 #else #declare Psi_4d0 = function{U_42(x,y,z)* Y_20(x,y,z)+0.5}; #declare Func = function{Psi_4d0(x,y,z)} #end // Psi(n,l,m) = Psi(4,2, 0) #end //m=0 #if (m=1) #declare Cy21 = (-sqrt(15/8/pi)); #declare Y_21 = function{Cy21*SinT(x,y,z)*CosT(x,y,z)*Exp_imPhi(x,y,z)} // Y(l=2,m= 1) d1 #if (Prob) #declare Psi_4d1 = function{U_42(x,y,z)* Y_21(x,y,z)}; // Psi(n,l,m) = Psi(4,2, 1) #declare P_4d1 = function{_4piR2(x,y,z)*pow(Psi_4d1(x,y,z),2)}; // 4d1 #declare Func = function{P_4d1(x,y,z)} // n=4,l=2,m= 1, 4d1 #else #declare Psi_4d1 = function{U_42(x,y,z)* Y_21(x,y,z)+0.5}; #declare Func = function{Psi_4d1(x,y,z)} #end // Psi(n,l,m) = Psi(4,2, 1) #end //m=1 #if (m=2) #declare Cy22 = (sqrt(15/32/pi)); #declare Y_22 = function{Cy22*SinT(x,y,z)*SinT(x,y,z)*Exp_imPhi(x,y,z)} // Y(l=2,m= 2) d2 #if (Prob) #declare Psi_4d2 = function{U_42(x,y,z)* Y_22(x,y,z)}; // Psi(n,l,m) = Psi(4,2, 2) #declare P_4d2 = function{_4piR2(x,y,z)*pow(Psi_4d2(x,y,z),2)}; // 4d2 #declare Func = function{P_4d2(x,y,z)} // n=4,l=2,m= 2, 4d2 #else #declare Psi_4d2 = function{U_42(x,y,z)* Y_22(x,y,z)+0.5}; #declare Func = function{Psi_4d2(x,y,z)} #end // Psi(n,l,m) = Psi(4,2, 2) #end //m=2 #end //l=2 #if (l=3) #declare C_43 = (1/768/sqrt(35)); #declare U_43 = function{C_43*R3(x,y,z)*exp(-R(x,y,z)/4)} // u(n=4,l=3) 4f #if (m=-3) #declare Cy33 = (sqrt(105/192/pi)); #declare Y_33m = function{Cy33*SinT(x,y,z)*SinT(x,y,z)*SinT(x,y,z)*Exp_imPhi(x,y,z)} // Y(l=3,m=-3) f-3 #if (Prob) #declare Psi_4f3m = function{U_43(x,y,z)*-Y_33m(x,y,z)}; // Psi(n,l,m) = Psi(4,3,-3) #declare P_4f3m = function{_4piR2(x,y,z)*pow(Psi_4f3m(x,y,z),2)}; // 4f-3 #declare Func = function{P_4f3m(x,y,z)} // n=4,l=3,m=-3, 4f-3 #else #declare Psi_4f3m = function{U_43(x,y,z)*-Y_33m(x,y,z)+0.5}; #declare Func = function{Psi_4f3m(x,y,z)} #end // Psi(n,l,m) = Psi(4,3,-3) #end //m=-3 #if (m=-2) #declare Cy32 = (sqrt(105/128/pi)); #declare Y_32m = function{Cy32*SinT(x,y,z)*SinT(x,y,z)*CosT(x,y,z)*Exp_imPhi(x,y,z)} // Y(l=3,m=-2) f-2 #if (Prob) #declare Psi_4f2m = function{U_43(x,y,z)* Y_32m(x,y,z)}; // Psi(n,l,m) = Psi(4,3,-2) #declare P_4f2m = function{_4piR2(x,y,z)*pow(Psi_4f2m(x,y,z),2)}; // 4f-2 #declare Func = function{P_4f2m(x,y,z)} // n=4,l=3,m=-2, 4f-2 #else #declare Psi_4f2m = function{U_43(x,y,z)* Y_32m(x,y,z)+0.5}; #declare Func = function{Psi_4f2m(x,y,z)} #end // Psi(n,l,m) = Psi(4,3,-2) #end //m=-2 #if (m=-1) #declare Cy31 = (sqrt(21/64/pi)); #declare Y_31m = function{Cy31*SinT(x,y,z)*(5*CosT(x,y,z)*CosT(x,y,z)-1)*Exp_imPhi(x,y,z)} // Y(l=3,m=-1) f-1 #if (Prob) #declare Psi_4f1m = function{U_43(x,y,z)*-Y_31m(x,y,z)}; // Psi(n,l,m) = Psi(4,3,-1) #declare P_4f1m = function{_4piR2(x,y,z)*pow(Psi_4f1m(x,y,z),2)}; // 4f-1 #declare Func = function{P_4f1m(x,y,z)} // n=4,l=3,m=-1, 4f-1 #else #declare Psi_4f1m = function{U_43(x,y,z)*-Y_31m(x,y,z)+0.5}; #declare Func = function{Psi_4f1m(x,y,z)} #end // Psi(n,l,m) = Psi(4,3,-1) #end //m=-1 #if (m=0) #declare Cy30 = (sqrt(7/16/pi)); #declare Y_30 = function{Cy30*CosT(x,y,z)*(5*CosT(x,y,z)*CosT(x,y,z)-3)} // Y(l=3,m= 0) f0 #if (Prob) #declare Psi_4f0 = function{U_43(x,y,z)* Y_30(x,y,z)}; // Psi(n,l,m) = Psi(4,3, 0) #declare P_4f0 = function{_4piR2(x,y,z)*pow(Psi_4f0(x,y,z),2)}; // 4f0 #declare Func = function{P_4f0(x,y,z)} // n=4,l=3,m= 0, 4f0 #else #declare Psi_4f0 = function{U_43(x,y,z)* Y_30(x,y,z)+0.5}; #declare Func = function{Psi_4f0(x,y,z)} #end // Psi(n,l,m) = Psi(4,3, 0) #end //m=0 #if (m=1) #declare Cy31 = (sqrt(21/64/pi)); #declare Y_31 = function{Cy31*SinT(x,y,z)*(5*CosT(x,y,z)*CosT(x,y,z)-1)*Exp_imPhi(x,y,z)} // Y(l=3,m= 1) f1 #if (Prob) #declare Psi_4f1 = function{U_43(x,y,z)* Y_31(x,y,z)}; // Psi(n,l,m) = Psi(4,3, 1) #declare P_4f1 = function{_4piR2(x,y,z)*pow(Psi_4f1(x,y,z),2)}; // 4f1 #declare Func = function{P_4f1(x,y,z)} // n=4,l=3,m= 1, 4f1 #else #declare Psi_4f1 = function{U_43(x,y,z)* Y_31(x,y,z)+0.5}; #declare Func = function{Psi_4f1(x,y,z)} #end // Psi(n,l,m) = Psi(4,3, 1) #end //m=1 #if (m=2) #declare Cy32 = (sqrt(105/128/pi)); #declare Y_32 = function{Cy32*SinT(x,y,z)*SinT(x,y,z)*CosT(x,y,z)*Exp_imPhi(x,y,z)} // Y(l=3,m= 2) f2 #if (Prob) #declare Psi_4f2 = function{U_43(x,y,z)* Y_32(x,y,z)}; // Psi(n,l,m) = Psi(4,3, 2) #declare P_4f2 = function{_4piR2(x,y,z)*pow(Psi_4f2(x,y,z),2)}; // 4f2 #declare Func = function{P_4f2(x,y,z)} // n=4,l=3,m= 2, 4f2 #else #declare Psi_4f2 = function{U_43(x,y,z)* Y_32(x,y,z)+0.5}; #declare Func = function{Psi_4f2(x,y,z)} #end // Psi(n,l,m) = Psi(4,3, 2) #end //m=2 #if (m=3) #declare Cy33 = (sqrt(105/192/pi)); #declare Y_33 = function{Cy33*SinT(x,y,z)*SinT(x,y,z)*SinT(x,y,z)*Exp_imPhi(x,y,z)} // Y(l=3,m= 3) f3 #if (Prob) #declare Psi_4f3 = function{U_43(x,y,z)* Y_33(x,y,z)}; // Psi(n,l,m) = Psi(4,3, 3) #declare P_4f3 = function{_4piR2(x,y,z)*pow(Psi_4f3(x,y,z),2)}; // 4f3 #declare Func = function{P_4f3(x,y,z)} // n=4,l=3,m= 3, 4f3 #else #declare Psi_4f3 = function{U_43(x,y,z)* Y_33(x,y,z)+0.5}; #declare Func = function{Psi_4f3(x,y,z)} #end // Psi(n,l,m) = Psi(4,3, 3) #end //m=3 #end //l=3 #end //n=4 #if (n=5) #if (l=4) #declare C_54 = (4/140625/sqrt(70)); #declare U_54 = function{C_54*R4(x,y,z)*exp(-R(x,y,z)/5)} // u(n=5,l=4) 5g #if (m=0) #declare Cy40 = (sqrt(9/256/pi)); #declare Y_40 = function{Cy40*(35*CosT(x,y,z)*CosT(x,y,z)*CosT(x,y,z)*CosT(x,y,z) -30*CosT(x,y,z)*CosT(x,y,z)+3)} // Y(l=4,m= 0) g0 #if (Prob) #declare Psi_5g0 = function{U_54(x,y,z)* Y_40(x,y,z)}; // Psi(n,l,m) = Psi(4,3, 0) #declare P_5g0 = function{_4piR2(x,y,z)*pow(Psi_5g0(x,y,z),2)}; // 4f0 #declare Func = function{P_5g0(x,y,z)} // n=4,l=3,m= 0, 4f0 #else #declare Psi_5g0 = function{U_54(x,y,z)* Y_40(x,y,z)+0.5}; #declare Func = function{Psi_5g0(x,y,z)} #end // Psi(n,l,m) = Psi(4,3, 0) #end //m=0 #end //l=0 #end //n=5 // -------------------------------------------------------------------------------------------------------------------- #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) & ( ((Radius<30)&(mod(Count,5)=0) ) | ( (Radius>=30) & (mod(Count,10)=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)) ) ) #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. intervals 1 // 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>) 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>) 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>) 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, 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 // 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 (CamType = 1) perspective #else orthographic #end 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 }