Some aspects include a system, apparatus, and method for determining that a motion of a patient area of a patient due to breathing is substantially periodic according to a treatment plan, moving a radiotherapy gantry towards a first treatment gantry angle, moving a radiotherapy beam shaping device towards a first treatment shape corresponding to the first treatment gantry angle, determining when a next treatment window is to begin based on a predictive model derived from the motion of the patient area, where the treatment window is a period of time designated for delivery of treatment radiation to the patient area according to the treatment plan, adjusting the moving of the radiotherapy gantry such that the radiotherapy gantry will reach the first treatment angle during the determined next treatment window, and delivering a treatment radiation beam to the patient area during the determined next treatment window.