You need to know how to create a linear polarized wave first.

Assume the wave is moving in z direction, and electric field is in x direction (which means that magnetic field is in y direction).
Then
\vec{E}=E_x sin(k z-\omega t)
\vec{B}=B_y sin(k z-\omega t)

You can download the above simulation. Double click the jar file to run it , right click the mouse and select "open EJS model" to find out how it was created in EJS environment.