Uebungen in Mathematica

WIR93

Animation mit der schwingenden Saite

"Putzmaschine" einsetzen

Remove["Global`*"] ;

Saite 1

Funktion definieren

a = 0.5; aA = 1; ω = 2;
y[x_, t_] := 
        Which[t ≥ x/a, aA Sin[ω (t - x/a)] + 1, 
          t < x/a, 0];

?AxesOrigin

Options[Plot]

Animation

ani1 = 
        Table[Plot[{y[x, t], 0, 2}, {x, 0, 1}, PlotRange -> {0, 2}, 
            Ticks -> False, AxesOrigin -> {0, 0}, 
            PlotStyle -> {Thickness[ .02]}, 
            PlotRegion -> {{0.1, 0.8}, {0.1, 0.8}}], {t, 0, 2  N[Pi], 
            2  N[Pi]/40. }];

Array

Show[GraphicsArray[Partition[ani1, 5]]];

Saite 2

f[t_, 
        c_] := (Sin[t] Sin[c] + Sin[2  t]/3 Sin[2  c] + 
          Sin[3  t]/5 Sin[3  c] + Sin[4  t]/7 Sin[4  c] + 
          Sin[6  t]/9 Sin[5  c])

ani2 = 
        Table[Plot[f[t, c], {t, 0, 2  Pi}, PlotRange -> {-1.5, 1.5}, 
            Ticks -> False], {c, 0, 4  Pi, 2  Pi/4 0.1}];