f[x_]:= Piecewise[{{(2/3)x-(3/13)2π,x<(9/13)2π}, {(3/2)(2π-x)-(3/13)2π, x≥(9/13)2π}}, 0];
f[x]

Plot[f[x],{x,0,2π},AspectRatio->Automatic]

MaxValue[f[x],x]

StereoGraphicProjection[{x_,y_,z_,w_}]:={x/1-w,y/1-w,z/1-w}

knot=ParametricPlot3D[{{Sin[((3 θ)/2)],Cos[((3 θ)/2)],((2 n π)/3)+θ},{-Sin[((3 θ)/2)],-Cos[((3 θ)/2)],((2 n π)/3)+θ}}/.n->0,{θ,0,2π},PlotStyle->{Thick,Blue}]
ParametricPlot3D[{r Cos[θ],r Sin[θ], ((Abs[r Exp[I θ]])^5)f[π+Arg[(r Exp[I θ])^2]]},{r, 0,1},{θ,0,2π},PlotRange->All,Exclusions->None,PlotPoints->20]

Show[knot,ParametricPlot3D[{r Sin[θ+π/2],r Cos[θ+π/2],π/3+ ((Abs[r Exp[I θ]])^3)f[π+Arg[(r Exp[I θ])^2]]},{r, 0,1},{θ,0,2π},PlotRange->All,Exclusions->None,PlotPoints->20]]

{r Sin[θ],r Cos[θ],π n+(1/3) ((Abs[x+I y])^3) Arg[Exp[n I π](((x+I y))^2)]/.{x->Cos[θ],y->Sin[θ]} }

Show[knot,ParametricPlot3D[{r Sin[θ],r Cos[θ],π n+(1/3) ((Abs[r Exp[I θ]])^3) Arg[(((r Exp[n π+I θ]))^2)]/.{n->0} },{r,0,1},{θ,0,2π}]]

Plot[π n+(1/3) ((Abs[r Exp[I θ]])^3) Arg[(((r Exp[n π+I θ]))^2)]/.{n->0,r->1},{θ,0,2π}]

τArg:=Mod[Arg[#],2π]&

g[x_,n_:0]:=Piecewise[{
{2/3x+n 2π/3,0<x≤ π/2},
{-2/3(x-π/2)+π/3+n 2 π/3,π/2<x≤π},
{2/3(x-π)+n 2π/3,π<x≤3π/2 },
{-2/3(x-3/2π)+π/3+n 2π/3,3π/2<x≤ 2π}
}]
Plot[{g[x,0],g[x,1],g[x,2]},{x,0,2Pi},PlotRange->{{0,2π},{0,2π}}]

g2[x_,n_]:=g[x,n]-π/6
Plot[{g2[x,0],g2[x,1],g2[x,2],g2[x,3]},{x,0,2Pi},PlotRange->{{0,2π},{0,2π}}]

h[x_,n_:0]:=Piecewise[{
{-3/2x+π+n π,0<x≤ π/3},
{3/2(x-π/3)+π/2+n π,π/3<x≤ 2π/3},
{-3/2(x-2π/3)+π+n π,2π/3<x≤ 3π/3},
{3/2(x-3π/3)+π/2+n π,3π/3<x≤ 4π/3},
{-3/2(x-4π/3)+π+n π,4π/3<x≤5 π/3},
{3/2(x-5π/3)+π/2+n π,5π/3<x≤ 6π/3}
}]
h2[x_,n_]:=h[x,n]-π/6
Plot[{h[x,0],h[x,1]},{x,0,2Pi},PlotRange->{{0,2π},{0,2π}}]

Show[knot,ParametricPlot3D[Table[{r Cos[θ+π/2],r Sin[θ+π/2], ((Abs[r Exp[I θ]])^4)g[τArg[r Exp[I θ]],0]+2π n/3},{n,0,2}],{r, 0,1},{θ,0,2π},Mesh->None,PlotRange->All,Exclusions->None,PlotPoints->40]]

Show[knot,ParametricPlot3D[Table[{r Cos[θ-π/4],r Sin[θ-π/4], ((Abs[r Exp[I θ]])^4)g2[τArg[r Exp[I θ]],0]+2π n/3},{n,0,3}],{r, 0,1},{θ,0,2π},Mesh->None,PlotRange->All,Exclusions->None,PlotPoints->40]]

Show[knot,ParametricPlot3D[Table[{r Cos[θ+π/2],r Sin[θ+π/2], ((Abs[r Exp[I θ]])^4)h[τArg[r Exp[I θ]],0]+n π},{n,0,1}],{r, 0,1},{θ,0,2π},Mesh->None,PlotRange->All,Exclusions->None,PlotPoints->40]]

Show[knot,ParametricPlot3D[Table[{r Cos[θ+π/2],r Sin[θ+π/2], ((Abs[r Exp[I θ]])^4)h[τArg[r Exp[I θ]],0]+n π},{n,0,1}],{r, 0,1},{θ,0,2π},Mesh->None,PlotRange->All,Exclusions->None,PlotPoints->40]]