code for the above diagrams
> f:=t->piecewise(t<=0,0,t<=10,2*t,t<=25,20,t<=30,120-4*t):
> plot(f,0..30, title=`Graph of f(t)`, titlefont=[TIMES,BOLD,18] );
>