Line integral convolution: Difference between revisions

Content deleted Content added
Additional copy edits and citation improvements
swap out deadlink
 
(8 intermediate revisions by 6 users not shown)
Line 7:
 
==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.<ref name="Stalling 1995" /><ref name=":0" /> More sophisticated methods, such as [[Streamlines, streaklines, and pathlines|streamlines]] and particle tracing techniques, can be more revealing but are highly dependent on proper seed points.<ref name="Stalling 1995" /> Texture-based methods, like LIC, avoid these problems since they depict the entire vector field at point-like (pixel) resolution.<ref name="Stalling 1995" />
 
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.{{Citation needed|date=July 2024}}
Line 27:
Although the input vector field and the result image are discretized, it pays to look at it from a continuous viewpoint.<ref name="Stalling 1995">{{cite conference | first1 = Detlev | last1 = Stalling | first2 = Hans-Christian | last2 = Hege | title = Fast and Resolution Independent Line Integral Convolution | citeseerx = 10.1.1.45.5526 | book-title = Proceedings of the 22nd Annual Conference on Computer Graphics and Interactive Techniques | conference = SIGGRAPH '95 | date = August 6–11, 1995 | ___location = Los Angeles, California | pages = [https://archive.org/details/computergraphics00sigg/page/249 249–256] | doi = 10.1145/218380.218448 | isbn = 0-89791-701-4 | url = https://archive.org/details/computergraphics00sigg/page/249 }}</ref> Let <math>\mathbf{v}</math> be the vector field given in some ___domain <math>\Omega</math>. Although the input vector field is typically discretized, we regard the field <math>\mathbf{v}</math> as defined in every point of <math>\Omega</math>, i.e. we assume an [[interpolation]]. Streamlines, or more generally field lines, are tangent to the vector field in each point. They end either at the boundary of <math>\Omega</math> or at critical points where <math>\mathbf{v}=\mathbf{0}</math>. For the sake of simplicity, critical points and boundaries are ignored in the following.
 
A field line <math>\boldsymbol \sigma</math>, parametrized by arc length <math>s</math>, is defined as

<math display="block">\frac{d\boldsymbol \sigma (s)}{ds} = \frac{\mathbf{v}(\boldsymbol {\sigma}(s))}{|\mathbf{v}(\boldsymbol{\sigma}(s))|}.</math>

Let <math>\boldsymbol{\sigma}_\mathbf{r}(s)</math> be the field line that passes through the point <math>\mathbf{r}</math> for <math>s=0</math>. Then the image gray value at <math>\mathbf{r}</math> is set to
 
:<math>D(\mathbf{r}) = \int_{-L/2}^{L/2} k(s)N(\boldsymbol{\sigma}_{\mathbf{r}}(s)) ds</math>
<math display="block">D(\mathbf{r}) = \int_{-L/2}^{L/2} k(s)N(\boldsymbol{\sigma}_{\mathbf{r}}(s)) ds</math>

where <math>k(s)</math> is the convolution [[Kernel (image processing)|kernel]], <math>N(\mathbf{r})</math> is the noise image, and <math>L</math> is the length of field [[line segment]] that is followed.
 
<math>D(\mathbf{r})</math> 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 methods for ordinary differential equations|numerical method for solving ordinary differential equations]], like a [[Runge–Kutta methods|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 <math>\Omega</math> (like the vector length) is used to determine the hue, while the grayscale LIC output determines the [[Lightness|brightness]].
 
Different choices of convolution kernels and random noise produce different textures; for example, [[pink noise]] 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.<ref name="Weiskopf 2009">{{cite book |last1=Weiskopf |first1=Daniel |chapter-url=https://scholar.archive.org/detailswork/mathematicalfoun00mllet3e74cfmmjg6zcotlqqzy5dihq |title=Mathematical Foundations of Scientific Visualization, Computer Graphics, and Massive Data Exploration |publisher=[[Springer Science+Business Media|Springer]] |year=2009 |isbn=978-3-540-25076-0 |editor1-last=Möller |editor1-first=Torsten |series=Mathematics and Visualization |___location=Berlin, New York |pages=[https://archive.org/details/mathematicalfoun00mlle/page/n195 191]–211191–211 |chapter=Iterative Twofold Line Integral Convolution for Texture-Based Vector Field Visualization |citeseerx=10.1.1.66.3013 |doi=10.1007/b106657_10 |editor2-last=Hamann |editor2-first=Bernd |editor3-last=Russell |editor3-first=Robert D. |url-access=limited |url-status=dead}}</ref>
 
===Programming description===
Line 53 ⟶ 59:
[[File:Animated LIC.svg|thumb|Illustration of how LIC is animated.<br/>Top: normal [[box filter]] (average).<br/>Middle: sinusoidal filter at <math>t</math>.<br/>Bottom: sinusoidal filter at <math>t + \delta t</math>.]]
 
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]] multiplied by a [[Hann function]] 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)===
Line 61 ⟶ 67:
Because LIC does not encode flow orientation, it cannot distinguish between streamlines of equal direction but opposite orientation.<ref name=":1" /> Oriented Line Integral Convolution (OLIC) solves this issue by using a ramp-like asymmetric kernel and a low-density noise texture.<ref name=":1" /> 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.<ref name=":1">{{Cite journalbook |lastlast1=Wegenkittl |firstfirst1=Rainer |last2=Gröller |first2=Eduard |date=24 October 1997 |titlechapter=Fast Orientedoriented Lineline Integralintegral Convolutionconvolution for Vectorvector Fieldfield Visualizationvisualization via the Internet |date=24 October 1997 |title=Proceedings. Visualization '97 (Cat. No. 97CB36155) |chapter-url=https://www.cg.tuwien.ac.at/research/vis/dynsys/frolic/frolic_crc.pdf |journalpages=IEEE309–316 |doi=10.1109/VISUAL.1997.663897|isbn=0-8186-8262-0 }}</ref><ref>[https://www.cg.tuwien.ac.at/research/vis/dynsys/frolic/ Java Exploration Tool for Dynamical Systems by R. Wegenkittl and E. Gröller.]</ref>
 
=== Unsteady Flow LIC (UFLIC) ===
Line 84 ⟶ 90:
Artistic effects for image generation and stylization:
 
* pencil drawing<ref>[https://www.researchgate.net/publication/228663813%20Efficient%20Region228663813_Efficient_Region-Based%20Pencil%20DrawingBased_Pencil_Drawing researchgate publication: Sun, Shuo & Huang, Dongwei. (2022). Efficient Region-Based Pencil Drawing. ] </ref> (automatic pencil drawing generation technique using LIC pencil filter<ref>[https://ieeexplore.ieee.org/document/1323994?arnumber=1323994 S. Yamamoto, Xiaoyang Mo and A. Imamiya, "Enhanced LIC pencil filter," Proceedings. International Conference on Computer Graphics, Imaging and Visualization, 2004. CGIV 2004., 2004, pp. 251-256, doi: 10.1109/CGIV.2004.1323994.]</ref>)
* automatic generation of hair textures<ref>[https://ieeexplore.ieee.org/document/859772?arnumber=859772 Xiaoyang Mao, M. Kikukawa, K. Kashio and A. Imamiya, "Automatic generation of hair texture with line integral convolution," 2000 IEEE Conference on Information Visualization. An International Conference on Computer Visualization and Graphics, 2000, pp. 303-308, doi: 10.1109/IV.2000.859772.]</ref>
* creating marbling texture<ref>[https://dl.acm.org/doi/10.1145/604471.604489 Xiaoyang Mao, Toshikazu Suzuki, and Atsumi Imamiya. 2003. AtelierM: a physically based interactive system for creating traditional marbling textures. In Proceedings of the 1st international conference on Computer graphics and interactive techniques in Australasia and South East Asia (GRAPHITE '03). Association for Computing Machinery, New York, NY, USA, 79–ff. https://doi.org/10.1145/604471.604489]</ref>