Oscillations using the mathematical sine() and cosine() functions

How can the sin() and cos() functions be used to make this pattern?