[doc] add the gnuplot files.
[hkl.git] / Documentation / figures / 4S+2D_reciproque3.pov
blobb50e79baeb27d644628e789e4a0836a562a7be55
1 #include "colors.inc" // The include files contain
2 #include "textures.inc" // pre-defined scene elements
3 #include "glass.inc"
4 #include "metals.inc"
5 #include "skies.inc"
6 #include "shapes.inc"
7 #include "bravais.inc"
8 #include "arrows.inc"
10 // the cristal lattice
11 #declare a = <1,0,0>;
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 }
25 // all setup
26 camera {
27 orthographic
28 location camera_location
29 look_at camera_look_at
32 light_source {
33 <10, 0, 0>
34 color White
35 parallel
36 point_at <0, 0, 0>
37 shadowless
39 light_source {
40 <0, 10, 0>
41 color White
42 parallel
43 point_at <0, 0, 0>
45 light_source {
46 <0, 0, 10>
47 color White
48 parallel
49 point_at <0, 0, 0>
52 union{
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);
66 #local Q=kf-ki;
67 #local n = vrotate(vrotate(vlength(Q)*x, Alpha*y), phi*z);
69 // plot the ki and kf vectors
70 union{
71 arrow(ki, Blue)
72 arrow(kf, Green)
74 // angle 2theta
75 //object{sector(ki,kf, Yellow, .2) no_shadow}
77 // angle delta
78 //object{sector(kf, kf.x*x+kf.z*z, Red, .6) no_shadow}
79 // angle gamma
80 //object{sector(ki, kf.x*x+kf.z*z, Blue, .6) no_shadow}
81 translate -ki
84 // the diffraction vector Q
85 arrow(Q, Red)
87 // angle vartheta
88 //object{secteur(x, Q.x*x+Q.y*y, Magenta, .5)}
90 // angle tau
91 object{sector(Q, n, ForestGreen, .5) no_shadow}
93 // angle psi
94 object{arrow_circular(Q, .5, .05, 0, 90, 1, Red) translate 1.1*Q no_shadow}
96 arrow(n, Yellow)
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} }
101 // sphères d'ewald
102 merge{
103 sphere{0, vlength(Q) pigment {color Blue transmit .73}}
104 sphere{-ki, vlength(ki) pigment {color Green transmit .93}}
105 no_shadow
107 #end
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}