cbi_toolbox.simu.texture

The texture module allows to generate 3D textures for synthetic samples

cbi_toolbox.simu.texture.simplex(size, scale=1, octaves=3, persistence=0.7, lacunarity=3.5, seed=None)[source]

Generates 3D simplex noise

Parameters
  • size (int) – size of the texture

  • scale (int, optional) – scale of the noise, by default 1

  • octaves (int, optional) – number of octaves used, by default 3

  • persistence (float, optional) – relative amplitude of octaves, by default 0.7

  • lacunarity (float, optional) – relative frequency of octaves, by default 3.5

  • seed (int, optional) – seed for the noise, by default None

Returns

the texture

Return type

array [size, size, size]

cbi_toolbox.simu.texture.spheres(size, density=1, seed=None)[source]

Generates a texture full of hollow spheres

Parameters
  • size (int) – size of the texture

  • density (int, optional) – spheres density in the texture, by default

  • seed (int, optional) – seed of the rng, default is None

Returns

the texture

Return type

array [size, size, size]