# Wolfram Function Repository

Instant-use add-on functions for the Wolfram Language

Function Repository Resource:

Generate Worley's cellular texture

Contributed by:
Wolfram Research Staff, based on work by Arnie Cachelin

ResourceFunction["FractalCellularTexture"][{ generates a texture with nearest-neighbor distance functions with weights |

In the synthesis of natural-looking textures, it is common to mimic the self-similarity found in many natural (fractal) systems by mixing copies of a synthetic texture generated at different scales. A "fractal" texture is typically produced by summing the first few "octaves" of a particular texture function. ResourceFunction["FractalCellularTexture"] uses Worley's cellular texture, which combines the first few nearest-neighbor distance functions, *F*_{1} to *F*_{4} (as described below), for a set of random feature points.

Given a set of random feature points, compute the distance from any point *x* to the nearest feature point. Call this nearest-feature distance function *F*_{1}. The function that returns the distance to the second-nearest feature is *F*_{2}, and the *n*^{th} nearest-feature distance, *F*_{n}. Cellular textures, Worley observed, can be generated from linear combinations of the first few *F*_{n}. Producing fractal versions of these texture functions can reproduce interesting, natural-looking textures with minimal information input.

Generate a cellular texture:

In[1]:= |

Out[1]= |

Wolfram Language 11.3 (March 2018) or above

- 1.0.0 – 17 April 2019

This work is licensed under a Creative Commons Attribution 4.0 International License