Does anyone here know some math or where I could get the math for making pictures looking like they had a perspective?

(little bit like texturing, but only in an own graphics program?)