Radiosurgery is a treatment for brain tumors and other lesions which employs a moving beam of photon radiation. In robotic radiosurgery, the radiation source is moved by a six degree-of-freedom robotic arm. A treatment planning system for robotic radiosurgery was developed. This planning system combines collision avoidance techniques and geometric algorithms for finding appropriate robot paths and beam activation profiles. The following design goals characterize our application: 1) ability to gener ate conformal three-dimensional (3-D) dose distributions; 2) transparency of the planning process; 3) full use of the motion flexibility provided by the robotic arm. The new planning system is in clinical use in several leading medical institutions. Results obtained from studies suggest that highly conformal distributions can be generated in a very effective way.