When you get down to it, everything can be explained with math, can't it? One math professor uses mathematical equations to manipulate his own optical illusions by creating 3D sculptures. This video shows some of his coolest ones.
While two-dimensional illusions use depth perception to trick your sight, Kokichi Sugihara uses math in his sculptures to create 3D illusions. Sometimes they're even life-sized.
He creates a false sense of depth to create the illusion effect, not unlike a 2D object.
The math is still pretty hard to understand, but see if watching this video helps you understand what a 3D illusion is (basically an adult playground).