I am trying to visualize some experiments done in my lab with wave polarization. One thing I'd like to have is a curve representing an EM wave with arbitrary polarization that I can animate. Mathematically this is expressed as $$ E(z,t) = E_0(e^{i\phi_x}\hat{x} + e^{i\phi_y}\hat{y})e^{(kz-\omega t)} $$
Right now I am just expressing linear polarization by creating a spiral curve, tabbing into edit mode and scaling the x component of all vertices to zero, and then rotating the wave around an axis to get horizontal, vertical, and diagonal polarizations. The probelem is that after I scale the vertices I have no way to recover the spiral behavior. Similarly, you have to define the spiral as right or left handed when you create it, and there isn't any way to change it from one to the other. I'd like to have parameters I can keyframe (namely, $\phi_x$ and $\phi_y$ from above) to modify the polarization of the wave/appearance of the curve. The plan is to eventually map an object onto this curve to represent traveling EM waves. Is there some way I can do this with nodes or even scripting? It doesn't seem possible with just the basic curve controls blender gives you. The twist modifier seems to be almost what I want, but it doesn't allow me to get a nice uniform circle.