Write My Paper Button

WhatsApp Widget

We treat the available space on a floor as effectively a grid of cells That grid may have arbitrary granularity (hence the two examples above: same dimensions; different cell sizes) The grid does

Share this post on:

Assignment Task

The principle is actually pretty simple

We treat the available space on a floor as effectively a grid of cells
That grid may have arbitrary granularity (hence the two examples above: same dimensions; different cell sizes)
The grid does not include the walls; instead the walls are boundaries between spaces
We start with initially one large room
Any given room may be ‘split up’ into two rooms, with a door along the newly-added wall separating them
Since it’s recursive, those two rooms may themselves each be split up into two… you get the idea
A ‘wider’ room will be split horizontally by a vertical wall, a ‘taller’ room will be split vertically by a horizontal wall. Since there’s no compelling reason to pick either for a ‘square’ room, we’ll just say that a/so gets split horizontally by a vertical wall
We’ll get to the ‘cut-off’ (stopping point) a bit further down

Notice that

The doors may be placed anywhere along the wall, so long as they’re within the ‘grid’ boundaries, and always ‘one
space’
Though we can further and further subdivide A/B, we’ll eventually need to return to C to split it up too
We’ll eventually ‘run out’ of spaces for further subdivisions (and doors)
Because doors are ‘cut’ into newly-added walls, we’ll never need to touch a wall again after its creation

We’re still missing three things: doors, the cutoff for when to stop dividing, and the Piet Mondrian part

Doors are easy; we could’ve been doing them the whole time: when installing a wall and leaving a gap, simply make an orange line instead of the gap
The cutoff is relatively simple: allow for a cutoff value where a room having either dimension at or below that value will never be further divided; also include some probability to stop even sooner than that. When testing, ‘below 3’ is a nice cutoff to try using, along with a ‘quitting proclivity of ~5%
This doesn’t mean it’s impossible for a room to have e.g. a height of 2: a room 20 tall could be divided into one of 18 and one of 2 (or even one of 19 and one of 1)
Some of the final room-floors will have their floor painted a random colour

This will occur with some probability, to be decided specifically when a room will no longer be further divided Overall, it seems pretty doable, right? Or maybe not? This task is specifically designed to require significant planning before coding.

Share this post on:

Affordable and Dependable Platform for Your Academic Assignments

X