For an idea I have for a 3d game I put together this proof of concept for 3d visualization. Please take a look at the demo here:
The source is available here:
I've added some comments to explain how it works. The 3d positioning is probably not 100% mathematically accurate but I find it simple and effective.
Any suggestions for improvement are very welcome. Especially ideas to include viewer angle and rotation would be much appreciated.