1 #
include "colors.inc" // The include files contain
2 #
include "textures.inc" // pre-defined scene elements
10 // les vecteurs du cristal
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}}
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);
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é
79 // Vecteur de diffraction
83 object{sector
(x, n.
x*x+n.
y*y, Firebrick
, 1)}
86 object{sector
(n
, n.
x*x+n.
y*y, OrangeRed
, .5) no_shadow}
88 object{arrow
(n
, Yellow
)}
92 sphere{-ki
, vlength(ki
) pigment {color Green
transmit .93}}
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}