The dose distributional advantages of the heavy charged-particles can be fully exploited by using very efficient and accurate dose calculation algorithms, which can generate optimal three-dimensional scanning patterns. An inverse therapy planning algorithm for dynamically scanned, narrow heavy charged-particle beams is presented in this paper. The irradiation `start point` is defined at the distal end of the target volume, right-down, in a beam`s eye view. The peak-dose of the first elementary beam is set to be equal to the prescribed dose in the target volume, and is defined as the reference dose. The weighting factor of any Bragg-peak is determined by the residual dose at the point of irradiation, calculated as the difference between the reference dose and the cumulative dose delivered at that point of irradiation by all the previous Bragg-peaks. The final pattern consists of the weighted Bragg-peaks irradiation density. Dose distributions were computed using two different scanning steps equal to 0.5 mm, and 1 mm respectively. Very accurate and precise localized dose distributions, conform to the target volume, were obtained. (authors) 6 refs., 3 figs.