The present study investigated the mechanisms of electrical stimulation of a myocardial fibre with the aim of developing improved minimally invasive stimulation methods. Using a dynamic myocyte model, the ionic currents crossing the voltage-dependent channels of the membrane are computed. To trigger an action potential, the membrane must first be depolarized to the threshold potential, when further depolarization continues spontaneously through the avalanche-like opening of the sodium channels. For the development of an action potential, not merely the amount of charge injected into the cell during the stimulus is of importance, but an above-threshold magnitude of the stimulation current is also required. The smallest energy required is achieved when the stimulus duration is chosen to be equal to the chronaxie. A second aspect of the study concerned the far-field stimulation of a muscle fibre, achieved by generating a potential gradient along the fibre. First, using a continuous fibre model, the fibre activating function is computed. In a more detailed study, the discrete segmental structure of the fibre determined by the gap junctions is taken into account, and the impact of these junctions on the activating function analysed. By optimizing the electrode configuration, an appropriate activating function results which guarantees successful stimulation when its maximum is above than threshold potential. The most important finding is that the myocardium can be stimulated by floating electrodes, thus opening up new possibilities for a less invasive electro-stimulation of the heart.