porespy.beta.tile#

porespy.beta.tile(im, n, mode='periodic')#

Tile a TPMS image to create a larger domain.

Parameters:
  • im (ndarray) – The 3-D boolean image to tile, typically produced by gyroid.

  • n (int or sequence of int) – Number of repetitions along each axis. A single integer tiles equally in all directions; a sequence (e.g. (3, 3, 1)) tiles each axis independently.

  • mode (str, optional) – Tiling strategy. Options are:

Returns:

im2 – Tiled boolean array. Its shape along each axis is im.shape[i] * n[i].

Return type:

ndarray

Examples

Generate one gyroid unit cell and tile it 3x3 in-plane:

>>> im = gyroid(shape=100)
>>> im2 = tile(im, n=(3, 3, 1), mode='periodic')
>>> im2.shape
(300, 300, 100)