Purpose: Currently effort is taken to use radiation therapy to cure arrhythmia. In this circumstance the left atrium and the pulmonary veins have to be irradiated. While the precise robot system placing the beam onto a moving target already exists, sensory information for target movement acquisition and heart‐beat motion compensation still have to be analyzed. One possibility for real‐time, direct target localization during treatment is three‐dimensional, transthoracic ultrasound requiring a transducer to be positioned on the patientˈs chest. The imaging and ‐as a result ‐tracking quality highly depends on this positioning choice. Especially when a patient lies in treatment position on his back, it is difficult to find a transducer position, which allows suitable imaging quality. Methods: We present an automatic algorithm which calculates the patient‐specific ultrasound imaging quality from a given CT scan. A quality function is executed in real‐time on the graphics card calculating the target reflectivity in beam direction as well as the distance and the absorption in the line of sight from transducer to the chosen target. The optimal transducer position is found as the area on the skin with the best results of the quality function and at least the area of the size of the ultrasound transducer. Results: We have tested the algorithm with 10 CTs. For general cardiac imaging the calculated transducer positions mostly fit with the typical ultrasound views found in literature. Nevertheless, the acquisition of special targets, such as the atria and pulmonary veins, often requires or at least profits from an off‐standard transducer placement. Conclusions: We have found a reliable method to calculate an optimal transducer position for a specific target inside the heart without the need to iteratively search and optimize it. In this way electronic (e.g. robotic) transducer placement during treatment becomes possible.