Javascript 3d Graphing