In this paper we study the motion of three linked ellipses moving through a viscous fluid in two dimensions. The angles between the ellipses change with time in a specified manner (the gait) and the resulting time varying configuration is similar to the appearance of a swimming leech. We simulate the motion using the particle method Smoothed Particle Hydrodynamics (SPH) which we test by convergence studies and by comparison with the inviscid results of Kanso et al. (2005)  and the viscous results of Eldredge (2006, 2007, 2008) ,  and . We determine how the average speed and power output depends on the amplitude and oscillation frequency of the gait. We find that the results fit simple scaling rules which can be related to the analytical results of G.I. Taylor for the swimming of long narrow animals (1952). We apply our results to estimate the speed of a swimming leech with reasonable accuracy, and we determine the minimum power required to propel the bodies at a specified average speed.