static private ShrinkTile ( |
||
tile | ||
shrinkFactor | double | |
return | void |
public Tile[] FundamentalCell() { Tile template = TemplateTile(); Tile.ShrinkTile(ref template, 0.9); // Generate a cell tiling. TilingConfig tilingConfig = new TilingConfig(Q, P); Tiling poly = new Tiling(); poly.Generate(tilingConfig); m_tiles = poly.Tiles.ToList(); //SetupTransformCircle( tile ); // Call this before transforming. //SetupNeighborCircle( tile ); // Generate our cell. List <Tile> cellTiles = new List <Tile>(); foreach (Tile t in poly.Tiles) { Tile temp = template.Clone(); temp.Transform(t.Isometry.Inverse()); cellTiles.Add(temp); } return(cellTiles.ToArray()); }
public static Tile CreateBaseTile(TilingConfig config) { Polygon boundary = new Polygon(), drawn = new Polygon(); boundary.CreateRegular(config.P, config.Q); drawn = boundary.Clone(); //boundary.CreateRegular( 3, 10 ); //drawn.CreateRegular( 3, 8 ); //boundary.CreateRegular( 3, 7 ); //drawn = Heart(); //for( int i=0; i<drawn.NumSides; i++ ) // drawn.Segments[i].Center *= 0.1; // Good combos: // ( 5, 5 ), ( 10, 10 ) // ( 3, 10 ), ( 3, 9 ) // ( 6, 4 ), ( 6, 8 ) // ( 7, 3 ), ( 7, 9 ) Tile tile = new Tile(boundary, drawn, config.Geometry); Tile.ShrinkTile(ref tile, config.Shrink); return(tile); }