Leksell Gamma Knife Perfexion (PFX, Elekta, Stockholm, Sweden) is the latest generation of stereotactic radiosurgery delivery units, and is typically used to treat tumours and lesions in the brain. In a PFX treatment, the patient lies on a couch and radiation from eight banks of radioactive sources are directed toward a single spot, called an isocentre. The radiation from each sector can be delivered in different beam diameter sizes, and an optimization model determines the optimal radiation delivery duration from each sector at each size for each isocentre. Radiation is delivered to isocentres sequentially by moving the couch in a step-and-shoot fashion. Clinically, there is interest in treating patients continuously while the couch moves, like painting the tumour with radiation. We use Hamiltonian paths to transform isocentre locations into a continuous path of radiation delivery through the tumour, and develop linear models to determine the configuration of radiation at discretized points along the path. We consider several criteria in our optimization, including machine speed constraints and movement accuracy, preference for single/multiple paths, and smoothness of movement. Our models yield clinically acceptable treatments, while improving average treatment time by 25 and 99 minutes compared to forward and inverse step-and-shoot treatment plans.