{z,w}={Exp[I α]Sin[γ],Exp[I β]Cos[γ]};
SterProj[{z_,w_}]:=Module[{x=Re[z],y=Im[z],u=Re[w],v=Im[w]},{(x/(1-v)),(y/(1-v)),(u/(1-v))}//ComplexExpand]
σ[{z_,w_}]:={w,z}

ZW[γ_,α_,β_]:={Exp[I α]Sin[γ],Exp[I β]Cos[γ]}

p=2;
q=3;

m=p/q;
m2=q/p;
f2[x_]:=
Piecewise[Flatten[Table[{{m (x-2π k/p) - π/(2q),2k π/p≤x≤(2k+1)π/p},{-m (x-2π k/p)+2π/q- π/(2q),(2k+1) π/p≤x≤(2k+2)π/p}},{k,0,p}],{1,2}]]
g2[x_]:=
Piecewise[Flatten[Table[{{m2 (x-2π k/q) - π/(2p),2k π/q≤x≤(2k+1)π/q},{-m2(x-2π k/q)+2π/p- π/(2p),(2k+1) π/q≤x≤(2k+2)π/q}},{k,0,q}],{1,2}]]

(*fi=FunctionInterpolation[f2[Mod[x,2π]],{x,-4π,4π}];
gi = FunctionInterpolation[g2[Mod[x,2π]],{x,-4π,4π}];*)

fi2=Interpolation[{#,f2[Mod[#,2π]]}&/@RandomReal[{-4π,4π},1000]];
gi2=Interpolation[{#,g2[Mod[#,2π]]}&/@RandomReal[{-4π,4π},1000]];

inside=((Abs[4/π γ])^4)gi2[ β-t/q]-q/p( t/3)+2π n/p;
outside=((Abs[4/π γ])^4)fi2[ β+t/p]+p/q(t/2)+2π n/q;

insidewashers=Table[SterProj@ZW[γ, β-π/(q 2),inside/.t->3π/4],{n,0,2}];
insideplot=ParametricPlot3D[insidewashers,{γ,0,π/4},{β,0, 2π},MeshStyle->None,PlotStyle->Blue,Exclusions->None,PlotPoints->40];

outsidewashers=Table[SterProj@σ@ZW[γ, β-π/(p 2),outside/.t->3π/4],{n,0,4}];
outsideplot=ParametricPlot3D[outsidewashers,{γ,0,π/4},{β,0, 2π},MeshStyle->None,PlotStyle->Orange,Exclusions->None,PlotPoints->30];

torus = ParametricPlot3D[SterProj@ZW[π/4,α,β],{α,0,2π},{β,0,2π},PlotStyle->Opacity[0.2],MeshStyle->None,PlotRange->{{-4,4},{-4,4},{-4,4}},Axes->False,Boxed->False];

knot =ParametricPlot3D[RotationTransform[π/q,{0,0,1}]@SterProj@σ@ZW[π/4,  θ,-p/q θ],{θ,0,q 2π},PlotStyle->{Thick,Green}];

Show[torus,knot,insideplot,outsideplot]