Grid Loops

If you made, say a 100 x 100 Grid of dots and joined some of them together so that they made squares and rectangles, what
method do you use (in programming) to find all the possible squares and rectangles (loops) in any generated combination? ----------------------------------------------------------------------- Ashley Clarke -------------------------------------------------------
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
I can't help you with the algorithm, but I remember seeing an art exhibition that displayed a 32x32(?) grid of black or white squares, that generated all the possible combinations. I think the program was running for several years, and I think it will take thosands or millions of years on a PC to complete all possible permutations!!! So I hope you have access to a supercomputer or more?
I will see if I can find it for you.
Cheers
Dale

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Wouldn't this just use a floodfill algorithm?
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Yes for each individual group of dots connected to make the smallest square possible but not when these combine to produce other larger squares and polygons around them. ----------------------------------------------------------------------- Ashley Clarke -------------------------------------------------------

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload
Its for only finding the loops in one pattern at a time, not for every possible combination it can generate (I meant - for any combination you throw at it). The grid dots will be connected manually as sets of nodes and vectors. ----------------------------------------------------------------------- Ashley Clarke -------------------------------------------------------

Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Polytechforum.com is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.