# P6m Reference Implementation

(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)

Let \$image be an image from which a 90-60-30° triangle part should be cut out and used as prototile for the p6m tile. There is only one free parameter needed for the generation of a p6m tile from a triangle mask and that is the hight of the triangle: \$t_h. The width is computed with: \$t_w = int(1/sqrt(3) * \$t_h)+1;

In the following relative translation parameters are used that are referencing to the one prototile that is used viz. to \$t_w and \$t_h. If patterns are generated with more than one prototile relative parameters should referencing to the width and height of the pattern image that itself is constructed as a function of the widths and heights of the prototile set and a general multiplicator or two multiplicators for width and height. Such a function (\$w_P, \$h_P) = f(\$mult, \$w_S_i, \$h_S_i | i = 1, …, n) or f(\$mult_w, \$mult_h, \$w_S_i, \$h_S_i | i = 1, …, n) is specified in the design space definition.

```# GENERATE p6m MASK/S
\$t_h = \$crop_h;  print "t_h = \$t_h \n";
\$t_w = int(1/sqrt(3) * \$t_h)+1;
\$mask->Set(size=>"\$t_w x \$t_h");  print "generate triangle mask with t_w x t_h = \$t_w x \$t_h \n";
```
Fehler beim Erstellen des Vorschaubildes: Datei fehlt

The prototile is generated with the triangle mask and the image and the rusult is pushed in a image list for all the prototiles to reflect the general case that a pattern is made of more than one prototile type:

```# GENERATE p6m PROTOTILE/S
\$mask->Composite(image=>\$image, compose=>'in', color=>'transparent', matte=>'true');   print "generate prototile \n";
```
```# PUSH PROTOTILE INTO \$Shape_list
```
Fehler beim Erstellen des Vorschaubildes: Datei fehlt

In the next step an empty p6m tile is generated for example with transparent background. It has 6 times the width and 2 times the hight of the prototile triangle:

```# GENERATE EMPTY p3m1-TILE \$tile AS A FUNCTION OF \$mask or \$prototile
\$tile_w = 3 * \$t_w;
\$tile_h = 2 * \$t_h;
\$tile->Set(size=>"\$tile_w x \$tile_h");  print "generate empty tile with tile_w x tile_h = \$tile_w x \$tile_h \n";
```

What follows is a sequence of 28 image processing operations, the CRMT commands that takes a clone of the prototile, rotates it, Flop and/or Flip it and makes a composite operation with compose=>over that includes a translation of the prototile over the tile image. The images are shown in jpg which means that the transparent background is transformed to black.

```# CRMT-COMMAND-LIST_01:  (C0, xt_w, y0) G1
@\$prototile_crm = ();
\$prototile_crm = \$Shape_list->[0]->Clone();
\$tile->Composite(image=>\$prototile_crm, compose=>'over', x=>\$t_w, y=>'0', color=>'transparent', matte=>'true');
\$tile->Set(page=>'0x0+0+0');  #\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_01.png");
\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_01.jpg");
```
Fehler beim Erstellen des Vorschaubildes: Datei fehlt
```# CRMT-COMMAND-LIST_02:  (C0, Fo, x0, y0) G1
@\$prototile_crm = ();
\$prototile_crm = \$Shape_list->[0]->Clone();
\$prototile_crm->Flop();
\$tile->Composite(image=>\$prototile_crm, compose=>'over', x=>'0', y=>'0', color=>'transparent', matte=>'true');
\$tile->Set(page=>'0x0+0+0'); #\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_02.png");
\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_02.jpg");
```
Fehler beim Erstellen des Vorschaubildes: Datei fehlt

```# CRMT-COMMAND-LIST_03: (C0, Fo, R60, Fo, x-1/2*t_w, y0) G6
@\$prototile_crm = ();
\$prototile_crm = \$Shape_list->[0]->Clone();
\$prototile_crm->Flop();
\$prototile_crm->Rotate(degrees=>60, color=>'transparent');
\$prototile_crm->Set(page=>'0x0+0+0');
\$prototile_crm->Trim();
\$prototile_crm->Flop();
\$tile->Composite(image=>\$prototile_crm, compose=>'over', x=>-1/2*\$t_w, y=>'0', color=>'transparent', matte=>'true');
\$tile->Set(page=>'0x0+0+0'); #\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_03.png");
\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_03.jpg");
```
Fehler beim Erstellen des Vorschaubildes: Datei fehlt
```# CRMT-COMMAND-LIST_04: (C0, Fo, R-60, x-t_w, y1/2*t_h) G6
@\$prototile_crm = ();
\$prototile_crm = \$Shape_list->[0]->Clone();
\$prototile_crm->Flop();
\$prototile_crm->Rotate(degrees=>-60, color=>'transparent');
\$prototile_crm->Set(page=>'0x0+0+0');
\$prototile_crm->Trim();
\$tile->Composite(image=>\$prototile_crm, compose=>'over', x=>-\$t_w, y=>1/2*\$t_h, color=>'transparent', matte=>'true');
\$tile->Set(page=>'0x0+0+0'); #\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_04.png");
\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_04.jpg");
```

Fehler beim Erstellen des Vorschaubildes: Datei fehlt
1. CRMT-COMMAND-LIST_05: (C0, Fo, R60, xt_w, y0) G2
```@\$prototile_crm = ();
\$prototile_crm = \$Shape_list->[0]->Clone();
\$prototile_crm->Flop();
\$prototile_crm->Rotate(degrees=>60, color=>'transparent');
\$prototile_crm->Set(page=>'0x0+0+0');
\$prototile_crm->Trim();
\$tile->Composite(image=>\$prototile_crm, compose=>'over', x=>\$t_w, y=>'0', color=>'transparent', matte=>'true');
\$tile->Set(page=>'0x0+0+0'); #\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_05.png");
\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_05.jpg");
```

Fehler beim Erstellen des Vorschaubildes: Datei fehlt
```# CRMT-COMMAND-LIST_06: (C0, Fo, R-60, Fo, xt_w, y1/2*t_h) G2
@\$prototile_crm = ();
\$prototile_crm = \$Shape_list->[0]->Clone();
\$prototile_crm->Flop();
\$prototile_crm->Rotate(degrees=>-60, color=>'transparent');
\$prototile_crm->Set(page=>'0x0+0+0');
\$prototile_crm->Trim();
\$prototile_crm->Flop();
\$tile->Composite(image=>\$prototile_crm, compose=>'over', x=>\$t_w, y=>1/2*\$t_h, color=>'transparent', matte=>'true');
\$tile->Set(page=>'0x0+0+0'); #\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_06.png");
\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_06.jpg");
```

Fehler beim Erstellen des Vorschaubildes: Datei fehlt

```# CRMT-COMMAND-LIST_07: (C0, R-120, x2*t_w, y0) G5
@\$prototile_crm = ();
\$prototile_crm = \$Shape_list->[0]->Clone();
\$prototile_crm->Rotate(degrees=>-120, color=>'transparent');
\$prototile_crm->Set(page=>'0x0+0+0');
\$prototile_crm->Trim();
\$tile->Composite(image=>\$prototile_crm, compose=>'over', x=>2*\$t_w, y=>'0', color=>'transparent', matte=>'true');
\$tile->Set(page=>'0x0+0+0'); #\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_07.png");
\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_07.jpg");
```

Fehler beim Erstellen des Vorschaubildes: Datei fehlt

```# CRMT-COMMAND-LIST_08: f(G5) => (C0, Fo, R-120, x5/2*t_w, y0)  G5=Flip(G6)
@\$prototile_crm = ();
\$prototile_crm = \$Shape_list->[0]->Clone();
\$prototile_crm->Flop();
\$prototile_crm->Rotate(degrees=>-120, color=>'transparent');
\$prototile_crm->Set(page=>'0x0+0+0');
\$prototile_crm->Trim();
\$tile->Composite(image=>\$prototile_crm, compose=>'over', x=>5/2*\$t_w, y=>'0', color=>'transparent', matte=>'true');
\$tile->Set(page=>'0x0+0+0'); #\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_08.png");
\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_08.jpg");
```
Fehler beim Erstellen des Vorschaubildes: Datei fehlt

```# CRMT-COMMAND-LIST_09: f(G1) => (C0, Fi, Fo, x3*t_w, y0)  Flop(G1)
@\$prototile_crm = ();
\$prototile_crm = \$Shape_list->[0]->Clone();
\$prototile_crm->Flip();
\$prototile_crm->Flop();
\$tile->Composite(image=>\$prototile_crm, compose=>'over', x=>3*\$t_w, y=>'0', color=>'transparent', matte=>'true');
\$tile->Set(page=>'0x0+0+0'); #\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_09.png");
\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_09.jpg");
```
Fehler beim Erstellen des Vorschaubildes: Datei fehlt

```# CRMT-COMMAND-LIST_10:  (C0, Fi, x4*t_w, y0) Flip(G1)
@\$prototile_crm = ();
\$prototile_crm = \$Shape_list->[0]->Clone();
\$prototile_crm->Flip();
\$tile->Composite(image=>\$prototile_crm, compose=>'over', x=>4*\$t_w, y=>'0', color=>'transparent', matte=>'true');
\$tile->Set(page=>'0x0+0+0'); #\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_10.png");
\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_10.jpg");
```

Fehler beim Erstellen des Vorschaubildes: Datei fehlt

```# CRMT-COMMAND-LIST_11: (C0, Fo, R60, Fi, x4*t_w, y0) Flip(G2)
@\$prototile_crm = ();
\$prototile_crm = \$Shape_list->[0]->Clone();
\$prototile_crm->Flop();
\$prototile_crm->Rotate(degrees=>60, color=>'transparent');
\$prototile_crm->Set(page=>'0x0+0+0');
\$prototile_crm->Trim();
\$prototile_crm->Flip();
\$tile->Composite(image=>\$prototile_crm, compose=>'over', x=>4*\$t_w, y=>'0', color=>'transparent', matte=>'true');
\$tile->Set(page=>'0x0+0+0'); #\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_11.png");
\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_11.jpg");
```

Fehler beim Erstellen des Vorschaubildes: Datei fehlt

```# CRMT-COMMAND-LIST_12: (C0, Fo, R-60, Fo, Fi, x4*t_w, y0) Flip(G2)
@\$prototile_crm = ();
\$prototile_crm = \$Shape_list->[0]->Clone();
\$prototile_crm->Flop();
\$prototile_crm->Rotate(degrees=>-60, color=>'transparent');
\$prototile_crm->Set(page=>'0x0+0+0');
\$prototile_crm->Trim();
\$prototile_crm->Flop();
\$prototile_crm->Flip();
\$tile->Composite(image=>\$prototile_crm, compose=>'over', x=>4*\$t_w, y=>'0', color=>'transparent', matte=>'true');
\$tile->Set(page=>'0x0+0+0'); #\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_12.png");
\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_12.jpg");
```

Fehler beim Erstellen des Vorschaubildes: Datei fehlt

```# CRMT-COMMAND-LIST_13: (C0, R-60, x11/2*t_w, y0) G5
@\$prototile_crm = ();
\$prototile_crm = \$Shape_list->[0]->Clone();
\$prototile_crm->Rotate(degrees=>-60, color=>'transparent');
\$prototile_crm->Set(page=>'0x0+0+0');
\$prototile_crm->Trim();
\$tile->Composite(image=>\$prototile_crm, compose=>'over', x=>11/2*\$t_w, y=>'0', color=>'transparent', matte=>'true');
\$tile->Set(page=>'0x0+0+0'); #\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_13.png");
\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_13.jpg");
```

Fehler beim Erstellen des Vorschaubildes: Datei fehlt

```# CRMT-COMMAND-LIST_14: f(G5) => (C0, Fo, R-60, x5*t_w, y1/2*t_h)  G5=Flip(G6)
@\$prototile_crm = ();
\$prototile_crm = \$Shape_list->[0]->Clone();
\$prototile_crm->Flop();
\$prototile_crm->Rotate(degrees=>-60, color=>'transparent');
\$prototile_crm->Set(page=>'0x0+0+0');
\$prototile_crm->Trim();
\$tile->Composite(image=>\$prototile_crm, compose=>'over', x=>5*\$t_w, y=>1/2*\$t_h, color=>'transparent', matte=>'true');
\$tile->Set(page=>'0x0+0+0'); #\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_14.png");
\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_14.jpg");
```

Fehler beim Erstellen des Vorschaubildes: Datei fehlt

```# CRMT-COMMAND-LIST_15:  (C0, Fi, xt_w, yt_h) G1 1
@\$prototile_crm = ();
\$prototile_crm = \$Shape_list->[0]->Clone();
\$prototile_crm->Flip();
\$tile->Composite(image=>\$prototile_crm, compose=>'over', x=>\$t_w, y=>\$t_h, color=>'transparent', matte=>'true');
\$tile->Set(page=>'0x0+0+0'); #\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_15.png");
\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_15.jpg");
```

Fehler beim Erstellen des Vorschaubildes: Datei fehlt

```# CRMT-COMMAND-LIST_16:  (C0, Fo, Fi, x0, yt_h) G1 2
@\$prototile_crm = ();
\$prototile_crm = \$Shape_list->[0]->Clone();
\$prototile_crm->Flop();
\$prototile_crm->Flip();
\$tile->Composite(image=>\$prototile_crm, compose=>'over', x=>'0', y=>\$t_h, color=>'transparent', matte=>'true');
\$tile->Set(page=>'0x0+0+0'); #\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_16.png");
\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_16.jpg");
```

Fehler beim Erstellen des Vorschaubildes: Datei fehlt

```# CRMT-COMMAND-LIST_17: (C0, Fo, R60, Fo, Fi, x-1/2*t_w, yt_h) G6 3
@\$prototile_crm = ();
\$prototile_crm = \$Shape_list->[0]->Clone();
\$prototile_crm->Flop();
\$prototile_crm->Rotate(degrees=>60, color=>'transparent');
\$prototile_crm->Set(page=>'0x0+0+0');
\$prototile_crm->Trim();
\$prototile_crm->Flop();
\$prototile_crm->Flip();
\$tile->Composite(image=>\$prototile_crm, compose=>'over', x=>-1/2*\$t_w, y=>\$t_h, color=>'transparent', matte=>'true');
\$tile->Set(page=>'0x0+0+0'); #\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_17.png");
\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_17.jpg");
```
Fehler beim Erstellen des Vorschaubildes: Datei fehlt

```# CRMT-COMMAND-LIST_18: (C0, Fo, R-60, Fi, x-t_w, yt_h) G6 4
@\$prototile_crm = ();
\$prototile_crm = \$Shape_list->[0]->Clone();
\$prototile_crm->Flop();
\$prototile_crm->Rotate(degrees=>-60, color=>'transparent');
\$prototile_crm->Set(page=>'0x0+0+0');
\$prototile_crm->Trim();
\$prototile_crm->Flip();
\$tile->Composite(image=>\$prototile_crm, compose=>'over', x=>-\$t_w, y=>\$t_h, color=>'transparent', matte=>'true');
\$tile->Set(page=>'0x0+0+0'); #\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_18.png");
\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_18.jpg");
```

Fehler beim Erstellen des Vorschaubildes: Datei fehlt

```# CRMT-COMMAND-LIST_19: (C0, Fo, R60, Fi, xt_w, yt_h) G2 5
@\$prototile_crm = ();
\$prototile_crm = \$Shape_list->[0]->Clone();
\$prototile_crm->Flop();
\$prototile_crm->Rotate(degrees=>60, color=>'transparent');
\$prototile_crm->Set(page=>'0x0+0+0');
\$prototile_crm->Trim();
\$prototile_crm->Flip();
\$tile->Composite(image=>\$prototile_crm, compose=>'over', x=>\$t_w, y=>\$t_h, color=>'transparent', matte=>'true');
\$tile->Set(page=>'0x0+0+0'); #\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_19.png");
\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_19.jpg");
```

Fehler beim Erstellen des Vorschaubildes: Datei fehlt

```# CRMT-COMMAND-LIST_20: (C0, Fo, R-60, Fo, Fi, xt_w, yt_h) G2 6
@\$prototile_crm = ();
\$prototile_crm = \$Shape_list->[0]->Clone();
\$prototile_crm->Flop();
\$prototile_crm->Rotate(degrees=>-60, color=>'transparent');
\$prototile_crm->Set(page=>'0x0+0+0');
\$prototile_crm->Trim();
\$prototile_crm->Flop();
\$prototile_crm->Flip();
\$tile->Composite(image=>\$prototile_crm, compose=>'over', x=>\$t_w, y=>\$t_h, color=>'transparent', matte=>'true');
\$tile->Set(page=>'0x0+0+0'); #\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_20.png");
\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_20.jpg");
```

Fehler beim Erstellen des Vorschaubildes: Datei fehlt

```# CRMT-COMMAND-LIST_21: (C0, R-120, Fi, x2*t_w, y3/2*t_h) G5 7
@\$prototile_crm = ();
\$prototile_crm = \$Shape_list->[0]->Clone();
\$prototile_crm->Rotate(degrees=>-120, color=>'transparent');
\$prototile_crm->Set(page=>'0x0+0+0');
\$prototile_crm->Trim();
\$prototile_crm->Flip();
\$tile->Composite(image=>\$prototile_crm, compose=>'over', x=>2*\$t_w, y=>3/2*\$t_h, color=>'transparent', matte=>'true');
\$tile->Set(page=>'0x0+0+0'); #\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_21.png");
\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_21.jpg");
```

Fehler beim Erstellen des Vorschaubildes: Datei fehlt

```# CRMT-COMMAND-LIST_22: (C0, Fo, R-120, Fi, x5/2*t_w, yt_h)  G5=Flip(G6) 8
@\$prototile_crm = ();
\$prototile_crm = \$Shape_list->[0]->Clone();
\$prototile_crm->Flop();
\$prototile_crm->Rotate(degrees=>-120, color=>'transparent');
\$prototile_crm->Set(page=>'0x0+0+0');
\$prototile_crm->Trim();
\$prototile_crm->Flip();
\$tile->Composite(image=>\$prototile_crm, compose=>'over', x=>5/2*\$t_w, y=>\$t_h, color=>'transparent', matte=>'true');
\$tile->Set(page=>'0x0+0+0'); #\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_22.png");
\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_22.jpg");
```

Fehler beim Erstellen des Vorschaubildes: Datei fehlt

```# CRMT-COMMAND-LIST_23: (C0, Fo, x3*t_w, yt_h)  Flop(G1) 9     FiFoFi<=>Fo
@\$prototile_crm = ();
\$prototile_crm = \$Shape_list->[0]->Clone();
\$prototile_crm->Flop();
\$tile->Composite(image=>\$prototile_crm, compose=>'over', x=>3*\$t_w, y=>\$t_h, color=>'transparent', matte=>'true');
\$tile->Set(page=>'0x0+0+0'); #\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_23.png");
\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_23.jpg");
```

Fehler beim Erstellen des Vorschaubildes: Datei fehlt

1. CRMT-COMMAND-LIST_24: (C0, x4*t_w, yt_h) Flip(G1) 10 FiFi<=>#
```@\$prototile_crm = ();
\$prototile_crm = \$Shape_list->[0]->Clone();
\$tile->Composite(image=>\$prototile_crm, compose=>'over', x=>4*\$t_w, y=>\$t_h, color=>'transparent', matte=>'true');
\$tile->Set(page=>'0x0+0+0'); #\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_24.png");
\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_24.jpg");
```

Fehler beim Erstellen des Vorschaubildes: Datei fehlt

```# CRMT-COMMAND-LIST_25: (C0, Fo, R60, x4*t_w, yt_h) Flip(G2) 11            FiFi<=>#
@\$prototile_crm = ();
\$prototile_crm = \$Shape_list->[0]->Clone();
\$prototile_crm->Flop();
\$prototile_crm->Rotate(degrees=>60, color=>'transparent');
\$prototile_crm->Set(page=>'0x0+0+0');
\$prototile_crm->Trim();
\$tile->Composite(image=>\$prototile_crm, compose=>'over', x=>4*\$t_w, y=>\$t_h, color=>'transparent', matte=>'true');
\$tile->Set(page=>'0x0+0+0'); #\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_25.png");
\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_25.jpg");
```

Fehler beim Erstellen des Vorschaubildes: Datei fehlt

```# CRMT-COMMAND-LIST_26: (C0, Fo, R-60, Fo, x4*t_w, y3/2*t_h) Flip(G2)  12          FiFi<=>#
@\$prototile_crm = ();
\$prototile_crm = \$Shape_list->[0]->Clone();
\$prototile_crm->Flop();
\$prototile_crm->Rotate(degrees=>-60, color=>'transparent');
\$prototile_crm->Set(page=>'0x0+0+0');
\$prototile_crm->Trim();
\$prototile_crm->Flop();
\$tile->Composite(image=>\$prototile_crm, compose=>'over', x=>4*\$t_w, y=>3/2*\$t_h, color=>'transparent', matte=>'true');
\$tile->Set(page=>'0x0+0+0'); #\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_26.png");
\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_26.jpg");
```

Fehler beim Erstellen des Vorschaubildes: Datei fehlt

```# CRMT-COMMAND-LIST_27: (C0, R-60, Fi, x11/2*t_w, y\$t_h) G5  13
@\$prototile_crm = ();
\$prototile_crm = \$Shape_list->[0]->Clone();
\$prototile_crm->Rotate(degrees=>-60, color=>'transparent');
\$prototile_crm->Set(page=>'0x0+0+0');
\$prototile_crm->Trim();
\$prototile_crm->Flip();
\$tile->Composite(image=>\$prototile_crm, compose=>'over', x=>11/2*\$t_w, y=>\$t_h, color=>'transparent', matte=>'true');
\$tile->Set(page=>'0x0+0+0'); #\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_27.png");
\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_27.jpg");
```

Fehler beim Erstellen des Vorschaubildes: Datei fehlt

```# CRMT-COMMAND-LIST_28: f(G5) => (C0, Fo, R-60, Fi, x5*t_w, yt_h)  G5=Flip(G6)   14
@\$prototile_crm = ();
\$prototile_crm = \$Shape_list->[0]->Clone();
\$prototile_crm->Flop();
\$prototile_crm->Rotate(degrees=>-60, color=>'transparent');
\$prototile_crm->Set(page=>'0x0+0+0');
\$prototile_crm->Trim();
\$prototile_crm->Flip();
\$tile->Composite(image=>\$prototile_crm, compose=>'over', x=>5*\$t_w, y=>\$t_h, color=>'transparent', matte=>'true');
\$tile->Set(page=>'0x0+0+0'); #\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_28.png");
\$tile->Write(filename=>"\$output_meta_folder/tile_after_crmt_28.jpg");
```

Fehler beim Erstellen des Vorschaubildes: Datei fehlt

Empirical it is shown that there are less gap artefacts in p6m tiles than in p3m1 tiles when using ImageMagick. Nevertheless the postprocessing workaround to fill the gap artefacts with local pixels developed for p3m1 should be applayed to insure that non aesthetical artefacts did not occure especially if the tile generation process is integrated in a generative or evolutionary art process where artefacts are not immediately recognized by an artist or general a human interaction partner and could ruin a work of art that needs a costly generation process.

If the image processing commands were combined and integrated one get a string that codes the building of a p6m tile from a given 90-60-30° prototile triangle:

\$CRMT_string = 'C0, xt_w, y0, C0, Fo, x0, y0, C0, Fo, R60, Fo, x-1/2*t_w, y0, C0, Fo, R-60, x-t_w, y1/2*t_h, C0, Fo, R60, xt_w, y0, C0, Fo, R-60, Fo, xt_w, y1/2*t_h, C0, R-120, x2*t_w, y0, C0, Fo, R-120, x5/2*t_w, y0, C0, Fi, Fo, x3*t_w, y0, C0, Fi, x4*t_w, y0, C0, Fo, R60, Fi, x4*t_w, y0, C0, Fo, R-60, Fo, Fi, x4*t_w, y0, C0, R-60, x11/2*t_w, y0, C0, Fo, R-60, x5*t_w, y1/2*t_h, C0, Fi, xt_w, yt_h, C0, Fo, Fi, x0, yt_h, C0, Fo, R60, Fo, Fi, x-1/2*t_w, yt_h, C0, Fo, R-60, Fi, x-t_w, yt_h, C0, Fo, R60, Fi, xt_w, yt_h, C0, Fo, R-60, Fo, Fi, xt_w, yt_h, C0, R-120, Fi, x2*t_w, y3/2*t_h, C0, Fo, R-120, Fi, x5/2*t_w, yt_h, C0, Fo, x3*t_w, yt_h, C0, x4*t_w, yt_h, C0, Fo, R60, x4*t_w, yt_h, C0, Fo, R-60, Fo, x4*t_w, y3/2*t_h, C0, R-60, Fi, x11/2*t_w, yt_h, C0, Fo, R-60, Fi, x5*t_w, yt_h';

Such a string is written in a txt file and an CRMT-image interpreter, that has be be programmed, should be able to reconstruct the building of a p6m tile from any given 90-60-30° triangle prototile. The gole here is an image interpreter that should be able to build tiles from the command strings that were generated from Evolutionary Algorithms environments in the Patterns and Tilings Competition.