# Machi - Evolving Cosmic Noise

Machi is a simulation environment and we needed a random field generator that behaves smoothly over time and slowly evolves.

This random field is needed to simulate foliage growth.

![](https://cdn.hashnode.com/uploads/covers/682665f051e3d254b7cd5062/a24b5e2e-ecc7-4c1b-b0bf-407095dd3ee7.webp align="center")

This noise evolution (64x of the normal speed) does not look much but I think this is the central piece the magical ingredient of this soup of biomes in Machi.

One, this provides a gradient that is stable in short intervals, but changes over time.

So, say, if there is a local agent like a foliage need to decide which way to move, it has a tie breaker that is stable and yet ever so slightly perturbed each iteration. Foliage growth example:

![](https://cdn.hashnode.com/uploads/covers/682665f051e3d254b7cd5062/79f4a3b1-86c5-4022-b6c6-53271e6cf569.webp align="center")

The foliage growth here uses the noise gradient above to simulate the growth. The growth is mostly stable and converges into a shape when the noise is never perturbed.

![](https://cdn.hashnode.com/uploads/covers/682665f051e3d254b7cd5062/0b461139-b2fd-47da-baff-2dbcc3313be7.webp align="center")

Sprited Dev 🐛
