The final result can be like this
I've thought up several approaches:
Generate random curved lines to "cut" the rectangle (or generate random dots and form the line from the dots)
Break the rectangle with Fracture Voronoi algorithm and shrink the broken parts to make the curved lines thicker.
Generate random shapes and let it fall into the rectangle like the game Tetris
But before implement the ideas, I want to know if there is an algorithm (with pseudo code) to generate random shapes that fill up a rectangle?