({{, (RefLink[ListLineIntegralConvolutionPlot, paclet:ref/ListLineIntegralConvolutionPlot])[{array,image}] 
generates a line integral convolution plot of image convolved with the vector field defined by an array of vector field values.}, {, (RefLink[ListLineIntegralConvolutionPlot, paclet:ref/ListLineIntegralConvolutionPlot])[array]
generates a line integral convolution plot of white noise convolved with the vector field defined by array.}, {, (RefLink[ListLineIntegralConvolutionPlot, paclet:ref/ListLineIntegralConvolutionPlot])[{{{{(Subscript[x, 1]),(Subscript[y, 1])},{(Subscript[vx, 1]),(Subscript[vy, 1])}},…},image}]
generates a line integral convolution plot of image convolved with the vector field defined by vectors {(Subscript[vx, i]),(Subscript[vy, i])} at specified points {(Subscript[x, i]),(Subscript[y, i])}.}, {, (RefLink[ListLineIntegralConvolutionPlot, paclet:ref/ListLineIntegralConvolutionPlot])[{{{(Subscript[x, 1]),(Subscript[y, 1])},{(Subscript[vx, 1]),(Subscript[vy, 1])}},…}]
generates a line integral convolution plot of white noise convolved with the vector field defined by {(Subscript[vx, i]),(Subscript[vy, i])}.}})

OpenersNotesSection(Spacer1)Details and Options

(RefLink[LineIntegralConvolutionPlot, paclet:ref/LineIntegralConvolutionPlot]) creates a rasterized version of image, then does a line integral convolution of each pixel according to the field defined by interpolating the vector data given.

(RefLink[ListLineIntegralConvolutionPlot, paclet:ref/ListLineIntegralConvolutionPlot]) has the same options as (RefLink[Graphics, paclet:ref/Graphics]), with the following additions and changes:

If image is not specified, or is not already rasterized, a raster is created with a size specified by the (RefLink[RasterSize, paclet:ref/RasterSize]) option.

With a setting other than (RefLink[LightingAngle, paclet:ref/LightingAngle])->(RefLink[None, paclet:ref/None]), simulated lighting is used, with the height at each point being taken to be determined from the norm of the vector field.

The arguments supplied to (RefLink[ColorFunction, paclet:ref/ColorFunction]) are x, y, (Subscript[v, x]), (Subscript[v, y]), (RefLink[Norm, paclet:ref/Norm])[{(Subscript[v, x]),(Subscript[v, y])}].

OpenersPrimaryExamplesSection(Spacer1)Examples  (65)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Plot a line integral convolution of a vector field interpolated from a specified set of vectors:

data=Table[{-1-x^2+y,1+x-y^2},{x,-3,3,.2},{y,-3,3,.2}];

ListLineIntegralConvolutionPlot[data]

Plot the line integral convolution from data specifying coordinates and vectors:

data = Table[{{x,y},{y,x-x^2}},{x,-1.5,1.5,0.2},{y,-2,2,0.2}];

ListLineIntegralConvolutionPlot[data]

OpenersExampleSection1(Spacer1)Scope  (10)

OpenersExampleSubsection0(Spacer1)Sampling  (6)

Plot a field image for a regular collection of vectors, and give a data range for the domain:

data=Table[{-1-x^2+y,1+x-y^2},{x,-3,3,.2},{y,-3,3,.2}];

ListLineIntegralConvolutionPlot[data,DataRange->{{-3,3},{-3,3}}]

Plot a field image for an irregular collection of vectors:

data=Table[{{x,y}=RandomReal[{-3,3},2],{-1-x^2+y,1+x-y^2}},{200}];

ListLineIntegralConvolutionPlot[data]

Convolve an image with a regular collection of vectors:

image=Image[255 {BoxMatrix[20,100],BoxMatrix[30,100],BoxMatrix[40,100]},"Byte",ColorSpace->"RGB",Interleaving->False]

data=Table[{-1-x^2+y,1+x-y^2},{x,-3,3,.2},{y,-3,3,.2}];

ListLineIntegralConvolutionPlot[{data,image
},RasterSize->250,LineIntegralConvolutionScale->25]

Use an image directly as input:

data=Table[{x,y},{x,-3,3,.2},{y,-3,3,.2}];

ListLineIntegralConvolutionPlot[{data,}]

Convolve an image with an irregular collection of vectors:

data=Table[{{x,y}=RandomReal[{-3,3},2],{-1-x^2+y,1+x-y^2}},{200}];

ListLineIntegralConvolutionPlot[{data,}]

Use an image created from a sparse matrix:

s = Image[Normal[1-SparseArray[{{i_,i_}->1,RandomInteger[{1,99},{1000,2}]->  ConstantArray[1,1000]}]]]

data=Table[{y,x-x^3},{x,-3,3,.2},{y,-3,3,.2}];

ListLineIntegralConvolutionPlot[{data,s},LineIntegralConvolutionScale->1]

OpenersExampleSubsection1(Spacer1)Presentation  (4)

Plot a field image with overlaid streamlines:

data=Table[{{x,y}=RandomReal[{-3,3},2],{-1-x^2+y,1+x-y^2}},{200}];

ListLineIntegralConvolutionPlot[data,StreamPoints->15,StreamStyle->LightBlue]

Plot with overlaid field vectors:

ListLineIntegralConvolutionPlot[data,VectorStyle->Orange,VectorScale->Large,VectorPoints->10]

Plot all the specified vectors in the data:

data=Table[{{x,y}=RandomReal[{-3,3},2],{-1-x^2+y,1+x-y^2}},{200}];

ListLineIntegralConvolutionPlot[data,VectorPoints->All,VectorStyle->LightBlue,VectorScale->Large]

Color the field magnitude:

data=Table[{-1-x^2+y,1+x-y^2},{x,-3,3,.2},{y,-3,3,.2}];

Table[ListLineIntegralConvolutionPlot[data,PlotLabel->c,ColorFunction->c],{c,{Hue,"Pastel"}}]

Specify a color function that blends two colors by the x coordinate:

data=Table[{-1-x^2+y,1+x-y^2},{x,-3,3,.2},{y,-3,3,.2}];

ListLineIntegralConvolutionPlot[data,ColorFunction->Function[{x,y,vx,vy,n},Blend[{Green,Red},x]]]

OpenersExampleSection2(Spacer1)Options  (47)

OpenersExampleSubsection2(Spacer1)AspectRatio  (2)

By default, the aspect ratio is 1:

ListLineIntegralConvolutionPlot[Table[{-1-x^2+y,1+x-y^2},{x,-2,2},{y,-3,3}],AspectRatio->1]

Set the aspect ratio:

data=Table[{-1-x^2+y,1+x-y^2},{x,-2,2},{y,-3,3}];

Table[ListLineIntegralConvolutionPlot[data,PlotLabel->a,AspectRatio->a],{a,{Automatic,Full,GoldenRatio}}]

OpenersExampleSubsection3(Spacer1)Background  (1)

Use colored backgrounds:

ListLineIntegralConvolutionPlot[Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}],VectorStyle->Yellow,FrameStyle->LightGray,Background->Gray]

OpenersExampleSubsection4(Spacer1)ColorFunction  (5)

Color the field magnitude using (RefLink[Hue, paclet:ref/Hue]):

ListLineIntegralConvolutionPlot[Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}],ColorFunction->Hue]

Use any named color gradient from (RefLink[ColorData, paclet:ref/ColorData]):

ListLineIntegralConvolutionPlot[Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}],ColorFunction->"Pastel"]

Use (RefLink[ColorData, paclet:ref/ColorData]) for predefined color gradients:

ListLineIntegralConvolutionPlot[Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}],ColorFunction->Function[{x,y,vx,vy,n},ColorData["SolarColors"][x y]]]

Specify a color function that blends two colors by the x coordinate:

ListLineIntegralConvolutionPlot[Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}],ColorFunction->Function[{x,y,vx,vy,n},Blend[{Green,Red},x]]]

Use (RefLink[ColorFunctionScaling, paclet:ref/ColorFunctionScaling])->(RefLink[False, paclet:ref/False]) to get unscaled values:

data=Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}];

ListLineIntegralConvolutionPlot[data,ColorFunctionScaling->False,ColorFunction->Function[{x,y,vx,vy,n},ColorData[22][Round[n]]]]

OpenersExampleSubsection5(Spacer1)ColorFunctionScaling  (4)

By default, scaled values are used:

ListLineIntegralConvolutionPlot[Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}],ColorFunction->GrayLevel]

Use (RefLink[ColorFunctionScaling, paclet:ref/ColorFunctionScaling])->(RefLink[False, paclet:ref/False]) to get unscaled values:

data=Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}];

ListLineIntegralConvolutionPlot[data,ColorFunctionScaling->False,ColorFunction->Function[{x,y,vx,vy,n},ColorData[22][Round[n]]]]

Use unscaled coordinates in the x direction and scaled coordinates in the y direction:

data=Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}];

ListLineIntegralConvolutionPlot[data,ColorFunctionScaling->{False,True},ColorFunction->Function[{x,y,vx,vy,n},Hue[x,y,1]]]

Explicitly specify the scaling for each color function argument:

data=Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}];

ListLineIntegralConvolutionPlot[data,ColorFunctionScaling->{True,True,True,True,False},ColorFunction->Function[{x,y,vx,vy,n},Hue[n,y,1]]]

OpenersExampleSubsection6(Spacer1)DataRange  (1)

By default, the data range is taken to be the index range of the data array:

data=Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}];
Dimensions[data]

ListLineIntegralConvolutionPlot[data]

Specify the data range for the domain:

ListLineIntegralConvolutionPlot[data,DataRange->{{-3,3},{-3,3}}]

OpenersExampleSubsection7(Spacer1)EvaluationMonitor  (1)

Count the number of times the vector field function is evaluated:

data=Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}];

Block[{k=0},ListLineIntegralConvolutionPlot[data,EvaluationMonitor:>k++];k]

OpenersExampleSubsection8(Spacer1)Frame  (1)

Toggle the frame around the plot:

data=Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}];

Table[ListLineIntegralConvolutionPlot[data,PlotLabel->f,Frame->f],{f,{True,False}}]

OpenersExampleSubsection9(Spacer1)FrameLabel  (1)

Label the axes:

ListLineIntegralConvolutionPlot[Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}],FrameLabel->{x,y}]

OpenersExampleSubsection10(Spacer1)FrameTicks  (8)

Place frame tick marks and labels automatically:

ListLineIntegralConvolutionPlot[Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}],FrameTicks->Automatic]

Put a frame, but no ticks:

ListLineIntegralConvolutionPlot[Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}],FrameTicks->None]

Place frame ticks and labels on all the edges:

ListLineIntegralConvolutionPlot[Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}],FrameTicks->All]

Place frame ticks on the right and top edges:

ListLineIntegralConvolutionPlot[Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}],FrameTicks->{{None,All},{None,All}}]

Place frame tick marks at the specified positions:

data=Table[{-1-x^2+y,1+x-y^2},{x,-π,π},{y,-π,π}];

ListLineIntegralConvolutionPlot[data,DataRange->{{-π,π},{-π,π}},FrameTicks->{{Table[k,{k,-π,π,π/2}],None},{Table[k,{k,-π,π,π/4}],None}}]

Draw frame ticks at the specified positions with the specific labels:

data=Table[{-1-x^2+y,1+x-y^2},{x,-π,π},{y,-π,π}];

ListLineIntegralConvolutionPlot[data,DataRange->{{-π,π},{-π,π}},FrameTicks->{{{-π,-180°},{-π/2,-90°},{0,0°},{π/2,90°},{π,180°}},None}]

Specify the style of each frame tick:

data=Table[{-1-x^2+y,1+x-y^2},{x,-π,π},{y,-π,π}];

ListLineIntegralConvolutionPlot[data,DataRange->{{-π,π},{-π,π}},FrameTicks->{{{π/2,90°,{.4,.05},Red},{-π/2,-90°,{.4,.05},Thick},{0,0°,{.4,.05},Directive[Red,Dashed]}},None}]

Specify overall frame ticks style, including frame tick labels, using (RefLink[FrameTicksStyle, paclet:ref/FrameTicksStyle]):

ListLineIntegralConvolutionPlot[Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}],FrameTicksStyle->Directive[Orange,12]]

OpenersExampleSubsection11(Spacer1)LineIntegralConvolutionScale  (2)

An automatic scale is used by default:

ListLineIntegralConvolutionPlot[Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}],LineIntegralConvolutionScale->Automatic]

Use a specific scale:

data=Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}];

Table[ListLineIntegralConvolutionPlot[data,PlotLabel->s,LineIntegralConvolutionScale->s],{s,{0.3,1.0,3}}]

OpenersExampleSubsection12(Spacer1)PerformanceGoal  (2)

Generate a higher-quality plot:

ListLineIntegralConvolutionPlot[Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}],PerformanceGoal->"Quality"]

Emphasize performance, possibly at the cost of quality:

ListLineIntegralConvolutionPlot[Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}],PerformanceGoal->"Speed"]

OpenersExampleSubsection13(Spacer1)PlotLegends  (1)

Add a color bar legend for the convolution:

data=Table[{-1-x^2+y,1+x-y^2},{x,-3,3,.2},{y,-3,3,.2}];

ListLineIntegralConvolutionPlot[data,PlotLegends->Automatic]

Place the legend below the plot:

ListLineIntegralConvolutionPlot[data,PlotLegends->Placed[Automatic,Below]]

Use (RefLink[BarLegend, paclet:ref/BarLegend]) to modify the legend:

ListLineIntegralConvolutionPlot[data,PlotLegends->BarLegend[Automatic,LegendFunction->Frame]]

OpenersExampleSubsection14(Spacer1)PlotRange  (8)

The full plot range is used by default:

ListLineIntegralConvolutionPlot[Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}],PlotRange->Full]

Specify an explicit limit for both x and y ranges:

ListLineIntegralConvolutionPlot[Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}],DataRange->{{-3,3},{-3,3}},PlotRange->2]

Specify an explicit range that applies to both x and y ranges:

ListLineIntegralConvolutionPlot[Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}],DataRange->{{-3,3},{-3,3}},PlotRange->{-1,2.5}]

Specify an explicit x range:

ListLineIntegralConvolutionPlot[Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}],DataRange->{{-3,3},{-3,3}},PlotRange->{{-1,2}}]

Specify an explicit x minimum range:

ListLineIntegralConvolutionPlot[Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}],DataRange->{{-3,3},{-3,3}},PlotRange->{{0,Full}}]

Specify an explicit y range:

ListLineIntegralConvolutionPlot[Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}],DataRange->{{-3,3},{-3,3}},PlotRange->{Full,{0,2}}]

Specify an explicit y maximum range:

ListLineIntegralConvolutionPlot[Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}],DataRange->{{-3,3},{-3,3}},PlotRange->{Full,{Full,5}}]

Specify different x and y ranges:

ListLineIntegralConvolutionPlot[Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}],DataRange->{{-3,3},{-3,3}},PlotRange->{{-2,1.5},{-1,2}}]

OpenersExampleSubsection15(Spacer1)PlotRangePadding  (6)

Padding is computed automatically by default:

ListLineIntegralConvolutionPlot[Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}],PlotRangePadding->Automatic]

Specify no padding for all x, y, and z ranges:

ListLineIntegralConvolutionPlot[Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}],PlotRangePadding->None]

Specify an explicit padding for all x, y, and z ranges:

ListLineIntegralConvolutionPlot[Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}],DataRange->{{-3,3},{-3,3}},PlotRangePadding->0.5]

Add 10% padding to all x, y, and z ranges:

ListLineIntegralConvolutionPlot[Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}],DataRange->{{-3,3},{-3,3}},PlotRangePadding->Scaled[0.1]]

Specify different padding for x and y ranges:

ListLineIntegralConvolutionPlot[Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}],DataRange->{{-3,3},{-3,3}},PlotRangePadding->{1,0.5}]

Specify padding for the y range:

ListLineIntegralConvolutionPlot[Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}],DataRange->{{-3,3},{-3,3}},PlotRangePadding->{Automatic,1.5}]

OpenersExampleSubsection16(Spacer1)PlotTheme  (2)

Use a monochrome theme for the plot:

data=Table[{-1-x^2+y,1+x-y^2},{x,-3,3,.2},{y,-3,3,.2}];

ListLineIntegralConvolutionPlot[data,PlotTheme->"Monochrome"]

Use a theme with minimal styling:

data=Table[{-1-x^2+y,1+x-y^2},{x,-3,3,.2},{y,-3,3,.2}];

ListLineIntegralConvolutionPlot[data,PlotTheme->"Minimal"]

OpenersExampleSubsection17(Spacer1)RasterSize  (2)

By default an automatic raster size is used:

ListLineIntegralConvolutionPlot[Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}],RasterSize->Automatic]

Set a specific raster size:

data=Table[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}];

Table[ListLineIntegralConvolutionPlot[data,RasterSize->r],{r,{100,200,300}}]

OpenersExampleSection3(Spacer1)Applications  (2)

Use a line integral convolution plot as a background for an interactive demo:

lic=ListLineIntegralConvolutionPlot[Table[{y,-Sin[x]-y/2},{x,-4,4},{y,-3,3}],DataRange->{{-4,4},{-3,3}}];

Manipulate[Module[{sol, x,y,t},
sol = First[NDSolve[{x''[t] + x'[t]/2+Sin[x[t]]==0,Thread[{x[0],x'[0]}==point]},x,{t,0,10}]];
Show[lic, ParametricPlot[Evaluate[{x[t],x'[t]} /. sol],{t,0,10}, PlotStyle->Pink],PlotRange->{{-4,4},{-3,3}}]],{{point,{1,1}},Locator},SaveDefinitions->True]

Display characteristics of several different types of linear planar systems:

lmsp={(({{1, 0}, {0, 2}})),(({{1, 1}, {0, 1}})),(({{0, 1}, {-1, 1}})),(({{0, 1}, {-1, 0}})),(({{1, 0}, {0, -2}}))};
names = Map[Text, {"Nodal source", "Degenerate source", "Spiral source","Center","Saddle"}];
cases=Transpose[{lmsp,names}];

TabView[ParallelTable[MatrixForm[First[m]]->ListLineIntegralConvolutionPlot[Table[Evaluate[First[m].{x,y}],{x,-1,1},{y,-1,1}],PlotLabel->Last[m]],{m,cases}]]

OpenersExampleSection4(Spacer1)Properties & Relations  (4)

Use (RefLink[LineIntegralConvolutionPlot, paclet:ref/LineIntegralConvolutionPlot]) to plot functions:

LineIntegralConvolutionPlot[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3}]

Other alternatives for visualizing vector field data:

data=Table[{y,-x},{x,-3,3,0.2},{y,-3,3,0.2}];

Table[f[data,PlotLabel->f],{f,{ListVectorPlot,ListVectorDensityPlot,ListStreamPlot,ListStreamDensityPlot}}]

Other alternatives for visualizing vector field functions:

Table[f[{-1-x^2+y,1+x-y^2},{x,-3,3},{y,-3,3},PlotLabel->f],{f,{VectorPlot,VectorDensityPlot,StreamPlot,StreamDensityPlot}}]

Use (RefLink[VectorPlot3D, paclet:ref/VectorPlot3D]) to visualize 3D vector fields:

VectorPlot3D[{x,y,z},{x,-1,1},{y,-1,1},{z,-1,1}]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[LineIntegralConvolutionPlot, paclet:ref/LineIntegralConvolutionPlot])  ▪  (RefLink[ListStreamPlot, paclet:ref/ListStreamPlot])  ▪  (RefLink[ListVectorPlot, paclet:ref/ListVectorPlot])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Vector Visualization, paclet:guide/VectorVisualization])}})}})