http://processingjs.org/
You can put pixels on screen, draw lines using simple functions and later do 3d stuff in it...