Illusion made using Python Imaging Library (PIL) and Matplotlib. Lots of variations can be made with few alterations in the code.
This is simply a 3d scatterplot of the color blue channel from the image on top. The distance from the plane (z axis) is given for the brightness of the pixel, the 3d effect is enhanced when you animate with a rotation.
No fancy mathematics, programming code or artificial intelligence used.
Original image :