Distortion vector function

Still not debugged (even created with notepad :P), just copied and
adapted Felix previous code (thanks ;) )