kaleidoscope: Angular Symmetry Transformation
Radial Mirror Reflection System
The kaleidoscope
functions create angular symmetry by dividing coordinate space into segments and mirroring content across radial boundaries. This produces kaleidoscopic effects with configurable segment counts and rotation phases.
Mathematical Foundation
The transformation operates in polar coordinates:
Where is the segment angle for segments, ensuring each segment contains a mirrored copy of the original pattern.
Function Variants
Function | Parameters | Default Values |
---|---|---|
kaleidoscope | coord , segmentCount , phase | - |
kaleidoscopeDefault | coord | 8 segments, 0° phase |
kaleidoscopeCount | coord , segmentCount | 0° phase |
ライブエディター
const fragment = () => { const kaleido = kaleidoscopeCount(uv, 6) const pattern = sin(kaleido.x.mul(20)).mul(sin(kaleido.y.mul(20))) const color = pattern.mul(0.5).add(0.5) return vec4(vec3(color), 1) }