1 #
include "colors.inc" // The include files contain
2 #
include "textures.inc" // pre-defined scene elements
11 // les vecteurs du cristal
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
}
29 location camera_location
30 look_at camera_look_at
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);
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
);
83 // Vecteurs incident et diffracté
91 // Vecteur de diffraction
95 //object{secteur(x, Q.x*x+Q.y*y, Magenta, .5)}
98 //object{secteur(Q, n, ForestGreen, .5) no_shadow}
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}
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)
118 //sphere{0, vlength(Q) pigment {color Blue transmit .93}}
119 //sphere{-ki, vlength(ki) pigment {color Green transmit .93}}
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}