custom light

Is there a way to simulate a real lamp with nonregular shape and intensity distribution? I try to model a real lamp by using real measured intensity and coordinates data. Can anybody help me?

I did that a long time ago simply by photographing the projection of the light on a plain white surface and using the photo as a projected texture from the simulated light. Sometimes you see the same idea used to simulate a flashlight in dark horror games.