Squared Rectangle

Task

Arrange the coloured squares to fit exactly within the grey rectangle. Hint: no square may touch another of the same colour.

Play

Version 1

Ten squares of sizes: 3, 5, 6, 11, 17, 19, 22, 23, 24, 25. Rectangle size: 65 x 47. Reset

Version 2

Nine squares of sizes: 2, 8, 14, 16, 18, 20, 28, 30, 36. Rectangle size: 64 x 66. Reset

25
24
23
22
19
17
11
6
5
3
36
30
28
20
18
16
14
8
2

Information

The first 'squared rectangle' was published in 1925 by Zbigniew Morón.

Tech Notes

This puzzle employs the jQuery plug-in Draggable with custom options applied: cursor, opacity, snap, snapTolerance, and a stop function.

The stop function is used to apply relative positions to the dragged element. If the page is resized or restructured the element will remain in the correct position.

stop: function(event, ui) {

var computedfontsize = parseFloat($(this).css("font-size")),
offset = $(this).position(),
$left = offset.left / computedfontsize,
$top = offset.top / computedfontsize;

$(this).css({"left": $left + "em", "top": $top + "em"});

}

Title

details

Thanks for visiting!