1. A method for three dimensional modeling of teats of a dairy animal, the method comprising: illuminating at least one teat of a dairy animal with a structured light pattern; capturing an image of the structured light pattern reflected from the at least one teat; determining positioning of the reflected pattern on the image; determining spacing between elements of the reflected pattern; and computing a three dimensional model of the at least one teat based on the determined positioning and the determined spacing, wherein a shape of the three dimensional model is pre-defined.