Advertisement
Matthen

Fresnel

May 15th, 2013
830
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. \[Theta] = 2 Pi/9;
  2. a = 0.1;
  3. \[Alpha] = 1.3;
  4. f = {1, 0};
  5. n = 5;
  6. Manipulate[
  7. Graphics[
  8. {
  9. Table[
  10. Block[{dd},
  11. dd = Min[d,
  12. Max[Cos[\[Phi]], Cos[\[Phi] + \[Theta]/n]] - Cos[\[Theta]]];
  13. {
  14. Translate[
  15. Circle[{-1, 0}, 1, {\[Phi], \[Phi] + \[Theta]/n}],
  16. {-dd, 0}],
  17. Line[{{-1 + Cos[\[Phi] + \[Theta]/n] - dd,
  18. Sin[\[Phi] + \[Theta]/n]}, {-1 + Cos[\[Theta]] - a,
  19. Sin[\[Phi] + \[Theta]/n]}, {-1 + Cos[\[Theta]] - a,
  20. Sin[\[Phi]]}, {-1 + Cos[\[Phi]] - dd, Sin[\[Phi]]}}]
  21. }
  22. ]
  23. , {\[Phi], -\[Theta], \[Theta] - \[Theta]/n, \[Theta]/n}]
  24. ,
  25. {Blue,
  26. Table[
  27. Block[{x, y, dd, \[Phi]2, d\[Phi]},
  28. dd =
  29. Min[d, Max[Cos[\[Phi]], Cos[\[Phi] + \[Theta]/n]] -
  30. Cos[\[Theta]]];
  31. \[Phi] += (\[Theta]/(2 n));
  32. \[Phi]2 = \[Phi];
  33. y = Sin[\[Phi]];
  34. x = -1 + Sqrt[1 - y^2] - dd;
  35. d\[Phi] = \[Phi] - ArcSin[\[Alpha] y];
  36. {
  37. Line[{{-1, y}, {x, y}}],
  38. Line[{{x, y} , {x, y} + 2 {Cos[d\[Phi]], Sin[d\[Phi]]}}]
  39. }
  40. ]
  41. , {\[Phi], - \[Theta], \[Theta] - \[Theta]/n, \[Theta]/n}
  42. ]
  43. }
  44. }
  45. , PlotRange -> {{-1, 1}, {-1, 1}}],
  46. {d, 0, 0.244}
  47. ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement