Skip to content

adammaj1/LIC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 

Repository files navigation

ToDo:

  • sink_LIC.png
  • source_LIC.png
  • spiral_LIC.png

LIC

LIC (Line Integral Convolution) is a scientific visualization technique

  • based on
    • texture ( not like geometry-based approaches such as arrow plots, streamlines, pathlines, timelines, streaklines, particle tracing, surface particles, stream arrows, stream tubes, stream balls, flow volumes and topological analysis)
    • integration
  • a global method: all structural features of the vector field are displayed
  • it has high computational expense ( in comparisen to low computational expense of a geometry-based methods)
  • basic LIC image (grayscale without color and animation) conveys the orientation of the field vectors, but it does not indicate their direction, the length of the vectors (or the strength of the field)
  • good for identifying critical points

It can be applied to:

  • steady planar flow of fluids
  • a 2D static (= time independent) vector field

It shows:

  • Streamlines = field lines of the fluid flow
  • field lines of vector field

Elements

  • 2 inputs
    • vector field
    • white noise
  • one output ( LIC image)

First input:

  • strong wind or flow of the river
  • steady flow = A flow that is not a function of time = time independent flow (as described in fluid dynamics )
  • a 2D static (= time independent) vector field defined by a real-valued function F of two real variables x and y
  z = F(x,y)

Second input:

Output: LIC image

algorithm

code

Original repo : Basic LIC by Chang Sha

Here is it's c implementation of saddle-shaped field:

void SyntheszSaddle(int  n_xres,  int  n_yres,  float*  pVectr)
{
  int i,j; 
  for(j = 0;  j < n_yres;  j ++) // y
     for(i = 0;  i < n_xres;  i ++) // x
  	{ 
   		int  index = (  (n_yres - 1 - j) * n_xres + i  )  <<  1;
   		pVectr[index    ] = - ( j / (n_yres - 1.0f) - 0.5f ); // y
   		pVectr[index + 1] =     i / (n_xres - 1.0f) - 0.5f;   // x 
     	} 
}

See also

Vector field

Git

create a new repository on the command line

echo "# LIC" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin git@github.com:adammaj1/LIC.git
git push -u origin main

Local repo

~/Dokumenty/lic/basic_lic/ 

Subdirectory

mkdir png
git add *.png
git mv  *.png ./png
git commit -m "move"
git push -u origin main

then link the images:

![](./png/n.png "description") 

to overwrite

git mv -f 

Github