Click here to Skip to main content
15,176,948 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am searching an Algorithm for design a 2D map with a fixed tile set

I must resolve a problem such as Windows 8 UI
I means I have a set of rectangle tiles of different size, NO FRACTIONAL.

I have to compose a rectangle, using these tiles randomly.

The size of the map could be 10x10 as example.
Tiles size could be 1x1, 2x2, 4x2, 3x3, and so on

But the tiles could have some constraint:

-Some tiles could be used more than one but them have a max occurrence limit.
-Some tiles are mandatory.
-Some tiles have position constraints:
--some tiles are allowed only near a border (left, right, top, bottom)
--some tiles could be positioned only at [(x1,y1) or (x2,y2) or ...]

I think that is a "well known problem", at list without the constraint

Someone remember the name of a design pattern about it
or any other info to help me to find information about this algorithm?

Thank you
Riccardo
Posted
Updated 8-Jul-14 22:28pm
v2
Comments
Peter Leow 9-Jul-14 4:01am
   
You may consider Genetic Algorithm, an AI optimization algorithm.

1 solution

   
Comments
riccardo68 8-Jul-14 10:23am
   
I apologze but I explained bad my problem

I have to produce a result such as

sample

but the result maps has a different use.
George Jonsson 8-Jul-14 10:41am
   
The pattern has changed name to "Microsoft design language".
Does that help?
riccardo68 9-Jul-14 3:14am
   
No I need to draw a surface/map by add map part (the tile) from a set
Microsoft Metro is not involed, I mentioned it only for an example of the graphical result I need.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900