Similar shapes and pythagoras' theorem