
In
scientific visualization
Scientific visualization ( also spelled scientific visualisation) is an interdisciplinary branch of science concerned with the visualization of scientific phenomena. Michael Friendly (2008)"Milestones in the history of thematic cartography, st ...
, line integral convolution (LIC) is a method to visualize a
vector field
In vector calculus and physics, a vector field is an assignment of a vector to each point in a space, most commonly Euclidean space \mathbb^n. A vector field on a plane can be visualized as a collection of arrows with given magnitudes and dire ...
(such as
fluid motion
In physics, physical chemistry and engineering, fluid dynamics is a subdiscipline of fluid mechanics that describes the flow of fluids – liquids and gases. It has several subdisciplines, including (the study of air and other gases in motio ...
) at high spatial resolutions.
[ The LIC technique was first proposed by Brian Cabral and Leith Casey Leedom in 1993.]
In LIC, discrete numerical line integration is performed along the field line
A field line is a graphical Scientific visualization, visual aid for visualizing vector fields. It consists of an imaginary integral curve which is tangent to the field Euclidean vector, vector at each point along its length. A diagram showing ...
s (curves) of the vector field on a uniform grid. The integral operation is a convolution
In mathematics (in particular, functional analysis), convolution is a operation (mathematics), mathematical operation on two function (mathematics), functions f and g that produces a third function f*g, as the integral of the product of the two ...
of a filter kernel
Kernel may refer to:
Computing
* Kernel (operating system), the central component of most operating systems
* Kernel (image processing), a matrix used for image convolution
* Compute kernel, in GPGPU programming
* Kernel method, in machine learnin ...
and an input texture, often white noise
In signal processing, white noise is a random signal having equal intensity at different frequencies, giving it a constant power spectral density. The term is used with this or similar meanings in many scientific and technical disciplines, i ...
.[ In ]signal processing
Signal processing is an electrical engineering subfield that focuses on analyzing, modifying and synthesizing ''signals'', such as audio signal processing, sound, image processing, images, Scalar potential, potential fields, Seismic tomograph ...
, this process is known as a discrete convolution
In mathematics (in particular, functional analysis), convolution is a operation (mathematics), mathematical operation on two function (mathematics), functions f and g that produces a third function f*g, as the integral of the product of the two ...
.
Overview
Traditional visualizations of vector fields use small arrows or lines to represent vector direction and magnitude. This method has a low spatial resolution, which limits the density of presentable data and risks obscuring characteristic features in the data.[ More sophisticated methods, such as streamlines and particle tracing techniques, can be more revealing but are highly dependent on proper seed points.][ Texture-based methods, like LIC, avoid these problems since they depict the entire vector field at point-like (pixel) resolution.][
Compared to other integration-based techniques that compute field lines of the input vector field, LIC has the advantage that all structural features of the vector field are displayed, without the need to adapt the start and end points of field lines to the specific vector field. In other words, it shows the topology of the vector field.
In user testing, LIC was found to be particularly good for identifying critical points.]
Algorithm
Informal description
LIC causes output values to be strongly correlated along the field lines, but uncorrelated in orthogonal directions.[ As a result, the field lines contrast each other and stand out visually from the background.
Intuitively, the process can be understood with the following example: the flow of a vector field can be visualized by overlaying a fixed, random pattern of dark and light paint. As the flow passes by the paint, the fluid picks up some of the paint's color, averaging it with the color it has already acquired. The result is a randomly striped, smeared texture where points along the same streamline tend to have a similar color. Other physical examples include:
* whorl patterns of paint, oil, or foam on a river
* visualisation of ]magnetic field
A magnetic field (sometimes called B-field) is a physical field that describes the magnetic influence on moving electric charges, electric currents, and magnetic materials. A moving charge in a magnetic field experiences a force perpendicular ...
lines using randomly distributed iron filings
* fine sand being blown by strong wind
Formal mathematical description
Although the input vector field and the result image are discretized, it pays to look at it from a continuous viewpoint. Let be the vector field given in some domain . Although the input vector field is typically discretized, we regard the field as defined in every point of , i.e. we assume an interpolation
In the mathematics, mathematical field of numerical analysis, interpolation is a type of estimation, a method of constructing (finding) new data points based on the range of a discrete set of known data points.
In engineering and science, one ...
. Streamlines, or more generally field lines, are tangent to the vector field in each point. They end either at the boundary of or at critical points where . For the sake of simplicity, critical points and boundaries are ignored in the following.
A field line , parametrized by arc length , is defined as
Let be the field line that passes through the point for . Then the image gray value at is set to
where is the convolution kernel
Kernel may refer to:
Computing
* Kernel (operating system), the central component of most operating systems
* Kernel (image processing), a matrix used for image convolution
* Compute kernel, in GPGPU programming
* Kernel method, in machine learnin ...
, is the noise image, and is the length of field line segment that is followed.
has to be computed for each pixel in the LIC image. If carried out naively, this is quite expensive. First, the field lines have to be computed using a numerical method for solving ordinary differential equations, like a Runge–Kutta method, and then for each pixel the convolution along a field line segment has to be calculated.
The final image will normally be colored in some way. Typically, some scalar field in (like the vector length) is used to determine the hue, while the grayscale LIC output determines the brightness
Brightness is an attribute of visual perception in which a source appears to be radiating/reflecting light. In other words, brightness is the perception dictated by the luminance of a visual target. The perception is not linear to luminance, and ...
.
Different choices of convolution kernels and random noise produce different textures; for example, pink noise
Pink noise, noise, fractional noise or fractal noise is a signal (information theory), signal or process with a frequency spectrum such that the power spectral density (power per frequency interval) is inversely proportional to the frequenc ...
produces a cloudy pattern where areas of higher flow stand out as smearing, suitable for weather visualization. Further refinements in the convolution can improve the quality of the image.
Programming description
Algorithmically, LIC takes a vector field and noise texture as input, and outputs a texture. The process starts by generating in the domain of the vector field a random gray level image at the desired output resolution. Then, for every pixel in this image, the forward and backward streamline of a fixed arc length
Arc length is the distance between two points along a section of a curve. Development of a formulation of arc length suitable for applications to mathematics and the sciences is a problem in vector calculus and in differential geometry. In the ...
is calculated. The value assigned to the current pixel is computed by a convolution
In mathematics (in particular, functional analysis), convolution is a operation (mathematics), mathematical operation on two function (mathematics), functions f and g that produces a third function f*g, as the integral of the product of the two ...
of a suitable convolution kernel with the gray levels of all the noise pixels lying on a segment of this streamline. This creates a gray level LIC image.
Versions
Basic
Basic LIC images are grayscale images, without color and animation. While such LIC images convey the direction of the field vectors, they do not indicate orientation; for stationary fields, this can be remedied by animation. Basic LIC images do not show the length of the vectors (or the strength of the field).
Color
The length of the vectors (or the strength of the field) is usually coded in color; alternatively, animation can be used.[
]
Animation
LIC images can be animated by using a kernel that changes over time. Samples at a constant time from the streamline would still be used, but instead of averaging all pixels in a streamline with a static kernel, a ripple-like kernel constructed from a periodic function
A periodic function, also called a periodic waveform (or simply periodic wave), is a function that repeats its values at regular intervals or periods. The repeatable part of the function or waveform is called a ''cycle''. For example, the t ...
multiplied by a Hann function
The Hann function is named after the Austrian meteorologist Julius von Hann. It is a window function used to perform Hann smoothing or hanning. The function, with length L and amplitude 1/L, is given by:
:
w_0(x) \triangleq \left\.
For ...
acting as a window (in order to prevent artifacts) is used. The periodic function is then shifted along the period to create an animation.
Fast LIC (FLIC)
The computation can be significantly accelerated by re-using parts of already computed field lines, specializing to a box function as convolution kernel and avoiding redundant computations during convolution.[ The resulting fast LIC method can be generalized to convolution kernels that are arbitrary polynomials.]
Oriented Line Integral Convolution (OLIC)
Because LIC does not encode flow orientation, it cannot distinguish between streamlines of equal direction but opposite orientation.[ Oriented Line Integral Convolution (OLIC) solves this issue by using a ramp-like asymmetric kernel and a low-density noise texture.][ The kernel asymmetrically modulates the intensity along the streamline, producing a trace that encodes orientation; the low-density of the noise texture prevents smeared traces from overlapping, aiding readability.
Fast Rendering of Oriented Line Integral Convolution (FROLIC) is a variation that approximates OLIC by rendering each trace in discrete steps instead of as a continuous smear.]
Unsteady Flow LIC (UFLIC)
For time-dependent vector fields (unsteady flow), a variant called Unsteady Flow LIC has been designed that maintains the coherence of the flow animation. An interactive GPU-based implementation of UFLIC has been presented.
Parallel
Since the computation of an LIC image is expensive but inherently parallel, the process has been parallelized
Parallel computing is a type of computation in which many calculations or processes are carried out simultaneously. Large problems can often be divided into smaller ones, which can then be solved at the same time. There are several different for ...
and, with availability of GPU-based implementations, interactive on PCs.
Multidimensional
Note that the domain does not have to be a 2D domain: the method is applicable to higher dimensional domains using multidimensional noise fields. However, the visualization of the higher-dimensional LIC texture is problematic; one way is to use interactive exploration with 2D slices that are manually positioned and rotated. The domain does not have to be flat either; the LIC texture can be computed also for arbitrarily shaped 2D surfaces in 3D space.
Applications
This technique has been applied to a wide range of problems since it first was published in 1993, both scientific and creative, including:
Representing vector fields:
* visualization of steady (time-independent) flows (streamlines)
* visual exploration of 2D autonomous dynamical systems
* wind mapping
* water flow mapping
Artistic effects for image generation and stylization:
* pencil drawing (automatic pencil drawing generation technique using LIC pencil filter)
* automatic generation of hair textures
* creating marbling texture
Terrain generalization:
* creating generalized shaded relief
Terrain cartography or relief mapping is the depiction of the shape of the surface of the Earth on a map, using one or more of several techniques that have been developed. Terrain or relief is an essential aspect of physical geography, and as su ...
Bernhard Jenny (2021) Terrain generalization with line integral convolution, Cartography and Geographic Information Science, 48:1, 78-92, DOI: 10.1080/15230406.2020.1833762
/ref>
Implementations
GPU Based Image Processing Tools by Raymond McGuire
ParaView : Line Integral Convolution
A 2D flow visualization tool based on LIC and RK4. Developed using C++ and VTK. by Andres Bejarano
See also
* Weighted arithmetic mean
The weighted arithmetic mean is similar to an ordinary arithmetic mean (the most common type of average), except that instead of each of the data points contributing equally to the final average, some data points contribute more than others. Th ...
References
{{Wikibooks, Fractals/Mathematics/LIC
Numerical function drawing
Vector calculus
Fluid dynamics
Complex analysis
Computer graphics