Pythagoras generator