Added focal distance as a parameter