This article is from the Relativity and FTL Travel FAQ, by Jason W. Hinson jason@physicsguy.com with numerous contributions by others.
As we did with the twin paradox, here we will look at a space-time
diagram of the car and barn experiment in order to explain the paradox. We
will draw our diagrams such the relative velocity of Carol and Bob is 0.6 c.
In Diagram 4-4 I have drawn the situation keeping Bob's frame of reference
in mind. To keep the diagram from getting too cluttered, a second diagram
(Diagram 4-5) of the same situation will be used to mark points according to
Carol's frame of reference.
Diagram 4-4 Diagram 4-5
t ! t
e | < x > ! e | < x > .
e |< x > ! e |< x 4
e < x > ! e < x . > .
e <| x > ! e <| .4 > . .
e < | x > ! e < | . x 3 .
e < | x> ! e < |. .3>. .
3...3...|.......D ! e < . | . .D .
e < | >x ! e 4 |. . >x .
-------B-2-----o-----2-C----->x ! ---------B-<---.-o.---->-C------>x
e< | > x ! . e< . . | 1 x
A.......|...1...1 ! . A . | . > x
<e | > x ! . . <2 .| > x
< e | > x ! . .2 e . | > x
< e |> x ! . . < e. |> x
< e > x ! . < . 1 > x
< e >| x ! 1 e >| x
< e > | x ! . < e > | x
 
Continue to: