Log-Polar Coordinates
In the realm of generative art, log-polar coordinates offer a unique way to represent space. Unlike Cartesian or polar coordinates, which are based on linear distances and angles from a central point, log-polar coordinates use logarithmic radial distance and angular frequency. This transformation allows for an interesting distortion where small changes in angle correspond to large changes in radius, creating visually striking patterns.
The formula t = -ln(r) + time*speed is used here, where r represents the radial distance from a central point, and time*speed introduces temporal variation. The logarithmic function compresses distances at larger radii, leading to an organic, spiral-like structure that evolves over time.
Domain Warping
Domain warping is the process of applying a non-linear transformation to the coordinate space. In this simulation, it involves perturbing the wall's spiral angle using fractal value noise, which introduces randomness and organic behavior into the otherwise periodic patterns.
This technique allows for the creation of complex, evolving structures that mimic natural phenomena such as fluid dynamics or biological growth patterns.
Rasterization Techniques
The core of this simulation lies in its hand-written JavaScript rasteriser. Instead of relying on GPU shaders for rendering, every pixel is computed directly from the log-polar coordinates and domain-warping transformations. This approach enables real-time computation and manipulation of the image, providing a deeper understanding of how these techniques work.
The classic render-small-then-upscale trick involves rendering the image at a lower resolution and then stretching it to fit the canvas size. This method is computationally efficient and allows for smooth animations without the need for high-performance graphics hardware.
Applications in Generative Art
Log-polar coordinates and domain warping are not just tools for creating mesmerizing visual effects; they have practical applications in various fields. In computer vision, these techniques can be used to analyze textures or patterns in images. In art, they offer a way to create dynamic, interactive pieces that respond to user input or time.
Moreover, the principles behind this simulation are relevant in areas such as signal processing and data visualization, where complex transformations of spatial data are common.
Frequently asked questions
What is domain warping?
Domain warping refers to the process of applying a non-linear transformation to the coordinate space, often used to introduce randomness and organic behavior into otherwise periodic patterns.
Why use log-polar coordinates instead of Cartesian or polar coordinates?
Log-polar coordinates are useful because they can represent certain types of transformations more naturally. They compress distances at larger radii, which is beneficial for creating visually striking and organic patterns in generative art.
How does the render-small-then-upscale trick work?
This technique involves rendering an image at a lower resolution and then stretching it to fit the canvas size. This method is computationally efficient and allows for smooth animations without requiring high-performance graphics hardware.
What are some practical applications of log-polar coordinates and domain warping?
These techniques have applications in computer vision, where they can be used to analyze textures or patterns in images. In art, they offer a way to create dynamic, interactive pieces that respond to user input or time.
Try it live
Everything above runs in your browser — open Neon Tunnel: Log-Polar Domain-Warp Raster (2D) and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.
▶ Open Neon Tunnel: Log-Polar Domain-Warp Raster (2D) simulation