Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- A[v_, w_] := Cross[v, w]; (*Torsion Tensor*)
- Subscript[e, 1] = {1, 0, 0}; (* Reference frame *)
- Subscript[e, 2] = {0, 1, 0};
- Subscript[e, 3] = {0, 0, 1};
- alpha[t_] := {0, t, Sin[2 \[Pi] t]}; (* Curve *)
- tmax = 10.; (* Max value for t parameter *)
- Do[
- Subscript[\[CapitalGamma], i, j, k][x_] :=
- A[Subscript[e, i], Subscript[e, j]][[k]],
- {i, 3}, {j, 3}, {k, 3}]
- ParallelTransport[v0_] :=
- NDSolve[Flatten[{
- Table[
- D[Subscript[Z, k][t], t] +
- Sum[Subscript[\[CapitalGamma],
- i\[InvisibleComma]j\[InvisibleComma]k][alpha[t]]*
- alpha'[t][[i]]*Subscript[Z, j][t], {i, 3}, {j, 3}] == 0, {k,
- 3}],
- Table[Subscript[Z, k][0] == v0[[k]], {k, 3}]}],
- Table[Subscript[Z, k][t], {k, 3}],
- {t, 0, tmax}];
- solutions = Table[ParallelTransport[Subscript[e, k]][[1]], {k, 3}];
- fun1[t_] :=
- Evaluate[Table[Subscript[Z, k][t], {k, 3}] /. solutions[[1]]];
- fun2[t_] :=
- Evaluate[Table[Subscript[Z, k][t], {k, 3}] /. solutions[[2]]];
- fun3[t_] :=
- Evaluate[Table[Subscript[Z, k][t], {k, 3}] /. solutions[[3]]];
- MyFrame[s_] :=
- Show[{
- ParametricPlot3D[alpha[t], {t, 0, tmax}],
- Graphics3D[{Arrowheads[0.03],
- Red, Arrow[{alpha[s], alpha[s] + fun1[s]}],
- Blue, Arrow[{alpha[s], alpha[s] + fun2[s]}],
- Green, Arrow[{alpha[s], alpha[s] + fun3[s]}]
- }]
- }, PlotRange -> {{-1, 1}, {-1, 10}, {-2, 2}},
- ViewPoint -> {1, 1, 1}, Boxed -> False, Axes -> False,
- PlotRangePadding -> 0., ImagePadding -> None, Background -> None,
- ImageSize -> 500]
- Manipulate[MyFrame[s], {s, 0, tmax}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement