Oort cloud comets occasionally obtain orbits which take them through t
he planetary region. The perturbations by the planets are Likely to ch
ange the orbit of the comet. We model this process by using a Monte Ca
rlo method and cross sections for orbital changes, i.e. changes in ene
rgy, inclination and perihelion distance, in a single planet-comet enc
ounter. The influence of all major planets is considered. We study the
distributions of orbital parameters of observable comets, i.e. those
which have perihelion distance smaller than a given value. We find tha
t enough comets are captured from the Oort cloud in order to explain t
he present populations of short period comets. The median value of cos
i for the Jupiter family is 0.985 while it is 0.27 for the Halley typ
es. The results may explain the orbital features of short period comet
s, assuming that the active lifetime of a comet is not much greater th
an 400 orbital revolutions.