A geometric method for robot workspace computation