The first 2 pictures are physically simply impossible, just like
the M.C. Escher paintings they were "build" after. But with the
help of a little photoshopping....
You can also use LEGO cad programs like LDraw then L3P to create virtual LEGO models and scenes.
I have not had a lot of success with it, then again I have not work with 3D much. I'll be happy to hear from anyone who has more success with these LEGO cad programs.