0
$\begingroup$

I have a 3D arc which is moving over the surface of a sphere. I want to do the animation of it. The following code is my try:

arc[σ_, ν_, τ_] := {Cos[ϕ]*Cos[θ], 
    Sin[ϕ]*Cos[θ], 
    Sin[θ]} /. {ϕ -> τ + 
      ArcTan[ν Sqrt[1 - ν^2]
         Tanh[(σ + ν τ)/Sqrt[
         1 - ν^2]]], θ -> 
     ArcSin[Sqrt[1 - ν^2]/
      Cosh[(σ + ν τ)/Sqrt[1 - ν^2]]]};
Animate[Show[
  ParametricPlot3D[{Cos[ϕ]*Sin[θ], 
    Sin[ϕ]*Sin[θ], Cos[θ]}, {ϕ, 0, 
    2 π}, {θ, -π, π}, 
   PlotRange -> {{-1, 1}, {-1, 1}, {-1, 1}}, PlotStyle -> Gray], 
  Graphics3D[{Red, Thickness[0.01], 
    Line[Table[
      arc[σ, .7, τ], {σ, -π, π, π/
        64}]]}, {{-1, 1}, {-1, 1}, {-1, 1}}], Boxed -> False, 
  Axes -> False], {τ, 0, 4}]  

But the problem is during the animation smooth texture of the sphere lost and when I stop animation it regains the smooth texture. Is it possible to get the smooth texture of the sphere during the animation?

$\endgroup$
  • 4
    $\begingroup$ Add Dynamic@Line... so that the whole content won't need to be recreated (additionally see performanceGoal option to see why it looks different on dynamic regeneration) $\endgroup$ – Kuba May 2 '18 at 10:50
  • $\begingroup$ At least closely related: 120430 and related: 8072 $\endgroup$ – Kuba May 2 '18 at 10:59
  • $\begingroup$ Another duplicate proposal: 148405, what do you think? $\endgroup$ – Kuba May 2 '18 at 11:00
  • $\begingroup$ @Kuba yes Dynamic@Line works $\endgroup$ – m. bubu May 2 '18 at 12:02
  • $\begingroup$ @Kuba Can you tell me, Why during export of this animation gives only one loop with one backward, even giving animationrepetition more than one? $\endgroup$ – m. bubu May 2 '18 at 16:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.