The method determines parameters to generate confocal ultrasound beams inside a medium, and uses a device comprising first and second ultrasound transducers (11, 12) and first and second displacement members (13, 14) for moving the transducers. The parameters include signals to the transducers, and the positions of the transducers. The parameters are optimised for having a minimum amplitude of the signal and having an acoustic effect inside the medium.