A method of generating a radiotherapy plan for ion therapy, wherein the beam (6) is shaped by means of passive devices is arranged to allow variation in settings of at least one of the passive devices and/or the MU during the delivery of the beam and to control the movement of the patient and/or the beam in such a way as to create an arc. The arc is preferably a continuous arc or includes at least one continuous sub-arc. The method may include forward planning or optimization. In the latter case, the optimization uses an optimization problem set up to allow variation in settings of at least one of the range modulating device (9), the aperture element (11) and the MU during the delivery of the arc. Computer programs control the planning and the delivery.