Line Integral Convolution
The Line Integral Convolution (LIC) is an algorithm used to image a vector field. Its main advantage is to show in intricate detail the fine structure of the vector field. It does not display the direction or magnitude of the vectors, although this information can be color coded in a postprocessing step.
The result of course depends on the shape of the kernel and the length
of the streamline. If it is too small, the texture is not sufficiently
filtered and the motion is not clear. If it is too large, the image is
smoothed and details of the motion are lost. For an image of size
(256, 256), a value of 20 provides acceptable results.
Install
If you want to install LIC you can clone the repo and run.
pip install -e .
or install from pypi
pip install licplot
Usage
The basic usage is shown in and a runnable example can be found under examples/lic_demo.py
from lic import lic_internal
import numpy as np
import matplotlib.pyplot as plt
# create vector field and kernel
size = 500
u = np.zeros((size, size), dtype=np.float32)
v = np.zeros((size, size), dtype=np.float32)
texture = np.random.rand(size, size).astype(np.float32)
# create a kernel
kernel_length = 31
kernel = np.sin(np.arange(kernel_length) * np.pi / kernel_length).astype(np.float32)
# compute the lic
image = lic_internal.line_integral_convolution(u, v, texture, kernel)
plt.imshow(image, cmap="hot")
plt.show()
Forked from https://github.com/aarchiba/scikits-vectorplot
by Anne Archibald
Metadata
Release files for licplot 1.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| licplot-1.0.5.tar.gz | 47.6 kB | Without provenance | Details for licplot-1.0.5.tar.gz |
Release files / licplot-1.0.5.tar.gz
| Download URL | licplot-1.0.5.tar.gz |
|---|---|
| Size | 47.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
69568cffa176137b601b99097c9f5605c8909263fd5cc58964853fb264790578
|
|
BLAKE2b-256 checksum How to use checksums |
2441a770722cac399aae387773ec21043abf5483933183136bec685b088ff094
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0.post20201207 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.5
|
Security for licplot 1.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.