A room sketch can answer a small programming question: do two furniture footprints overlap, and does each footprint stay inside the room? Represent the room and each piece as rectangles, then run those checks whenever a coordinate changes. This gives you a repeatable way to compare a few layouts before ordering. Keep the sketch beside your measurements so that a change in the code can be checked against the room.
Choose one coordinate system
Use centimetres throughout. Put the origin at the upper left corner of the plan, with x increasing to the right and y increasing downwards. Each rectangle has an x coordinate, a y coordinate, a width w and a height h. The coordinates describe its upper left corner. The width and height describe its footprint on the floor.
The example uses a room measuring 420 by 320 centimetres. A sofa occupies a 200 by 90 rectangle at (40, 40). A table initially occupies a 100 by 60 rectangle at (160, 95).…