[doc] add the gnuplot files.
[hkl.git] / Documentation / figures / 4S+2D_reciproque2.pov
blob5fa66d7bbab2f09e2c09003c5e3bb73f7a5f71a8
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 // les vecteurs du cristal
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}}
58 // Les trois directions principales
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 // La construction d'Ewald
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);
68 #local nq = vnormalize(Q);
69 // normale au plan de diffraction
70 #local ns = vnormalize(vcross(ki, Q));
72 // Vecteurs incident et diffracté
73 union{
74 arrow(ki, Blue)
75 arrow(kf, Green)
77 translate -ki
79 // Vecteur de diffraction
80 arrow(Q, Red)
82 // angle vartheta
83 object{sector(x, n.x*x+n.y*y, Firebrick, 1)}
85 // angle theta
86 object{sector(n, n.x*x+n.y*y, OrangeRed, .5) no_shadow}
88 object{arrow(n, Yellow)}
90 // sphères d'ewald
91 merge{
92 sphere{-ki, vlength(ki) pigment {color Green transmit .93}}
93 no_shadow
95 #end
97 ewald(-3*z, -30, 40, -60, 30)
99 // Repère orthonormé de la ligne cristal de soleil.
100 object{repere_soleil translate 7.5*z no_shadow}