[doc] add the gnuplot files.
[hkl.git] / Documentation / figures / 4S+2D_reciproque4.pov
blob9664aee70affaed2b030c2c379ac0a13d7d3ceb4
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"
9 #include "math.inc"
11 // les vecteurs du cristal
12 #declare a = <1,0,0>;
13 #declare b = <.31,.95,0>;
14 #declare c = <.4,.5,0.76>;
16 #declare camera_location = 5 * (x+y+.5*z)+ 3*z + y;
17 #declare camera_look_at = <0,0,0>+3*z + y;
19 //#declare camera_location = a/2+b/1.5-2*z;
20 //#declare camera_look_at = a/2+b/1.5;
22 global_settings{ max_trace_level 255 }
24 background { color DarkGreen }
26 // all setup
27 camera {
28 orthographic
29 location camera_location
30 look_at camera_look_at
34 light_source {
35 <10, 0, 0>
36 color White
37 parallel
38 point_at <0, 0, 0>
39 shadowless
41 light_source {
42 <0, 10, 0>
43 color White
44 parallel
45 point_at <0, 0, 0>
46 shadowless
48 light_source {
49 <0, 0, 10>
50 color White
51 parallel
52 point_at <0, 0, 0>
55 union{
56 // the planes
57 plane { <1,0,0>, -4 pigment {color LightWood} }
58 //plane { <0,1,0>, 0 pigment {color LightWood*.9 transmit .3} }
59 //plane { <0,0,1>, 0 pigment {color LightWood*.8 transmit .3}}
62 // Les trois directions principales
63 cylinder{<0,0,-10>,<0,0,10>, .01 pigment {color Grey}}
64 cylinder{<0,-10,0>,<0,10,0>, .01 pigment {color Grey}}
65 cylinder{<-10,0,0>,<10,0,0>, .01 pigment {color Grey}}
67 // La construction d'Ewald
68 #macro ewald(ki, gamma, delta, Alpha, phi)
69 #local kf=vrotate(vrotate(ki, delta*x), -gamma*y);
70 #local Q=kf-ki;
71 #local n = vrotate(vrotate(vlength(Q)*x, Alpha*y), phi*z);
72 #local xp = vnormalize(Q);
73 #local zp = vcross(xp, z);
74 #local yp = vcross(xp, zp);
76 light_source {
78 color White
79 parallel
80 point_at <0, 0, 0>
83 // Vecteurs incident et diffracté
84 union{
85 arrow(ki, Blue)
86 arrow(kf, Green)
87 translate -ki
88 no_shadow
91 // Vecteur de diffraction
92 arrow(Q, Red)
94 // angle vartheta
95 //object{secteur(x, Q.x*x+Q.y*y, Magenta, .5)}
97 // angle tau
98 //object{secteur(Q, n, ForestGreen, .5) no_shadow}
100 // angle psi
101 //arrow(VProject_Plane(n, Q), Yellow)
102 sector(yp, VProject_Plane(n, Q), ForestGreen, .5)
103 //sector(yp, -yp-0.0001*x, ForestGreen, .5)
104 //object{ arrow_circular(Q, .5, .05, 0, 90, 1, Red) translate 1.1*Q no_shadow}
106 arrow(n, Yellow)
107 disc {0, vcross(ki, Q), vlength(Q) pigment{color Red+Blue transmit .1}}
108 disc {0, Q, vlength(Q) pigment{color Red transmit .3}}
109 //plane { <0,0,-1>, 0 pigment {color LightWood*.2 transmit .7} }
111 // repère x', y', z' permettant de définir l'origine des psi
112 //arrow(xp*vlength(Q), Grey)
113 arrow(yp*vlength(Q), Grey)
114 //arrow(zp*vlength(Q), Grey)
116 // sphères d'ewald
117 merge{
118 //sphere{0, vlength(Q) pigment {color Blue transmit .93}}
119 //sphere{-ki, vlength(ki) pigment {color Green transmit .93}}
120 no_shadow
122 #end
124 ewald(-3*z, -45, 40, -60, 30)
126 // Repère orthonormé de la ligne cristal de soleil.
127 object{repere_soleil translate 7.5*z no_shadow}