pmesh.lic module¶
-
pmesh.lic.
lic
(vectors, kernel, length, ds, resampler=None, texture=None, normalize=True)[source]¶ Line Intergral Convolution for visualizing vector fields.
The vectors must be normalized to norm of 1.0 for LIC to give a reasonable image.
The image looks bad if the vectors are noisy.
Parameters: - vectors : list of RealField
vx, vy, vz, … must be normalized.
- kernel : function kernel(s)
the line integral kernel function. s is the line coordinate variable between -1 and 1.
- length : float
the length of the line, in pixels.
- ds : float
step size in the line integration. in pixels.
- resampler: string, ResamplerWindow
the resampler window. See pmesh.window module for a full list. if None, use pm’s default sampler, pm.resampler, where pm is infered from the first vector.
- texture : RealField, or None
the texture to use. If None, a default gaussian texture is used.
- normalize : bool
True if normalize the vectors to 1.0
Returns: - lic : RealField
the integration result.