Advertisement
Matthen

Loxodrome Shadow complete

Jan 13th, 2014
446
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. loxodrome[\[Lambda]_, m_, \[Lambda]0_] := {Cos[\[Lambda]]/
  2. Cosh[m (\[Lambda] - \[Lambda]0)], Sin[\[Lambda]]/
  3. Cosh[m (\[Lambda] - \[Lambda]0)], Tanh[m (\[Lambda] - \[Lambda]0)]};
  4. proj[{x_, y_, z_}] := {x/(1 - z), y/(1 - z)};
  5. frame[\[Theta]_] := Rasterize@Module[{m, pp, umax, pr},
  6. m = 0.45;
  7. pp = 30;
  8. umax = 0.8;
  9. range = 2.8;
  10. pr = {{-range, range}, {-range, range}, {-1.1, 1.1}};
  11. texture = ParametricPlot[
  12. proj[
  13. RotationMatrix[\[Theta] + 0.5, {1, 0, 0}].RotationMatrix[
  14. u, {0, 0, 1}].loxodrome[\[Lambda], m, 0]]
  15. , {u, 0, umax}, {\[Lambda], -10, 10}, PlotRange -> 3,
  16. Mesh -> False,
  17. PlotStyle -> Directive[RGBColor[0.15, 0.18, 0.5], Opacity[0.5]],
  18. BoundaryStyle -> None, Frame -> None, Axes -> None,
  19. PlotPoints -> pp, Background -> RGBColor[0.8, 0.8, 0.9]];
  20. Show[
  21. Graphics3D[{RGBColor[0.1, 0.6, 0.7], Opacity[0.2], Sphere[],
  22. {Opacity[1.0], Texture[texture],
  23. Polygon[{{-3, -3, -1}, {3, -3, -1}, {3, 3, -1}, {-3, 3, -1}},
  24. VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1, 1}, {0, 1}}]}
  25. }, Lighting -> "Neutral", PlotRange -> pr, Boxed -> False],
  26. ParametricPlot3D[
  27. {
  28. RotationMatrix[\[Theta] + 0.5, {1, 0, 0}].RotationMatrix[
  29. u, {0, 0, 1}].loxodrome[\[Lambda], m, 0]
  30. }
  31. , {\[Lambda], -10, 10}, {u, 0, umax}, PlotRange -> pr,
  32. PlotPoints -> pp, Mesh -> False, PlotStyle -> Darker@Red,
  33. BoundaryStyle -> None], ImageSize -> 300]
  34. ];
  35. frame[1.07]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement