Small project to try drawing things in 3D, checking the performance of scratch, and all of that! You can change the definition of the function f(x,y) to get different results. Use mouse to look around. Use arrows to move the camera.
3D camera transform obtained from Wikipedia ;-) http://en.wikipedia.org/wiki/3D_projection