1 #
include "colors.inc" // The include files contain
2 #
include "textures.inc" // pre-defined scene elements
10 // the cristal lattice
12 #
declare b
= <.31,.95,0>;
13 #
declare c
= <.4,.5,0.76>;
15 #
declare camera_location
= 5 * (x+y+.5*z)+ 3*z + y;
16 #
declare camera_look_at
= <0,0,0>+3*z + y;
18 //#declare camera_location = a/2+b/1.5-2*z;
19 //#declare camera_look_at = a/2+b/1.5;
21 global_settings{ max_trace_level 255 }
23 background { color DarkGreen
}
28 location camera_location
29 look_at camera_look_at
53 plane { <1,0,0>, -3 pigment {color LightWood
} }
54 plane { <0,1,0>, 0 pigment {color LightWood
*.9 transmit .3} }
55 plane { <0,0,1>, 0 pigment {color LightWood
*.8 transmit .3}}
58 // the tree principals directions
59 cylinder{<0,0,-10>,<0,0,10>, .01 pigment {color Grey
}}
60 cylinder{<0,-10,0>,<0,10,0>, .01 pigment {color Grey
}}
61 cylinder{<-10,0,0>,<10,0,0>, .01 pigment {color Grey
}}
63 // the Ewald construction
64 #macro ewald
(ki
, gamma
, delta
, Alpha
, phi
)
65 #local kf
=vrotate(vrotate(ki
, delta
*x), -gamma
*y);
67 #local n
= vrotate(vrotate(vlength(Q
)*x, Alpha
*y), phi
*z);
69 // plot the ki and kf vectors
75 //object{sector(ki,kf, Yellow, .2) no_shadow}
78 //object{sector(kf, kf.x*x+kf.z*z, Red, .6) no_shadow}
80 //object{sector(ki, kf.x*x+kf.z*z, Blue, .6) no_shadow}
84 // the diffraction vector Q
88 //object{secteur(x, Q.x*x+Q.y*y, Magenta, .5)}
91 object{sector
(Q
, n
, ForestGreen
, .5) no_shadow}
94 object{arrow_circular
(Q
, .5, .05, 0, 90, 1, Red
) translate 1.1*Q
no_shadow}
97 //disc {0, vcross(ki, Q), vlength(Q) pigment{color Red+Blue transmit .1}}
98 disc {0, Q
, vlength(Q
) pigment{color Red
transmit .3}}
99 //plane { <0,0,-1>, 0 pigment {color LightWood*.2 transmit .7} }
103 sphere{0, vlength(Q
) pigment {color Blue
transmit .73}}
104 sphere{-ki
, vlength(ki
) pigment {color Green
transmit .93}}
109 ewald
(-3*z, -30, 40, -60, 30)
111 // Repère orthonormé de la ligne cristal de soleil.
112 object{repere_soleil
translate 7.5*z no_shadow}