Norma[p_]:=Sqrt[p[[1]]^2+p[[2]]^2+p[[3]]^2](*pomocna funkce NORMA VEKTORU *)

p={1+Cos[t], Sin[t], 2 Sin[t/2]} (*VIVIANI*)

p1=D[p, t] (*DERIVACE*)

p2=D[p1, t]

p3=D[p2, t]

krivost=Simplify[Norma[Cross[p1,p2]]/Norma[p1]^3]

torze=Simplify[Det[{p1,p2,p3}]/Norma[Cross[p1,p2]]]

plot1=ParametricPlot3D[p, {t, 0, 4 Pi}, PlotStyle->{Blue, Thick}]

Show[ContourPlot3D[x^2+y^2+z^2==4, {x, -2.2, 2.2}, {y, -2.2, 2.2},  {z, -2.2, 2.2}], ContourPlot3D[(x-1)^2+y^2==1, {x, -2.2, 2.2}, {y, -2.2, 2.2},  {z, -2.2, 2.2}], plot1]

rychlost=Simplify[Norma[p1]]

delka=N[Integrate[r, {t, 0, 4 Pi}]]