fundamentally the equations to model the spring mass system motion vertically is the same.

F = ma

k*x = m*a

i just couldn't find the mass at the bottom picture.

you could redesign the java applet from Prof hwang to suit your graphics