How to build and operate with floor plan trees/graphs

43 Views Asked by At

I have a rather abstract question, because I don't know which side to approach to its solution. So, I would appreciate any information.

I have a task to create a simple app that generates floor plans and I following by these instructions (https://www.hindawi.com/journals/ijcgt/2010/624817/). At the moment I use squarified treemaps (http://www.win.tue.nl/~vanwijk/stm.pdf) and here no problems. I create nested array in which elements are rooms with size. Problems starts when I trying to represent generated "rooms" as edges and vertexes. (Floor plan as vertexes and edges steps) (a, b, c, d steps) That representation can give me access to this elements as special "entities" in future app versions.

I don't have skills in graphs (and do I need graphs?) and at the moment totally stucked at this step. How can I represent room walls as trees (or graphs?) at this step? Calculate size of squares (rooms) and convert sides to a vectors? Then in loop find shared vectors (same position by "x" or "y") and determine them as shared walls? The instinct tells me that there exist more elegant and efficient ways.

Anyway, thanks for any information about this.