Definovanie 1D vektoroveho pola

Vykreslite drahu bodu definovanu x (t) = t + Cos (t) a y (t) = t + 2 Sin (t) pre cas od  0 do 20

x[t_] := t + Cos[t];
y[t_]:=t + Sin[t];
draha = ParametricPlot[{x[t], y[t]},{t,0,20}]

Vykreslite priebeh rychlosti

vx[t_]:=D[x[t],t]
vy[t_]:=D[y[t],t]

rychlost = ParametricPlot[{vx[t]/.t->u, vy[t]/.t->u},{u,0,20}]

Vykreslite vektor rychlosti

Graphics[Table[{Hue[i/20],Arrow[{{x[t],y[t]},{x[t]+vx[t],y[t]+vy[t]}}/.t->i]},{i,0,20,0.2}]]

Vykreslite vektor rychlosti tak, aby jeho farba zodpovedala jeho velkosti

maximum = Max[Table[{Sqrt[vx[t]^2+vy[t]^2]/.t->u},{u,0,20,0.2}]];
minimum = Min[Table[{Sqrt[vx[t]^2+vy[t]^2]/.t->u},{u,0,20,0.2}]];
maximum//N
sipky = Graphics[
Table[
{ColorData["AvocadoColors",
 ((Sqrt[vx[t]^2+vy[t]^2]/.t->u)-minimum)/
(maximum - minimum)],
Arrow[{{x[t],y[t]},{x[t]+vx[t],y[t]+vy[t]}}/.t->u]},
{u,0,20,0.3}]]

Vetvorte funkciu na vykreslenie priebehu rychlosti na samotnej drahe ako vektory

drahavektorplot[draha_List, cas_, pocetusekov_]:=
Module[{x,y,vx, vy, Maximum, Minimum,drahaplot,sipky},
x[u_] =draha[[1]]/.t->u;
y[u_]=draha[[2]]/.t->u;
vx[t_]:=D[x[t],t];
vy[t_]:=D[y[t],t];
Maximum = Max[Table[{Sqrt[vx[t]^2+vy[t]^2]/.t->u},{u,0,cas,0.2}]];
Minimum = Min[Table[{Sqrt[vx[t]^2+vy[t]^2]/.t->u},{u,0,cas,0.2}]];
drahaplot = ParametricPlot[{x[t], y[t]},{t,0,cas}];
sipky = Graphics[
Table[
{ColorData["BrightBands",
 ((Sqrt[vx[t]^2+vy[t]^2]/.t->u)-minimum)/
(maximum - minimum)],
Arrow[{{x[t],y[t]},{x[t]+vx[t],y[t]+vy[t]}}/.t->u]},
{u,0,cas,cas/pocetusekov}]];
Show[{drahaplot,sipky}, PlotRange->All]
]

drahavektorplot[{Sin[t]^2+t,Cos[t]^2}, 4,50]

Definovanie 2 D vektoroveho pola

Needs["VectorFieldPlots`"]
Needs["VectorAnalysis`"]

Vykreslite rozlozenie teploty , ktorej priebeh je definovany T (x, y) = 10 Sqrt (x + 5)^2 + ((xy)^2)/4 - Plot3D, DensityPlot, ContourPlot na stvorci - 10, 10

Clear[T]
T[x_,y_]:=10Sqrt[(x+5)^2 + ((x y)^2)/4]
Plot3D[T[x,y],{x,-10, 10},{y,-10,10},PlotRange->All, ColorFunction->(ColorData["DarkRainbow"][#3]&)]

DensityPlot[T[x,y],{x,-10, 10},{y,-10,10},PlotRange->All]

ciary = ContourPlot[T[x,y],{x,-10, 10},{y,-10,10},PlotRange->All]

Vytvorte gradient teplotneho pola, vektorovo ho vykreslite a porovnajte s ContourPlot

Tgx[x_,y_] =D[T[x,y],x];
Tgy[x_,y_] =D[T[x,y],x];
vektory = VectorFieldPlot[{Tgx[x,y],Tgy[x,y]},{x,-10,10},{y,-10,10}];
Show[ciary, vektory]

Skumanie prudenia latky

Elektrostaticke pole