How do you plot a graph where $y$ increases in short bursts and not linearly? I am wondering if it's possible to plot this sort of graph with one equation.


Note: the application of what I am doing is for video animation, but I
  am just asking for the mathematical explanation; software has nothing
  to do with this.

For context, $y$-axis is rotation in degrees, and $x$-axis is time in seconds. The item rotates 30 degrees every half second. I wonder if it's possible to plot a graph more like the red line, where the rotation ($y$) will accelerate and decelerate to almost a stop at every 30 degrees.
Is there a name for a graph like this? I don't think I would call it an oscillation or a saw-tooth or something.

I'm sure there are many ways of doing this, here's one.
Suppose that the "first bit" of your graph is $y=f(x)$.  For example, the one you have drawn looks a bit like $y=cx^2$ for some constant $c$.  Suppose that the "first bit" goes from $x=0$ to $x=a$ (so in your example $a=\frac12$).  And suppose that the gradient of the grey line in your diagram is $m$.  Then the whole graph is given by
$$y=f\Bigl(x-a\Bigl\lfloor\frac xa\Bigr\rfloor\Bigr)+ma\Bigl\lfloor\frac xa\Bigr\rfloor\ ,$$
where $\lfloor\cdots\rfloor$ means "round to the next integer downwards", possibly implemented as floor or truncate or trunc, depending what software you are using.
