Dot/Dash CURVESHAPE

I know that the curve shape object does not support Dotted/Dashed lines (a pity)…
and I have the equation to match the arc of a curve shape…
but have not been able to alter the method to produce a nice looked dotted or dashed line

  t=tt/500
  t2=t*t
  tm=(1-t)
  tm2=tm*tm
  t3=tm*t*2
  xx = tm2 * xpos(0) + t3 * xpos(2) + t2 * xpos(1)
  yy = tm2 * ypos(0) + t3 * ypos(2) + t2 * ypos(1)
  Return point_of(xx,yy)

where TT is from 0 to 500
and XPOS/YPOS(0) and (1) are end points and (2) is control point