Random shape function

[COLOR=#000000][FONT=verdana]Hello there,[/FONT][/COLOR]

[COLOR=#000000][FONT=verdana]I am trying to build a function that generates random shapes like the one i’ve attached and my problem is that i don’t know where to start. Is there some already build functions that i can use?[/FONT][/COLOR]

[COLOR=#000000][FONT=verdana]Thank you,[/FONT][/COLOR]