Algorithm to randomly generate an aesthetically

Source: i.stack.imgur.com