The rule for obtaining the third pattern in each
row is to superimpose the first two patterns and eliminate any lines
they have in common. Hence the pattern to be placed at the end of the
third row is simply a square.
The puzzle is from a special issue of the French magazine Science
et Vie (September, 1978).