Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- loxodrome[\[Lambda]_, m_, \[Lambda]0_] := {Cos[\[Lambda]]/
- Cosh[m (\[Lambda] - \[Lambda]0)], Sin[\[Lambda]]/
- Cosh[m (\[Lambda] - \[Lambda]0)], Tanh[m (\[Lambda] - \[Lambda]0)]};
- proj[{x_, y_, z_}] := {x/(1 - z), y/(1 - z)};
- frame[\[Theta]_] := Rasterize@Module[{m, pp, umax, pr},
- m = 0.45;
- pp = 30;
- umax = 0.8;
- range = 2.8;
- pr = {{-range, range}, {-range, range}, {-1.1, 1.1}};
- texture = ParametricPlot[
- proj[
- RotationMatrix[\[Theta] + 0.5, {1, 0, 0}].RotationMatrix[
- u, {0, 0, 1}].loxodrome[\[Lambda], m, 0]]
- , {u, 0, umax}, {\[Lambda], -10, 10}, PlotRange -> 3,
- Mesh -> False,
- PlotStyle -> Directive[RGBColor[0.15, 0.18, 0.5], Opacity[0.5]],
- BoundaryStyle -> None, Frame -> None, Axes -> None,
- PlotPoints -> pp, Background -> RGBColor[0.8, 0.8, 0.9]];
- Show[
- Graphics3D[{RGBColor[0.1, 0.6, 0.7], Opacity[0.2], Sphere[],
- {Opacity[1.0], Texture[texture],
- Polygon[{{-3, -3, -1}, {3, -3, -1}, {3, 3, -1}, {-3, 3, -1}},
- VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1, 1}, {0, 1}}]}
- }, Lighting -> "Neutral", PlotRange -> pr, Boxed -> False],
- ParametricPlot3D[
- {
- RotationMatrix[\[Theta] + 0.5, {1, 0, 0}].RotationMatrix[
- u, {0, 0, 1}].loxodrome[\[Lambda], m, 0]
- }
- , {\[Lambda], -10, 10}, {u, 0, umax}, PlotRange -> pr,
- PlotPoints -> pp, Mesh -> False, PlotStyle -> Darker@Red,
- BoundaryStyle -> None], ImageSize -> 300]
- ];
- frame[1.07]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement