(* {a*t,a}-h{Sin[t],Cos[t]} raggio=1 *)

cicloide[a_][h_][t_]:={a*t-h*Sin[t],a-h*Cos[t]}

cicloide3D[a_][h_][t_]:={a*t-h*Sin[t],a-h*Cos[t],0}

cicloide3D[1][1][t]

ParametricPlot3D[{Sin[t],Sin[2t],Cos[t]},{t,0,4Pi}]

f[t_]:={Sin[t],Sin[2t],Cos[t]}

f[t]

ParametricPlot3D[f[t],{t,0,2Pi}]

D[Cos[t],t]

D[f[t],t]

D[f[t],t].D[f[t],t]

(* |v|=(v.v)^(1/2) *)

(D[f[t],t].D[f[t],t])^(1/2)

(* modulo di un vettore v *)

modulo[v_]:=(v.v)^(1/2)

(* versore tangente per la curva g[t] *)

tangent[g_][t_]:=Simplify[D[g[tt],tt]/modulo[D[g[tt],tt]]]/.tt->t

(* versore binormale per la curva g[t] *)

binormal[g_][t_]:=Simplify[Cross[D[g[tt],tt],D[g[tt],{tt,2}]]/modulo[Cross[D[g[tt],tt],D[g[tt],{tt,2}]]]]/.tt->t

(* versore normale per la curva g[t] *)

normal[g_][t_]:=Cross[binormal[g][t],tangent[g][t]]

ParametricPlot3D[f[t],{t,0.0001,2Pi},ImageSize->200]

Show[{ParametricPlot3D[f[t],{t,0,2Pi},ImageSize->200],Graphics3D[{PointSize[.05],Point[f[0]]}]}]

Manipulate[Show[{ParametricPlot3D[f[t],{t,0,2Pi},ImageSize->200],Graphics3D[{PointSize[.05],Point[f[tfix]]}]}],{tfix,0,2Pi}]

Manipulate[Show[{ParametricPlot3D[f[t],{t,0,2Pi},ImageSize->200],Graphics3D[{Red,Sphere[f[tfix],.05]}]}],{tfix,0,2Pi}]

Manipulate[Show[{ParametricPlot3D[f[t],{t,0,2Pi},ImageSize->200],Graphics3D[{Red,Sphere[f[tfix],.05],{Line[{f[tfix],f[tfix]+tangent[f][tfix]}],Line[{f[tfix],f[tfix]+normal[f][tfix]}],Line[{f[tfix],f[tfix]+binormal[f][tfix]}]}}]}],{tfix,0,2Pi}]

Manipulate[Show[{ParametricPlot3D[f[t],{t,0,2Pi},ImageSize->400,PlotLabel->f[t],PlotLegends->PointLegend[{Red,Blue,Green},{"tangente","normale","binormale"}]],Graphics3D[{Red,Sphere[f[tfix],.03],Cylinder[{f[tfix],f[tfix]+.3tangent[f][tfix]},.015],
Blue,Cylinder[{f[tfix],f[tfix]+.3normal[f][tfix]},.015],Green,Cylinder[{f[tfix],f[tfix]+.3binormal[f][tfix]},.015]}]}],{tfix,0,2Pi}]

normal[f][t]

Cross[D[g[t],t],D[g[t],{t,2}]]

Simplify[binormal[f][t]]

binormal[f][t]

f[t]

tangent[f][t]

binormal[gamma_][t_]:=Simplify[Cross[D[gamma[tt],tt],D[gamma[tt],{tt,2}]]/(Cross[D[gamma[tt],tt],D[gamma[tt],{tt,2}]].Cross[D[gamma[tt],tt],D[gamma[tt],{tt,2}]])^(1/2)] /. tt->t

normal[gamma_][t_]:=Simplify[Cross[binormal[gamma][tt],tangent[gamma][tt]]] /. tt->t

curvatura[gamma_][t_]:= Simplify[(Cross[D[gamma[tt],tt],D[gamma[tt],{tt,2}]].Cross[D[gamma[tt],tt],D[gamma[tt],{tt,2}]])^(1/2)/(D[gamma[tt],tt].D[gamma[tt],tt])^(3/2)] /. tt->t

torsione[gamma_][t_]:=Simplify[(Cross[D[gamma[tt],tt],D[gamma[tt],{tt,2}]].D[gamma[tt],{tt,3}])/(Cross[D[gamma[tt],tt],D[gamma[tt],{tt,2}]].Cross[D[gamma[tt],tt],D[gamma[tt],{tt,2}]])] /. tt->t

ParametricPlot3D[{t-Sin[t],0,1-Cos[t]},{t,0,4Pi}]

ParametricPlot3D[{t-Sin[t],1-Cos[t],0},{t,0,4Pi}]

ParametricPlot3D[cicloide3D[1][1][t],{t,0,4Pi}]

cicloide[1][1][t]

ParametricPlot[cicloide[1][1][t],{t,0,4Pi}]

Manipulate[ParametricPlot[cicloide[1][1][t],{t,0,4Pi},Epilog->Point[cicloide[1][1][k]]],{k,0,4Pi}]

Manipulate[ParametricPlot[cicloide[1][1][t],{t,0.0001,k},PlotRange->{{0,4Pi},{0,2}},Epilog->Point[cicloide[1][1][k]]],{k,0,4Pi}]

(* centro=(a*t,a)   a=1  *)

Manipulate[ParametricPlot[cicloide[1][1][t],{t,0.0001,k},PlotRange->{{0,4Pi},{0,2}},Epilog->{Point[cicloide[1][1][k]],Circle[{k,1},1]}],{k,0,4Pi}]

Manipulate[ParametricPlot[cicloide[1][1][t],{t,0.0001,k},PlotRange->{{0,4Pi},{0,2}},Epilog->{Point[cicloide[1][1][k]],Circle[{k,1},1],Line[{{k,1},cicloide[1][1][k]}]}],{k,0,4Pi}]

ipocicloide[a_,b_][t_]:={(a-b)*Cos[t]+b*Cos[(a-b)/b*t],(a-b)*Sin[t]-b*Sin[(a-b)/b*t]}

ipotrocoide[a_,b_][h_][t_]:={(a-b)*Cos[t]+b*h*Cos[(a-b)/b*t],(a-b)*Sin[t]-b*h*Sin[(a-b)/b*t]}

epicicloide[a_,b_][t_]:={(a+b)*Cos[t]-b*Cos[(a+b)/b*t],(a+b)*Sin[t]-b*Sin[(a+b)/b*t]}

epitrocoide[a_,b_][h_][t_]:={(a+b)*Cos[t]-b*h*Cos[(a+b)/b*t],(a+b)*Sin[t]-b*h*Sin[(a+b)/b*t]}

vis[gamma_,hv_]:=Manipulate[ParametricPlot[gamma[t],{t,0,k},PlotRange->{{-a-2b,a+2b},{-a-2b,a+2b}},Epilog->{Circle[{k,1},1],Point[cicloide[1,1][k]],Line[{{k,1},cicloide[1,1][k]}]}],{k,0.0001,6Pi}]

epitrocoidev[a_,b_,c_,d_][h_][t_]:={c*(a+b)*Cos[t]-b*h*Cos[(a+b)/b*t],d*(a+b)*Sin[t]-b*h*Sin[(a+b)/b*t]}

epitrocoidell[a1_,a2_,b_][h_][t_]:={(a1+b*a2/Norm[{a2*Cos[t],a1*Sin[t]}])*Cos[t],(a2+b*a1/Norm[{a2*Cos[t],a1*Sin[t]}])*Sin[t]}-{b*h*Cos[lun[ellisse[0,0][a1,a2]][t]/b+t],b*h*Sin[lun[ellisse[0,0][a1,a2]][t]/b+t]}

ellisse[x0_,y0_][a_,b_][t_]:={x0+a*Cos[t],y0+b*Sin[t]}

ellisse3d[x0_,y0_][a_,b_][t_]:={x0+a*Cos[t],y0+b*Sin[t],0}

curvatura[gamma_][t_]:= Simplify[(Cross[D[gamma[tt],tt],D[gamma[tt],{tt,2}]].Cross[D[gamma[tt],tt],D[gamma[tt],{tt,2}]])^(1/2)/(D[gamma[tt],tt].D[gamma[tt],tt])^(3/2)] /. tt->t

epitrocoide3d[a_,b_][h_][t_]:={(a+b)*Cos[t]-b*h*Cos[(a+b)/b*t],(a+b)*Sin[t]-b*h*Sin[(a+b)/b*t],0}

ipotrocoide3d[a_,b_][h_][t_]:={(a-b)*Cos[t]+b*h*Cos[(a-b)/b*t],(a-b)*Sin[t]-b*h*Sin[(a-b)/b*t],0}

lun[gamma_][tf_]:=NIntegrate[Norm[D[gamma[tc],tc]],{tc,0,tf},AccuracyGoal->20]

cicloide[1][1][t]

Manipulate[ParametricPlot[cicloide[1][1][t],{t,0,k},PlotRange->{{0,6Pi},{0,2}},Epilog->{Circle[{k,1},1],Point[cicloide[1][1][k]],Line[{{k,1},cicloide[1][1][k]}]}],{k,0.0001,6Pi}]

ipocicloide[3,1][t]

Manipulate[ParametricPlot[ipocicloide[3,1][t],{t,0,k},PlotRange->{{-3,3},{-3,3}},ImageSize->200,Epilog->{Circle[{0,0},3],Circle[{2Cos[k],2Sin[k]},1],Point[ipocicloide[3,1][k]],Line[{{2Cos[k],2Sin[k]},ipocicloide[3,1][k]}]}],{k,0.0001,4Pi}]

Manipulate[ParametricPlot[ipocicloide[a,b][t],{t,0,k},PlotRange->{{-a,a},{-a,a}},ImageSize->150,Epilog->{Circle[{0,0},a],Circle[{(a-b)Cos[k],(a-b)Sin[k]},b],Point[ipocicloide[a,b][k]],Line[{{(a-b)Cos[k],(a-b)Sin[k]},ipocicloide[a,b][k]}]}],{{a,3},1,7},{{b,1},0.01,5},{k,0.0001,100Pi}]

epicicloide[3,1][t]

Manipulate[ParametricPlot[epicicloide[a,b][t],{t,0,k},PlotRange->{{-a-2b,a+2b},{-a-2b,a+2b}},ImageSize->150,Epilog->{Circle[{0,0},a],Circle[{(a+b)Cos[k],(a+b)Sin[k]},b],Point[epicicloide[a,b][k]],Line[{{(a+b)Cos[k],(a+b)Sin[k]},epicicloide[a,b][k]}]}],{{a,3},1,10},{{b,1},0.01,10},{k,0.0001,100Pi}]

ParametricPlot[{2Cos[2t]^3+Sin[5t],Sin[2t]},{t,0,20Pi},PlotRange->All]

ParametricPlot[{2Cos[2t]^3+Sin[5t],Sqrt[Sin[2t]]},{t,0,20Pi},PlotRange->All]

ParametricPlot[{2Cos[2t]+Sin[5t],Cos[t]},{t,0,20Pi},PlotRange->All]

ParametricPlot3D[{2Cos[2t]+Sin[5t],Cos[t],Sin[t]^2},{t,0,20Pi},PlotRange->All]

Factor[ipotrocoide[2,1][h][t]]

ipotrocoide[2,2/3][h][t]

Manipulate[ParametricPlot[ipotrocoide[a,b][h][t],{t,0,k},PlotRange->{{-a-h,a+h},{-a-h,a+h}},ImageSize->150,Epilog->{Circle[{0,0},a],Circle[{(a-b)Cos[k],(a-b)Sin[k]},b],Point[ipotrocoide[a,b][h][k]],Line[{{(a-b)Cos[k],(a-b)Sin[k]},ipotrocoide[a,b][h][k]}]}],{{a,2},1,7},{{b,1},0.01,5},{{h,.5},0,10},{k,0.0001,10Pi}]

ParametricPlot[

Manipulate[ParametricPlot[ipotrocoide[a,b][h][t],{t,0,k},PlotRange->{{-a-h,a+h},{-a-h,a+h}},ImageSize->150,Epilog->{Circle[{0,0},a],Circle[{(a-b)Cos[k],(a-b)Sin[k]},b],Point[ipotrocoide[a,b][h][k]],Line[{{(a-b)Cos[k],(a-b)Sin[k]},ipotrocoide[a,b][h][k]}]}],{{a,2},1,7},{{b,1},0.01,5},{{h,.5},0,10},{k,0.0001,10Pi}]

Manipulate[ParametricPlot[epitrocoide[a,b][h][t],{t,0,k},PlotRange->{{-a-(h+1)*b,a+(h+1)*b},{-a-(h+1)*b,a+(h+1)*b}},ImageSize->150,Epilog->{Circle[{0,0},a],Circle[{(a+b)Cos[k],(a+b)Sin[k]},b],Point[epitrocoide[a,b][h][k]],Line[{{(a+b)Cos[k],(a+b)Sin[k]},epitrocoide[a,b][h][k]}]}],{{a,2},1,7},{{b,1},0.01,5},{{h,1/3},0,5},{k,0.0001,4Pi}]

curvatura[ellisse3d[0,0][2,1]][t]

curvatura[ipotrocoide3d[2,1][1/3]][t]

curvatura[epitrocoide3d[2,1][1/3]][t]

Plot[curvatura[ellisse3d[0,0][2,1]][t],{t,0,2Pi},PlotRange->{0,2}]

Plot[curvatura[ipotrocoide3d[2,1][3]][t],{t,0,2Pi},PlotRange->{0,1}]

Plot[curvatura[epitrocoide3d[2,1][1/3]][t],{t,0,2Pi},PlotRange->{0,0.5}]

ParametricPlot[epitrocoide[a,b][h][t],{t,0,k},PlotRange->{{-a-(h+1)*b,a+(h+1)*b},{-a-(h+1)*b,a+(h+1)*b}},ImageSize->150,Epilog->{Circle[{0,0},a],Circle[{(a+b)Cos[k],(a+b)Sin[k]},b],Point[epitrocoide[a,b][h][k]],Line[{{(a+b)Cos[k],(a+b)Sin[k]},epitrocoide[a,b][h][k]}]}]/.{a->2,b->1,h->1/3,k->5.4}

Options[Plot]

GraphicsRow[{ParametricPlot[epitrocoide[a,b][h][t],{t,0,k},PlotRange->{{-3.5,3.5},{-3.5,3.5}},AxesLabel->{x,y},Ticks->None,ImageSize->150,Epilog->{Circle[{0,0},a],Circle[{(a+b)Cos[k],(a+b)Sin[k]},b],Point[epitrocoide[a,b][h][k]],Line[{{(a+b)Cos[k],(a+b)Sin[k]},epitrocoide[a,b][h][k]}]}]/.{a->2,b->1,h->1/3,k->5.4},Plot[curvatura[epitrocoide3d[2,1][1/3]][t],{t,0,2Pi},PlotRange->{{0,2Pi},{0,.5}},Ticks->{{0,Pi,2Pi},{0,.2,.4}},AxesLabel->{t,K}]},PlotLabel->"a)   h = (1/3)"]

figcycloid=GraphicsGrid[{{GraphicsRow[{ParametricPlot[epitrocoide[a,b][h][t],{t,0,k},PlotRange->{{-4,4},{-4,4}},AxesLabel->{x,y},Ticks->None,ImageSize->800,Epilog->{Circle[{0,0},a],Circle[{(a+b)Cos[k],(a+b)Sin[k]},b],Point[epitrocoide[a,b][h][k]],Line[{{(a+b)Cos[k],(a+b)Sin[k]},epitrocoide[a,b][h][k]}]}]/.{a->2,b->1,h->1,k->5.4},Plot[curvatura[epitrocoide3d[2,1][1]][t],{t,0,2Pi},PlotRange->{{0,2Pi},{0,1}},Ticks->{{0,Pi,2Pi},Table[.2k,{k,0,5}]},AxesLabel->{t,K}]},PlotLabel->"a)   h = 1"],GraphicsRow[{ParametricPlot[epitrocoide[a,b][h][t],{t,0,k},PlotRange->{{-4,4},{-4,4}},AxesLabel->{x,y},Ticks->None,ImageSize->800,Epilog->{Circle[{0,0},a],Circle[{(a+b)Cos[k],(a+b)Sin[k]},b],Point[epitrocoide[a,b][h][k]],Line[{{(a+b)Cos[k],(a+b)Sin[k]},epitrocoide[a,b][h][k]}]}]/.{a->2,b->1,h->2/3,k->5.4},Plot[curvatura[epitrocoide3d[2,1][2/3]][t],{t,0,2Pi},PlotRange->{{0,2Pi},{0,1}},Ticks->{{0,Pi,2Pi},Table[.2k,{k,0,5}]},AxesLabel->{t,K}]},PlotLabel->"b)   h = (2/3)"]},{GraphicsRow[{ParametricPlot[epitrocoide[a,b][h][t],{t,0,k},PlotRange->{{-3.5,3.5},{-3.5,3.5}},AxesLabel->{x,y},Ticks->None,ImageSize->800,Epilog->{Circle[{0,0},a],Circle[{(a+b)Cos[k],(a+b)Sin[k]},b],Point[epitrocoide[a,b][h][k]],Line[{{(a+b)Cos[k],(a+b)Sin[k]},epitrocoide[a,b][h][k]}]}]/.{a->2,b->1,h->1/3,k->5.4},Plot[curvatura[epitrocoide3d[2,1][1/3]][t],{t,0,2Pi},PlotRange->{{0,2Pi},{0,.5}},Ticks->{{0,Pi,2Pi},{0,.2,.4}},AxesLabel->{t,K}]},PlotLabel->"c)   h = (1/3)"],GraphicsRow[{ParametricPlot[epitrocoide[a,b][h][t],{t,0,k},PlotRange->{{-3.5,3.5},{-3.5,3.5}},AxesLabel->{x,y},Ticks->None,ImageSize->800,Epilog->{Circle[{0,0},a],Circle[{(a+b)Cos[k],(a+b)Sin[k]},b],Point[epitrocoide[a,b][h][k]],Line[{{(a+b)Cos[k],(a+b)Sin[k]},epitrocoide[a,b][h][k]}]}]/.{a->2,b->1,h->0,k->5.4},Plot[curvatura[epitrocoide3d[2,1][0]][t],{t,0,2Pi},PlotRange->{{0,2Pi},{0,.5}},Ticks->{{0,Pi,2Pi},{0,.2,.4}},AxesLabel->{t,K}]},PlotLabel->"d)   h = 0"]}},ImageSize->800]

Export["figcycloid.jpg",figcycloid]

GraphicsRow[{ParametricPlot[epitrocoide[2,1][1/3][t],{t,0,5.4},PlotRange->{{-3.5,3.5},{-3.5,3.5}},AxesLabel->{x,y},Epilog->{Circle[{0,0},2],Circle[{(2+1)Cos[5.4],(2+1)Sin[5.4]},1],Point[epitrocoide[2,1][1/3][5.4]],Line[{{(2+1)Cos[5.4],(2+1)Sin[5.4]},epitrocoide[2,1][1/3][5.4]}]}],Plot[curvatura[epitrocoide3d[2,1][1/3]][t],{t,0,2Pi},PlotRange->{{0,2Pi},{0,.5}},AxesLabel->{t,K}]},PlotLabel->"a) h = (1/3)"]

Manipulate[GraphicsRow[{ParametricPlot[epitrocoide[2,1][h][t],{t,0,2Pi}],Plot[curvatura[epitrocoide3d[2,1][h]][t],{t,0,2Pi},PlotRange->{{0,2Pi},{0,.5}}]}],{h,-1,1}]

D[curvatura[epitrocoide3d[2,1][h]][t],t]/.t->Pi/2

D[curvatura[epitrocoide3d[2,1][h]][t],{t,2}]/.t->Pi/2

Simplify[%]

FindRoot[%36,{h,.1}]

Solve[-1+2 h+15 (h^2)==0,h]

%19 /.h->1/3

lun[epitrocoide[2,1][1/3]][2Pi]

19.376896443633694`/2

9.688448221816847`

epitrocoide[2,1][1/3][t]

ellisse[0,0][2,1][t]

Norm[D[epitrocoide[2,1][1/3][t],t]]^2

(((3 Cos[t]-Cos[3 t]))^2)+(((-3 Sin[t]+Sin[3 t]))^2)

Simplify[%]

TrigExpand[%36]

(*l'epitrocoide epitrocoide[2,1][1/3][t] 
{3 Cos[t]-(1/3) Cos[3 t],3 Sin[t]-(1/3) Sin[3 t]} e' lunga il doppio della ellisse {2Cos[t],Sin[t]}*)

Norm[D[ellisse[0,0][2,1][t],t]]^2

((Cos[t])^2)+4((Sin[t])^2)

Norm[D[epitrocoide[2,1][h][t],t]]^2

(((3 Cos[t]-3 h Cos[3 t]))^2)+(((-3 Sin[t]+3 h Sin[3 t]))^2)

TrigExpand[%]

Factor[9+9 (h^2)+18 h]

9(1-h)^2Cos[t]^2+9(1+h)^2Sin[t]^2

N[lun[epitrocoide[2,1][1/3]][2Pi],20]

%/2

9.688448221816847`

epitrocoide[2,1][h][t]

N[lun[ellisse[0,0][2,1]][2Pi],20]

1.5419644253920353`

2Pi*1.541964

5.541964/1.541964

3.594094284950881`

epitrocoidell[a1_,a2_,b_][h_][t_]:={(a1+b*a2/Norm[{a2*Cos[t],a1*Sin[t]}])*Cos[t],(a2+b*a1/Norm[{a2*Cos[t],a1*Sin[t]}])*Sin[t]}+{b*h*Cos[Pi+lun[ellisse[0,0][a1,a2]][t]/b+ArcTan[a1*Sin[t]/(a2*Cos[t])]],b*h*Sin[Pi+lun[ellisse[0,0][a1,a2]][t]/b+ArcTan[a1*Sin[t]/(a2*Cos[t])]]}

rot[t_]:={{Cos[t],-Sin[t]},{Sin[t],Cos[t]}}

ruota[{x0_,y0_},t_][{x_,y_}]:=rot[t].({x,y}-{x0,y0})+{x0,y0}

epitrocoidellcentrmob[a1_,a2_,b_][h_][t_]:=ruota[{(a1+b*h*a2/Norm[{a2*Cos[t],a1*Sin[t]}])*Cos[t],(a2+b*h*a1/Norm[{a2*Cos[t],a1*Sin[t]}])*Sin[t]},lun[ellisse[0,0][a1,a2]][t]/b][{a1*Cos[t],a2*Sin[t]}];

Manipulate[ParametricPlot[epitrocoidell[a1,a2,b][h][t],{t,0,k},PlotRange->{{-a1-(h+1)*b,a1+(h+1)*b},{-a2-(h+1)*b,a2+(h+1)*b}},ImageSize->150,Epilog->{Circle[{0,0},{a1,a2}],Circle[{(a1+b*a2/Norm[{a2*Cos[k],a1*Sin[k]}])Cos[k],(a2+b*a1/Norm[{a2*Cos[k],a1*Sin[k]}])Sin[k]},b],Point[epitrocoidell[a1,a2,b][h][k]],Line[{{(a1+b*a2/Norm[{a2*Cos[k],a1*Sin[k]}])Cos[k],(a2+b*a1/Norm[{a2*Cos[k],a1*Sin[k]}])Sin[k]},epitrocoidell[a1,a2,b][h][k]}]}],{{a1,2},1,7},{{a2,1},1,7},{{b,1.54},0.01,5},{{h,1},0,5},{k,0.0001,4Pi}]

epitrocoidell[a1_,a2_,b_][h_][t_]:=ruota[{(a1+b*a2/Norm[{a2*Cos[t],a1*Sin[t]}])*Cos[t],(a2+b*a1/Norm[{a2*Cos[t],a1*Sin[t]}])*Sin[t]},lun[ellisse[0,0][a1,a2]][t]/b][{(a1+b*(1-h)*a2/Norm[{a2*Cos[t],a1*Sin[t]}])*Cos[t],(a2+b*(1-h)*a1/Norm[{a2*Cos[t],a1*Sin[t]}])*Sin[t]}];

Manipulate[ParametricPlot[epitrocoidell[a1,a2,b][h][t],{t,0,k},PlotRange->{{-a1-(h+1)*b,a1+(h+1)*b},{-a2-(h+1)*b,a2+(h+1)*b}},ImageSize->150,Epilog->{Circle[{0,0},{a1,a2}],Circle[{(a1+b*a2/Norm[{a2*Cos[k],a1*Sin[k]}])Cos[k],(a2+b*a1/Norm[{a2*Cos[k],a1*Sin[k]}])Sin[k]},b],Point[epitrocoidell[a1,a2,b][h][k]],Line[{{(a1+b*a2/Norm[{a2*Cos[k],a1*Sin[k]}])Cos[k],(a2+b*a1/Norm[{a2*Cos[k],a1*Sin[k]}])Sin[k]},epitrocoidell[a1,a2,b][h][k]}]}],{{a1,2},1,7},{{a2,1},1,7},{{b,1.54},0.01,5},{{h,1},0,5},{k,0.0001,4Pi}]

3477834298

Manipulate[ParametricPlot[epitrocoidell[a1,a2,b][h][t],{t,0,k},ImageSize->400,PlotRange->{{-4,4},{-4,4}},Epilog->{Circle[{0,0},{a1,a2}],Circle[{(a1+b*a2/Norm[{a2*Cos[k],a1*Sin[k]}])Cos[k],(a2+b*a1/Norm[{a2*Cos[k],a1*Sin[k]}])Sin[k]},b],Point[epitrocoidell[a1,a2,b][h][k]],Line[{{(a1+b*a2/Norm[{a2*Cos[k],a1*Sin[k]}])Cos[k],(a2+b*a1/Norm[{a2*Cos[k],a1*Sin[k]}])Sin[k]},epitrocoidell[a1,a2,b][h][k]}]}],{{a1,2},1,7},{{a2,1},1,7},{{b,1.541964},0.01,5},{{h,1},0,5},{k,0.0001,4Pi}]

ipocicloide3d[2,1,1.36,2.02,0.1]

Manipulate[ParametricPlot[epitrocoidev[a,b,c,d][h][t],{t,0,k},PlotRange->{{-8,8},{-8,8}},ImageSize->150,Epilog->{Circle[{0,0},a],Circle[{c(a+b)Cos[k],d(a+b)Sin[k]},b],Point[epitrocoidev[a,b,c,d][h][k]],Line[{{c(a+b)Cos[k],d(a+b)Sin[k]},epitrocoidev[a,b,c,d][h][k]}]}],{{a,2},1,7},{{b,1},0.01,5},{{c,1.36},1,7},{{d,2.02},0.01,5},{{h,.1},-1,5},{{k,2Pi},0.0001,4Pi}]

Manipulate[ParametricPlot[epitrocoidev[a,b,c,d][h][t],{t,0,k},PlotRange->{{-a-(h+1)*b,a+(h+1)*b},{-a-(h+1)*b,a+(h+1)*b}},ImageSize->150,Epilog->{Circle[{0,0},a],Circle[{c(a+b)Cos[k],d(a+b)Sin[k]},b],Point[epitrocoidev[a,b,c,d][h][k]],Line[{{c(a+b)Cos[k],d(a+b)Sin[k]},epitrocoidev[a,b,c,d][h][k]}]}],{{a,2},1,7},{{b,1},0.01,5},{{c,2},1,7},{{d,1},0.01,5},{{h,1/3},0,5},{k,0.0001,4Pi}]

(*ovale di Cassini*)

Simplify[(x^2+y^2+a^2)^2-4a^2x^2==b^4/.{x->r*Cos[t],y->r*Sin[t]}]

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

rfl[m_]:=1/(1+m^2){{1-m^2,2m},{2m,m^2-1}}

ellisse[x0_,y0_][a_,b_][t_]:={x0+a*Cos[t],y0+b*Sin[t]}

circle[x0_,y0_][r_][t_]:={x0+r*Cos[t],y0+r*Sin[t]}

Plot[x+1/4Sin[Pi/4*(1+x)]-1,{x,0,1}]