I think the trick is controlling the angle of the sensors with servos. Since you tell the servo what angle to go to you must already have the angle that it's at tucked away in some convenient variable. Then it's just triangulation for the distance and either a constant multiplier or a lookup/lookdown to adjust the force. I'm not sure of the relationship between power in the thrower and distance for the balls - a lot probably depends on the style of thrower. I'm trying to convince my team to make a trebuchet, but they tell me they actually want to have a chance - bah - who needs victory when you have style
