Ok so,
i'm coding a program to build a girih tiling (
http://matsysdesign.com/studios/compositebodies/2010/01/girih-tiles/800px-girih_tiles2-svg/ ) with the 5 different tiles.
I.m building it tile by tile, because of the non-periodicity of the resulting tiling.
I want it to be really stable and accurate, because i need a scalable output (pdf) so i can use it high resolution. So i thought of using a pure math definition for every tile ( each one is comprised of a series of sides (lines with different angles) and other parameters), in a customised L-System configuration, and a system of tiling that didn't really need an (x,y) position for all the tiles,but just for one.
So first tile laid down is the "anchor", pinned to an (x,y), the next tiles being linked to the previous ones, depending on the sides they meet up. Maybe is just better to say it like this: 0 is the anchor tile, 1 comes on sides[1] of 0 ( which is called in my program the 'parentTile' of 1), 2 comes on side[3] of 1 and so on. I think i did pretty ok so far.
My problem starts when i'm trying to copy tiles and groups of tiles. Let's say i want to copy half of the tiling i've built so far because it creates a particular formation that i want to use more than once. I make a selection and thus i need 2 anchor tiles, to support the adjoining rest. I perform an algorithm to split the tiling, and based on the tileNumber, i choose the smallest tileNumber of the group to act like an anchor, and then, from smallest to biggest tileNumber, dictating to each tile who would their parentTile be. For obvious reasons, this algorithm is not bullet proof. And since all my diggings in the interwebs dind't show me a cleverer way to do this (the splitting algorithm) or the whole tiling programming, I ask kindly for some.....or any advice on the matter. Any info on the subject is really welcomed!
Thanks in advance
1