Quote by sophiecentaur
You could do the same experiment with the spring in space, as long as the coils of the spring were not touching (easy to do by designing the spring right or by over stretching it a bit). The period of oscillation would be the same.
The sine function comes from the solution to the equation of motion of a spring for which the restoring force is proportional to the displacement.

Why must the coils of the spring not touch? How come the position function is a perfect sine wave with gravity? It doesn't make sense to me. As the mass is moving up while below the yaxis, wouldn't it be slowed down by gravity? And why the mass is moving down while above the yaxis, wouldn't it be sped up by gravity?
Does the solution to the equation of motion of a spring explicitly give the sine function as the only solution? So it would be impossible to model the wave if trigonometry was not studied and the sine function was not discovered?