mat[a_]:={{Cos[a],-Sin[a]},{Sin[a],Cos[a]}}

MatrixForm[mat[a]]

valerio@mat.uniroma3.it
(falco@mat.uniroma3.it)

Det[mat[a]]

MatrixForm[mat[Pi/2]]

(({{0, -1}, {1, 0}})).{1,0}

mat[Pi/2].{1,0}

{{0,-1},{1,0}}.{1,0}

spir1[a_][t_]:=a*t*{Cos[t],Sin[t]}

spirlog[a_,b_][t_]:=a*Exp[b*t]*{Cos[t],Sin[t]}

mat[a_]:={{Cos[a],-Sin[a]},{Sin[a],Cos[a]}}

(* vertici del poligono regolare di n lati inscritto nella circonferenza di centro l'origine e raggio 1 *)

vpol[n_]:=Table[{Cos[k*2Pi/n],Sin[k*2Pi/n]},{k,0,n}]

N[vpol[7]]

vpol[4]

(* traslo il poligono in direzione orizzontale *)

Map[#+{1,0}&,vpol[4]]

Manipulate[Graphics[{Red,Table[Line[Map[mat[k*2*Pi/m].(#+{x,0})&,a*vpol[n]]],{k,0,m-1}]},ImageSize->150,PlotRange->{{-3,3},{-3,3}},Axes->True,AspectRatio->Automatic],{n,2,64,1},{m,2,64,1},{{a,0.2},0,2},{{x,1},0,3},ControlPlacement->Right]

spirlog[a_,b_][t_]:=a*Exp[b*t]*{Cos[t],Sin[t]}

spirlog[0.1,0.1][t]

{1,1}+x*{Cos[k*2Pi/m],Sin[k*2Pi/m]}

Module[{m=5,n=5,a=0.8,x=1.5},
Show[{
Graphics[{Red,Table[Line[Map[({1,1}+mat[k*2*Pi/m].(#+{x,0}))&,a*vpol[n]]],{k,0,m-1}],Blue,Table[Circle[{1,1}+x*{Cos[k*2Pi/m],Sin[k*2Pi/m]},a/2],{k,0,m-1}]},ImageSize->150,PlotRange->{{-3,3},{-3,3}},Axes->True,AspectRatio->Automatic],ParametricPlot[Table[{1,1}+(mat[k*2*Pi/m].(spirlog[0.1,0.1][t]+{x,0})),{k,0,m-1}],{t,0,4Pi},PlotStyle->Magenta]}]
]

Module[{m=5,n=5,a=0.8,x=1.5},
Show[{
Graphics[{Red,Table[Line[Map[mat[k*2*Pi/m].(#+{x,0})&,a*vpol[n]]],{k,0,m-1}],Blue,Table[Circle[x*{Cos[k*2Pi/m],Sin[k*2Pi/m]},a/2],{k,0,m-1}]},ImageSize->150,PlotRange->{{-3,3},{-3,3}},Axes->True,AspectRatio->Automatic]
,ParametricPlot[Table[mat[k*2*Pi/m].(spirlog[0.1,0.1][t]+{x,0}),{k,0,m-1}],{t,0,4Pi},PlotStyle->Magenta]}]
]

Module[{m=5,n=5,a=0.4,x=1.5},Graphics[{Red,Table[Line[Map[mat[k*2*Pi/m].(#+{x,0})&,a*vpol[n]]],{k,0,m-1}],Blue,Table[Circle[x*{Cos[k*2Pi/m],Sin[k*2Pi/m]},a/2],{k,0,m-1}]},ImageSize->150,PlotRange->{{-3,3},{-3,3}},Axes->True,AspectRatio->Automatic]]

Manipulate[Graphics[{Red,Table[Line[Map[mat[k*2*Pi/m].(#+{x,0})&,a*vpol[n]]],{k,0,m-1}],Blue,Table[Circle[x*{Cos[k*2Pi/m],Sin[k*2Pi/m]},a/2],{k,0,m-1}]},ImageSize->150,PlotRange->{{-3,3},{-3,3}},Axes->True,AspectRatio->Automatic],{{n,5},2,64,1},{{m,5},2,64,1},{{a,0.4},0,2},{{x,1.5},0,3},ControlPlacement->Right]

Graphics[{Red,Point[0.2vpol[4]],Line[0.2vpol[4]],Table[Line[Map[mat[k*Pi/4].(#+{1,0})&,0.2vpol[3]]],{k,0,7}]},ImageSize->200,PlotRange->{{-3,3},{-3,3}},Axes->True,AspectRatio->Automatic]

Graphics[{Red,Point[0.2vpol[4]],Line[0.2vpol[4]],Table[Line[Map[mat[k*Pi/4].(#+{1,0})&,0.2vpol[4]]],{k,0,7}]},ImageSize->200,PlotRange->{{-3,3},{-3,3}},Axes->True,AspectRatio->Automatic]

Graphics[{Red,Point[0.2vpol[4]],Line[0.2vpol[4]],Line[Map[#+{1,0}&,0.2vpol[4]]]},ImageSize->200,PlotRange->{{-3,3},{-3,3}},Axes->True,AspectRatio->Automatic]

Graphics[{Red,Point[vpol[4]]},ImageSize->200,PlotRange->{{-3,3},{-3,3}},Axes->True]

ParametricPlot[
Table[{1.5,0}+mat[k*Pi/2].({1,0}+spirlog[0.1,0.05][t]-{1.5,0}),{k,0,3}]
,{t,0,8Pi},PlotRange->{{-3,3},{-3,3}},ImageSize->200]

ParametricPlot[
Table[mat[k*Pi/4].({1,0}+spirlog[0.1,0.05][t]),{k,0,7}]
,{t,0,8Pi},PlotRange->{{-2,2},{-2,2}},ImageSize->200]

ParametricPlot[{
{1,0}+spirlog[0.1,0.05][t],mat[Pi/2].({1,0}+spirlog[0.1,0.05][t])
},{t,0,8Pi},PlotRange->{{-2,2},{-2,2}},ImageSize->200]

ParametricPlot[{1,0}+spirlog[0.1,0.05][t],{t,0,8Pi},PlotRange->{{-2,2},{-2,2}},ImageSize->200]

ParametricPlot[spirlog[0.1,0.05][t],{t,0,8Pi},PlotRange->{{-2,2},{-2,2}},ImageSize->200]

ParametricPlot[{spir1[1][t],spirlog[0.5,0.25][t]},{t,0,4Pi}]

ParametricPlot[{spir1[1][t],spir1[0.5][t]},{t,0,4Pi}]

ParametricPlot[spir1[1][t],{t,0,2Pi}]

(* mrot2 matrice generica rotazione *)

(* Id + M*Sin[teta] + (M^2)*(!-Cos[teta])  *)

mrot2[{a_,b_,c_},teta_]:=Block[{ris,m,an,bn,cn},
{an,bn,cn}={a,b,c}/Norm[{a,b,c}];
m={{0,-cn,bn},{cn,0,-an},{-bn,an,0}};
ris={{1,0,0},{0,1,0},{0,0,1}}+m*Sin[teta]+
m.m*(1-Cos[teta]);
Return[ris];];

MatrixForm[mrot2[{1,1,0},teta]]

MatrixForm[mrot2[{1,0,0},teta]]

MatrixForm[mrot2[{0,0,1},teta]]

MatrixForm[mrot2[{0,1,0},teta]]

m = {{0,-c,b},{c,0,-a},{-b,a,0}}

MatrixForm[m]

MatrixForm[m.m]

(* m = {{0,-c,b},{c,0,-a},{-b,a,0}} , vettore di rotazione*)

(({{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}))+(({{0, -c, b}, {c, 0, -a}, {-b, a, 0}}))*Sin[teta]+(({{-(b^2)-(c^2), a b, a c}, {a b, -(a^2)-(c^2), b c}, {a c, b c, -(a^2)-(b^2)}}))*(1-Cos[teta])

MatrixForm[(({{0, -c, b}, {c, 0, -a}, {-b, a, 0}})).(({{0, -c, b}, {c, 0, -a}, {-b, a, 0}}))]

m^2=(({{-(b^2)-(c^2), a b, a c}, {a b, -(a^2)-(c^2), b c}, {a c, b c, -(a^2)-(b^2)}}))

(* Id + M*Sin[teta] + (M^2)*(!-Cos[teta])  *)

MatrixForm[mrot2[{1,0,0},teta]]

MatrixForm[mrot2[{0,0,25},teta]]

MatrixForm[mrot2[{0,1,0},teta]]

MatrixForm[mrot2[{1.,2.,3.},Pi/4]]

assi=ParametricPlot3D[{{.03Cos[u],.03Sin[u],v},{.03Cos[u],v,.03Sin[u]},{v,.03Cos[u],.03Sin[u]}},{u,0,2Pi},{v,-1.5,1.5},Mesh->None,PlotRange->{{-1.5,1.5},{-1.5,1.5},{-1.5,1.5}}]

Show[{assi,ParametricPlot3D[{Cos[u],Sin[u],v},{u,0,2Pi},{v,-1,1},Mesh->None,ImageSize->200]}]

Manipulate[Show[{assi,ParametricPlot3D[{Cos[u],Sin[u],v},{u,0,2Pi},{v,-1,1},Mesh->None],ParametricPlot3D[mrot2[{1,0,0},teta].{Cos[u],Sin[u],v},{u,0,2Pi},{v,-1,1},Mesh->None]},ImageSize->200],{teta,0.001,2Pi}]

Manipulate[Show[{assi,ParametricPlot3D[{Cos[u],Sin[u],v},{u,0,2Pi},{v,-1,1},Mesh->None],ParametricPlot3D[mrot2[{1,1,0},teta].{Cos[u],Sin[u],v},{u,0,2Pi},{v,-1,1},Mesh->None]},ImageSize->200],{teta,0,2Pi}]

Show[{assi,ParametricPlot3D[{3+Cos[u],Sin[u],v},{u,0,2Pi},{v,-1,1},Mesh->None],ParametricPlot3D[mrot2[{0,0,1},Pi/3].{3+Cos[u],Sin[u],v},{u,0,2Pi},{v,-1,1},Mesh->None]},ImageSize->200,PlotRange->All]

Show[{assi,ParametricPlot3D[{3+Cos[u],Sin[u],v},{u,0,2Pi},{v,-1,1},Mesh->None,ImageSize->200],ParametricPlot3D[mrot2[{0,0,1},Pi/3].{3+Cos[u],Sin[u],v},{u,0,2Pi},{v,-1,1},Mesh->None]},PlotRange->{{-5,5},{-5,5},{-5,5}}]

Manipulate[Show[{assi,ParametricPlot3D[mrot2[{1,2,3},k].{3+Cos[u],Sin[u],v},{u,0,2Pi},{v,-1,1},Mesh->None]},PlotRange->{{-5,5},{-5,5},{-5,5}}],{k,0,2Pi}]

Show[{assi,Table[ParametricPlot3D[mrot2[{1,2,3},k*Pi/3].{3+Cos[u],Sin[u],v},{u,0,2Pi},{v,-1,1},Mesh->None],{k,1,6}]},PlotRange->{{-5,5},{-5,5},{-5,5}}]

Show[{assi,ParametricPlot3D[{Cos[v]Cos[u],Cos[v]Sin[u],Sin[v]},{u,0,2Pi},{v,-Pi/2,Pi/2}],Table[ParametricPlot3D[mrot2[{0,0,3},k*Pi/3].{2+v,0.3Sin[u],0.3Cos[u]},{u,0,2Pi},{v,-1,1},Mesh->None],{k,1,6}]},PlotRange->{{-5,5},{-5,5},{-5,5}}]

Show[{assi,ParametricPlot3D[{Cos[v]Cos[u],Cos[v]Sin[u],Sin[v]},{u,0,2Pi},{v,0,Pi/2},Mesh->None],Table[ParametricPlot3D[mrot2[{0,0,3},k*Pi/3].{1.9+v,0.3Sin[u],0.3Cos[u]},{u,-Pi/2,Pi/2},{v,-1,1},Mesh->None],{k,1,6}]}]

Show[{assi,Table[ParametricPlot3D[mrot2[{0,0,3},k*Pi/3].{3+Cos[u],Sin[u],v},{u,0,2Pi},{v,-1,1},Mesh->None],{k,1,6}]},PlotRange->{{-5,5},{-5,5},{-5,5}}]

Show[{assi,Table[ParametricPlot3D[mrot2[{1,2,3},k*Pi/3].{3+Cos[u],Sin[u],v},{u,0,2Pi},{v,-1,1},Mesh->None],{k,1,6}]},PlotRange->{{-5,5},{-5,5},{-5,5}}]

ParametricPlot3D[mrot2[{1,2,3},Pi/6].{Cos[u],Sin[u],v},{u,0,2Pi},{v,-1,1},Mesh->None,ImageSize->200]

{{0,-3,2},{3,0,-1},{-2,1,0}}.{x,y,z}

Manipulate[Show[{assi,ParametricPlot3D[mrot2[{1,2,3},k].{Cos[u],Sin[u],v},{u,0,2Pi},{v,-1,1},Mesh->None,ImageSize->200,PlotRange->{{-1.5,1.5},{-1.5,1.5},{-1.5,1.5}},PlotPoints->10],Graphics3D[{Thickness[.01],Line[{-{1,2,3},{1,2,3}}]}]}],{k,0,2Pi,Pi/6}]

Show[{assi,
ParametricPlot3D[Table[mrot2[{0,0,1},j*2Pi/3].(mrot2[{1,2,3},Pi/3].{.2Cos[u],.2Sin[u],v}),{j,1,3}],{u,0,2Pi},{v,0,1},Mesh->None,ImageSize->200,PlotRange->{{-1.5,1.5},{-1.5,1.5},{-1.5,1.5}},PlotPoints->10],
ParametricPlot3D[{.2Cos[u],.2Sin[u],v},{u,0,2Pi},{v,-10,0},Mesh->None,PlotPoints->10],Graphics3D[{Thickness[.01],Line[{-{1,2,3},{1,2,3}}]}]}]

Show[{assi,
ParametricPlot3D[Table[mrot2[{0,0,1},j*2Pi/5].(mrot2[{1,2,3},Pi/3].{.2Cos[u],.2Sin[u],v}),{j,1,5}],{u,0,2Pi},{v,0,1},Mesh->None,ImageSize->200,PlotRange->{{-1.5,1.5},{-1.5,1.5},{-1.5,1.5}},PlotPoints->10],
ParametricPlot3D[{.2Cos[u],.2Sin[u],v},{u,0,2Pi},{v,-10,0},Mesh->None,PlotPoints->10],Graphics3D[{Thickness[.01],Line[{-{1,2,3},{1,2,3}}]}]}]

Manipulate[Show[{assi,ParametricPlot3D[mrot2[{1,2,3},k].{Cos[u],Sin[u],v},{u,0,2Pi},{v,-10,10},Mesh->None,ImageSize->200,PlotRange->{{-1.5,1.5},{-1.5,1.5},{-1.5,1.5}},PlotPoints->10],Graphics3D[{Thickness[.01],Line[{-{1,2,3},{1,2,3}}]}]}],{k,0,2Pi,Pi/6}]

Show[{assi,Graphics3D[Point[Table[mrot2[{1,2,3},k].{1,0,0},{k,0,2Pi,Pi/6}]],PlotRange->{{-1.5,1.5},{-1.5,1.5},{-1.5,1.5}}],Graphics3D[{Thickness[.01],Line[{-{1,2,3},{1,2,3}}]}]}]

ParametricPlot3D[Table[mrot2[{0,0,1},k*2Pi/5].(mrot2[{1,2,1},Pi/3].{.2Cos[u],.2Sin[u],v}),{k,1,5}],{u,0,2Pi},{v,-1,1},Mesh->None,ImageSize->200,PlotRange->{{-1.5,1.5},{-1.5,1.5},{-1.5,1.5}}]

Show[{ParametricPlot3D[mrot2[{1,2,3},Pi/6].{Cos[u],Sin[u],v},{u,0,2Pi},{v,-1,1},Mesh->None,ImageSize->200],ParametricPlot3D[mrot2[{1,2,3},Pi/6].{Cos[u],Sin[u],v}/.u->5v,{v,-1,1},Mesh->None,PlotStyle->{Green,Thick},ImageSize->200]}]

ParametricPlot3D[{{Cos[u],Sin[u],v},mrot2[{1,2,3},Pi/6].{Cos[u],Sin[u],v}},{u,0,2Pi},{v,-1,1},Mesh->None,ImageSize->200]

N[mrot2[{1,2,3},Pi/6].{Cos[u],Sin[u],v}]

Show[{
ParametricPlot3D[{({1,0,0}+0.3{Cos[u],Sin[u],v}),mrot2[{1,2,1},Pi/3].({1,0,0}+0.3{Cos[u],Sin[u],v})},{u,0,2Pi},{v,-1,1}],
Graphics3D[{Thick,Red,Line[{{-1,-2,-1},{1,2,1}}]}]}
,PlotRange-> {{-2,2},{-2,2},{-2,2}}]

Manipulate[Show[{
ParametricPlot3D[{({1,0,0}+0.3{Cos[u],Sin[u],v}),mrot2[{1,2,1},k].({1,0,0}+0.3{Cos[u],Sin[u],v})},{u,0,2Pi},{v,-1,1}],
Graphics3D[{Thick,Red,Line[{{-1,-2,-1},{1,2,1}}]}]}
,PlotRange-> {{-2,2},{-2,2},{-2,2}}],{k,0,2Pi}]

Manipulate[Animate[Show[{
ParametricPlot3D[{({1,0,0}+0.3{Cos[u],Sin[u],v}),mrot2[{0,h,1},k].({1,0,0}+0.3{Cos[u],Sin[u],v})},{u,0,2Pi},{v,-1,1}],
Graphics3D[{Thick,Red,Line[{{0,-2h,-2},{0,2h,2}}]}]}
,PlotRange-> {{-2,2},{-2,2},{-2,2}}],{k,0,2Pi}],{h,0,2}]

ParametricPlot3D[{{Cos[u],v,Sin[u]},{v,Cos[u],Sin[u]}},{u,0, Pi},{v,-1,1},]

ParametricPlot3D[{Cos[u],v,Sin[u]},{u,0, Pi},{v,-1,1},RegionFunction->Function[{x,y,z},z^2+y^2>1]]

ParametricPlot3D[{v,Cos[u],Sin[u]},{u,0, Pi},{v,-1,1},RegionFunction->Function[{x,y,z},z^2+x^2>1]]

Show[{
ParametricPlot3D[{Cos[u],v,Sin[u]},{u,0, Pi},{v,-1,1},RegionFunction->Function[{x,y,z},z^2+y^2>1],PlotPoints->40],
ParametricPlot3D[{v,Cos[u],Sin[u]},{u,0, Pi},{v,-1,1},RegionFunction->Function[{x,y,z},z^2+x^2>1],PlotPoints->40]
},PlotRange->{{-1,1},{-1,1},{0,1}}]