So what I’m attempting to do here is take a rectangular plane and divide it up into multiple parts at random.
Start:
Expected result:
If anyone knows what this algorithm might be or if it’s even possible let me know! Thanks!
So what I’m attempting to do here is take a rectangular plane and divide it up into multiple parts at random.
Start:
Expected result:
If anyone knows what this algorithm might be or if it’s even possible let me know! Thanks!
You want to create a random amount of rectangles with random sizes each one and they all must fit inside the main part, right?
I won’t give you the code or the logic, but just an idea of how to solve this:
Then create a loop to fit these rectangles to the main part.
This is effectively the conclusion I came to yesterday. Works with a small amount of parts, but can get laggy when the scale of the starting rectangle increases. Currently in the process of making the code more efficient, because right now it’s only a level above BOGO sort lol