Menu

Furnishing a room is mostly arithmetic: five interior-design rules as code
πŸ“°

Furnishing a room is mostly arithmetic: five interior-design rules as code

DEV Community: javascriptΒ·AlonDrilichΒ·2 days ago
#VTxlUvmD
#devtojavascript#devto#dev#table#inches
Reading 0:00
15s threshold

Interior design advice sounds like taste, but a lot of it is plain arithmetic: how big a chandelier, how wide the art over a sofa, whether the sofa gets through the door at all. Once a rule of thumb is written down precisely, it fits in a few lines of code.

Here are five of the rules published with the LoftLoom sizing calculators , written as small JavaScript functions so you can read and check them. They're rules of thumb, not laws of physics, and a designer may break them on purpose.

1. Chandelier diameter: add the room's sides

Add the room's length and width in feet, and read the result in inches. A 14 Γ— 16 ft room gets a fixture of about 30 inches.

const chandelierForRoom = ( lengthFt , widthFt ) => lengthFt + widthFt ;

Enter fullscreen mode

Exit fullscreen mode

Over a dining table the room doesn't matter; the table does. The fixture should be one-half to two-thirds of the table's width.

const chandelierForTable = ( tableWidthIn ) => [ Math . round ( tableWidthIn / 2 ) , Math .…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.