Given some parameters, how do you determine how much of an image sensor an object will consume? If I have the details of a scene and a camera, how can I tell how much of my camera's image sensor will be taken by a certain object in space?

For example, if I have a painting that is 1m by 1m, it is straight ahead 10 m away from my camera.  If my image sensor is 5 mm by 5 mm, and I fix the focal length of the camera, how do I determine how much of the image sensor will be taken up by the painting?
The basic idea is that the ratio of the distance/focal length will be the same as the physical/image ratio.

So, assuming a focal length of 100mm, this gives:

$mag=10m/100mm=100$
$size_{image}=1m/mag=10mm$

Note, the distance is the distance measured from the focal point, which will be 1 focal length from the sensor, so that might factor into the equation as well.

See this calculator to play around with things a bit more.