File:Lagrangian KleinBottle.gif

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Lagrangian_KleinBottle.gif(451 × 576 pixels, file size: 10.78 MB, MIME type: image/gif, looped, 200 frames, 20 s)

Captions

Captions

Point mass sliding on a Klein bottle

Summary[edit]

Description
English: A point mass sliding without friction on a Klein bottle under the effect of gravity. (Starting with a small velocity)
Date
Source https://twitter.com/j_bertolotti/status/1259832002649391105
Author Jacopo Bertolotti
Permission
(Reusing this file)
https://twitter.com/j_bertolotti/status/1030470604418428929

Mathematica 12.0 code[edit]

x[t_] := -(2/15) Cos[u[t]] (3 Cos[v[t]] - 30 Sin[u[t]] + 90 Cos[u[t]]^4 Sin[u[t]] - 60 Cos[u[t]]^6 Sin[u[t]] + 5 Cos[u[t]] Cos[v[t]] Sin[u[t]])
y[t_] := 2/15 (3 + 5 Cos[u[t]] Sin[u[t]]) Sin[v[t]]
z[t_] := 1/15 Sin[u[t]] (3 Cos[v[t]] - 3 Cos[u[t]]^2 Cos[v[t]] - 48 Cos[u[t]]^4 Cos[v[t]] + 48 Cos[u[t]]^6 Cos[v[t]] - 60 Sin[u[t]] + 5 Cos[u[t]] Cos[v[t]] Sin[u[t]] - 5 Cos[u[t]]^3 Cos[v[t]] Sin[u[t]] - 
    80 Cos[u[t]]^5 Cos[v[t]] Sin[u[t]] + 80 Cos[u[t]]^7 Cos[v[t]] Sin[u[t]])
T[t_] := FullSimplify[m/2 (D[x[t], t]^2 + D[y[t], t]^2 + D[z[t], t]^2)]
V[t_] := m g z[t]
L = T[t] - V[t];
equ = D[D[L, u'[t]], t] - D[L, u[t]];
eqv = D[D[L, v'[t]], t] - D[L, v[t]];

m = 1; g = 1;
sol = NDSolve[{equ == 0, eqv == 0, u[0] == \[Pi], u'[0] == 0, v[0] == 0, v'[0] == 0.1}, {u[t], v[t]}, {t, 0, 100}, Method -> {"EquationSimplification" -> "Residual"}]
m =.; g =.;

p1 = Table[
   Show[
    ParametricPlot3D[{-(2/15) Cos[u] (3 Cos[v] - 30 Sin[u] + 90 Cos[u]^4 Sin[u] - 60 Cos[u]^6 Sin[u] + 5 Cos[u] Cos[v] Sin[u]),
      2/15 (3 + 5 Cos[u] Sin[u]) Sin[v],
      1/15 Sin[u] (3 Cos[v] - 3 Cos[u]^2 Cos[v] - 48 Cos[u]^4 Cos[v] + 48 Cos[u]^6 Cos[v] - 60 Sin[u] + 5 Cos[u] Cos[v] Sin[u] - 5 Cos[u]^3 Cos[v] Sin[u] - 80 Cos[u]^5 Cos[v] Sin[u] + 
         80 Cos[u]^7 Cos[v] Sin[u]) }
     , {u, 0, \[Pi]}, {v, 0, 2 \[Pi]}, PlotStyle -> {Opacity[0.5]}, Boxed -> False, Axes -> False]
    ,
    Graphics3D[{Black, 
      Sphere[Evaluate[{x[t], y[t], z[t]} /. sol][[1]] /. {t -> \[Tau]max}, 0.1]}]
    ,
    ParametricPlot3D[
     Evaluate[{x[t], y[t], z[t]} /. sol][[1]] /. {t -> \[Tau]}, {\[Tau], 0, \[Tau]max}, PlotStyle -> {Black, Thick, Dashed}]
    ]
   , {\[Tau]max, 0.01, 100, 0.5}];
ListAnimate[p1]

Licensing[edit]

I, the copyright holder of this work, hereby publish it under the following license:
Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current12:40, 12 May 2020Thumbnail for version as of 12:40, 12 May 2020451 × 576 (10.78 MB)Berto (talk | contribs)Uploaded own work with UploadWizard

There are no pages that use this file.

Metadata