# Lorentz transformation via light clocks in parallel direction

In order to derive the Lorentz transformation one can use the picture of a light clock. A Photons bounces back and forth between two mirrors. This is then observed in two different inertial systems. If the relative speed of the inertial systems is perpendicular to the propagation direction of the photon deriving, extracting the Lorentz transformation is easy and there are hundreds of examples on the web:

http://galileoandeinstein.physics.virginia.edu/more_stuff/flashlets/lightclock.swf

However, I am trying to calculate this scenario if the relative motion between the Inertial systems is parallel to the direction of the light propagation:

In this case I simply get for the standing observer:

$T_{Periode} = \frac{2 h}{c}$

and for the moving observer:

$T_{Periode} = \frac{h + v_{rel} t}{c} + \frac{h - 2v_{rel} t}{c} = \frac{2h - v_{rel}}{c}$

I can't see how this would lead me to the Lorentz transformation.