This work presents a robot system for throwing a ball into a basket. A stereo vision system is used to measure the position of the target in 3D space. The ball-throwing transformation between the input command of the robot system and the target position is built by cubic polynomial. Through ball-throwing transformation with visual feedback for target position, the robot throws the ball toward the target which can randomly move to everywhere in visible field. The percentage of successful ball-throwing for target within three meters was found to be approximately 99%.