How can I create 3D surface of sine waves? I would like to make a surface that obeys the equation:

z = Asin(x) + Asin(y), 0&lt;=z&lt;=1; 0&lt;=x&lt;=2npi; 0&lt;=y&lt;=2npi

Where I would like to be able to change n to increase/decrease the number of cycles and change the amplitude A. I attempted to generate a sine wave via a script that I found; then I tried to extrude it, duplicate it, and then rotate one of the planes so that they intersected at a 90degree angle. The results were not very satisfying...
I don't think there's currently a way to add surfaces, but if you are okay with using meshes, you can use the Extra objects addon (it's not enabled by default). 

To enable the addon, open the User Preferences, by pressing Ctrl + Alt + U; then, switch to the Add-ons, search for "extra" and enable the one that reads "Add Mesh: Extra Objects", by checking the box.



Then, you can close the User Preferences window and, in the 3D View, press Shift + A and then select Mesh>Math Function>Z Math Function.



After that, in the Toolbar (T), you will find a box where to enter your function.



If you prefer, you can bring these options up by pressing F6.



After you've entered your function, you can add a Subdivision Surface modifier to make it smoother.