
y1=!random -0.3*$rg,-0.95*$rg
y2=!random max(0,$y1+0.75*$rg),0.95*$rg
y3=!random min(0.3*$rg,$y2-0.75*$rg),-0.95*$rg

:redo
x=!random -0.6*$rg, 0.6*$rg
!for check in $taken2
 !if abs($x-$check)<0.1*$rg
  !goto redo
 !endif
!next check
taken2=$x

slope1=$[($y2-$y1)/($x+$rg)]
slope2=$[($y3-$y2)/($rg-$x)]
cst=$[$y1-$slope1*(-$rg)-$slope2*$x]

f=!rawmath $slope1*min(t,$x)+$slope2*max(t,$x)+$cst

