p=2;
q=3;
period=π/q;
amplitude=π/(2*p);

trianglewave=Abs[4/π*y]^4*(2*amplitude)/π*ArcSin[Sin[x*π/period]]//Simplify

Plot3D[trianglewave,{x,0,2π},{y,0,π/4}]