This article is from the Star Trek Tech FAQ, by Joshua Bell inexorabletash@hotmail.com with numerous contributions by others.
This one is too easy. The holodeck could treat the rock in just the
same way as it would treat a person. When it leaves the hand of the
thrower, the Holodeck "wraps" it in its own miniature simulation, and
hides it from the two people, who (in their own mini-Holodeck) see
only an image of the rock. The rock is then moved (with force beams)
from the thrower to the catcher, given the appropriate kinetic energy
along the way. From the rock's point of view nothing out of the
ordinary happens.
 
Continue to: