Fractional Universe Generator
Mathematical Foundation
The fractional function extracts the decimal portion of numbers, transforming continuous mathematical space into repeating, crystalline structures. This fundamental operation enables the creation of infinite tiling patterns, geometric repetitions, and mathematical harmonies that extend beyond the boundaries of conventional space.
Fractional Function Formula:
Where:
- is the input value
- is the floor function (greatest integer less than or equal to )
- The result is always in the range
This can also be expressed as:
The function creates a sawtooth wave pattern that repeats every unit interval:
By capturing only the fractional remainder, complex coordinate systems collapse into elegant, repeating units that form the foundation for procedural textures, architectural patterns, and natural crystalline formations.
ライブエディター
const fragment = () => { const tiled = frac(uv.mul(8)) const pattern = smoothstep(0.1, 0.2, tiled.x).mul(float(0.1).smoothstep(0.2, tiled.y)) const gradient = tiled.sub(0.5).length().mul(2) return vec4(vec3(pattern.mul(gradient)), 1) }