  Altering the optics in one section of a linear accelerator beamline will in
general cause an alteration of the optics in all downstream sections. In
circular accelerators, changing the optical properties of any beamline element
will have an impact on the optical functions throughout the whole machine. In
many cases, however, it is desirable to change the optics in a certain beamline
section without disturbing any other parts of the machine. Such a local optics
manipulation can be achieved by adjusting a number of additional corrector
magnets that restore the initial optics after the manipulated section. In that
case, the effect of the manipulation is confined in the region between the
manipulated and the correcting beamline elements. Introducing a manipulation
continuously, while the machine is operating, therefore requires continuous
correction functions to be applied to the correcting quadrupole magnets.
  In this paper we present an analytic approach to calculate such continuous
correction functions for six quadrupole magnets by means of a homotopy method.
Besides a detailed derivation of the method, we present its application to an
algebraic example, as well as its implementation at the seeding experiment
sFLASH at the free-electron laser FLASH located at DESY in Hamburg.
