3 currentprojection=orthographic(1,0,0);
14 triple C = unit((-1, 0, 0)) * k;
16 triple P1 = rotate(-delta, Y) * rotate(gamma, Z) * (-C) + C;
23 pen bg = gray(0.9) + opacity(0.5);
27 draw( Label("$x$",1), O--r*X, p, Arrow3(HookHead3));
28 draw( Label("$y$",1), O--r*Y, p, Arrow3(HookHead3));
29 draw( Label("$z$",1), O--r*Z, p, Arrow3(HookHead3));
30 label("$O$", (0,0,0), W);
33 path3 ki_p = shift(C) * (O--ki);
34 draw(Label("$\vec{k_i}$", .5), ki_p, red, Arrow3);
37 path3 kf_p = shift(C) * (O--kf);
38 draw(Label("$\vec{k_f}$", .5), kf_p, red, Arrow3);
42 draw(Label("$\vec{Q}$", .5), Q_p, red, Arrow3);
46 dot("$P_1$", P1, blue);
48 // rotation plan define by the rotation axis
49 triple omega = rotate(mu, Z) * -Y;
50 draw( Label("$\Omega$", 1), O--omega, blue, Arrow3(HookHead3));
52 // circle generated by the revolution of P around omega
53 triple C1 = planeproject(omega, P1) * O;
54 triple C2 = planeproject(omega, P1) * ki;
55 dot("$C_1$", C1, blue);
56 draw(O--C1, dashed+blue);
57 path3 Pcircle = circle(C1, length(P1-C1), omega);
58 draw(Pcircle, dashed+blue);
61 surface Ewalds = shift(C) * scale3(k) * unitsphere;
62 draw(Ewalds, green+opacity(0.3), render(compression=Zero,merge=true));
64 // intersection points of this Cricle with the Ewalds sphere
65 // and the arc, ATTENTION problem de precision lors du calcul
66 // des intersections. Pour l'instant ne pas utiliser delta > 160
67 triple P2 = rotate(180, C1, C2) * P1;
68 path3 Parc = arc(C1, P1, P2, omega, CW);
70 dot("$P_2$", P2, blue);
72 draw(Parc, blue, Arrows3());