Thought we needed a fun task to do. Consider the illustration of rectangles within rectangles. We will assume that each rectangle is a dynamic block that has been stretched out as needed. We will also assume that all rectangles are drawn so that they do not intersect or touch each other. I want the user to be able to select all of the rectangles and get nested parentheses indicating the nesting relationship between the rectangles. The ordering will be determined going from left to right and top to bottom. Let the integers represent the enames of the rectangles. I want to get back a list like this
(1 (2)(3 (4)(5))(6 (7 (8 ))))
where each pair of parentheses represents one of the rectangles and the integers are the enames of the appropriate rectangles.