We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › tiling different objects
Page Index Toggle Pages: 1
tiling different objects (Read 277 times)
tiling different objects
Jun 7th, 2008, 7:09pm
 
Hi, I am quite a processing newbie so please bear with me.

I was trying to code a routine that loads different shapes (really simle symbols drawn in black over white in a png file) and places them on the screen in a way that minimizes the remaining white space. Kind of tiling them together as much as possible.

I am using the blob detecttion library to extract polygon information from each loaded file.

Then I was thinking of clustering them together as follows:

Place the first one in the middle of the screen.
Then, for each new shape loaded, loop on every possible position on the screen and calculate a delauney diagram that uses all the vertexes from the previous shapes and the vertexes of the one I am trying to place.

Minimize the delauney area over each possible not overlapping position...

(Hope I am making myself clear)

Of couse this is a suboptimal solution, and it does not take into account the fact that when you leave holes in the middle I suspect they kind of screw up things...


I am wandering if there are others solutions to the problem, or which approach you would take...

Thank you
sergio


Page Index Toggle Pages: 1