Here is an inexpensive way to create a three dimensional pointing device.

Take a working mechanical wheel mouse (the type with a scrolling wheel). Remove the ball. Drill some holes in the sides and run a string into the mouse, around the horizontal roller, and out the other side. Reroute the sensors for the vertical roller and the scroll wheel to a pair of external sensors. The easiest way to do this is to take a couple of dead mechanical mice and simply wire their horizontal rollers to the master mouse’s vertical roller and scroll wheel. Run strings around these two rollers as well. Attach small weights to one end of each string and tie the other ends together. The result is a computer peripheral which can be used to indicate a point in three dimensions.

Pictures here.