JavaView® v2.00.008

jvx.numeric
Class PnLIC

java.lang.Object
  |
  +--jvx.numeric.PnLIC

public class PnLIC
extends java.lang.Object

Line Integral Convolution for vector field visualization.

Version:
09.03.00, 1.06 revised (ep) bug-fixes.
20.02.00, 1.05 revised (ep) corrected "integralh-bug".
04.01.00, 1.04 revised (ep)
22.12.99, 1.03 revised (ep)
11.12.99, 1.02 revised (ep) adaptive kernelwidth

Field Summary
protected  double m_coarseness
          Control of the noise.
protected  PgElementSet m_geom
          the geometry
protected  int m_height
          Height of the texture in pixels.
protected  double m_integralh
          Stepsize of the integration method.
protected  int m_kernelwidth
          Normal width of the convolution kernel.
protected  int m_maxhits
          After the m_maxhits'th time the streamline hits a pixel that was hit by other lines more than m_maxhits times, the convolution of this streamline stops.
protected  int m_minKernel
          Kernelwidth for velocity near zero.
protected  PnNoise m_noise
          Procedural noise.
protected  int[] m_pix
          Texture pixel array.
protected  PnGeodesicRK m_rk
          Runge-kutta class.
protected  double m_steplen
          Step from one pixel to the next.
protected  PdVector[][] m_texCoords
          Texture coordinates buffer.
protected  int m_width
          Width of the texture in pixels.
 
Constructor Summary
PnLIC(PgElementSet geom, int size, double time, PnGeodesicRK rk)
          Creates a new LIC processor.
 
Method Summary
protected  int getOutline(PdVector[] elemTex, int width, int height, PiVector xc, PiVector yc)
          Calculates outline of triangle texture coordinates in texture pixels by line scanning.
 void getPixArray(int[] pix)
          Puts actual LIC texture line by line into alphaRGB pixel array.
 void makeElement(int elemIndex)
          Computes Line Integral Convolution texture along all integral lines that begin within given element.
 void makeLIC()
          Computes LIC texture for all elements of geometry.
 boolean setCoarseness(double coarse)
          Sets the coarseness of noise.
 boolean setConvolutionWidth(int numPixels)
          Sets normal (one-velocity) convolution width along integral lines.
 boolean setMinConvolutionWidth(int numPixels)
           
 void setStepSize(double h)
          Sets the stepsize of the runge-kutta integration method.
protected  double triangleElemTexCoords(PgElementSet geom)
          Calculates element texture coordinates for triangulation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_geom

protected PgElementSet m_geom
the geometry

m_maxhits

protected int m_maxhits
After the m_maxhits'th time the streamline hits a pixel that was hit by other lines more than m_maxhits times, the convolution of this streamline stops.

m_rk

protected PnGeodesicRK m_rk
Runge-kutta class.

m_integralh

protected double m_integralh
Stepsize of the integration method.

m_width

protected int m_width
Width of the texture in pixels.

m_height

protected int m_height
Height of the texture in pixels.

m_pix

protected int[] m_pix
Texture pixel array.

m_texCoords

protected PdVector[][] m_texCoords
Texture coordinates buffer.

m_steplen

protected double m_steplen
Step from one pixel to the next.

m_kernelwidth

protected int m_kernelwidth
Normal width of the convolution kernel.

m_minKernel

protected int m_minKernel
Kernelwidth for velocity near zero.

m_coarseness

protected double m_coarseness
Control of the noise.

m_noise

protected PnNoise m_noise
Procedural noise.
Constructor Detail

PnLIC

public PnLIC(PgElementSet geom,
             int size,
             double time,
             PnGeodesicRK rk)
Creates a new LIC processor.
Parameters:
geom - underlying geometry
size - width and height of the LIC-texture
time - not yet implemented
rk - geodesic runge-kutta method that contains the vector field that shall be visualized
See Also:
PnGeodesicRK
Method Detail

setCoarseness

public boolean setCoarseness(double coarse)
Sets the coarseness of noise.
Parameters:
coarse - ==0. fine; ==1. constant

setConvolutionWidth

public boolean setConvolutionWidth(int numPixels)
Sets normal (one-velocity) convolution width along integral lines.
Parameters:
numPixels - new width given in texture pixels

setMinConvolutionWidth

public boolean setMinConvolutionWidth(int numPixels)

setStepSize

public void setStepSize(double h)
Sets the stepsize of the runge-kutta integration method.
Parameters:
h - stepsize

makeElement

public void makeElement(int elemIndex)
Computes Line Integral Convolution texture along all integral lines that begin within given element. These integral lines may leave the element.
Parameters:
elemIndex - global element index in underlying geometry

getPixArray

public void getPixArray(int[] pix)
Puts actual LIC texture line by line into alphaRGB pixel array.
Parameters:
pix - output: actual LIC texture; should be of size LICSIZE*LICSIZE

makeLIC

public void makeLIC()
Computes LIC texture for all elements of geometry. Method getPixArray returns the texture image.
See Also:
getPixArray(int[])

triangleElemTexCoords

protected double triangleElemTexCoords(PgElementSet geom)
Calculates element texture coordinates for triangulation. Puts triangles in lines with longest edges at top.
Parameters:
geom - triangulation
Returns:
the scaling factor from worldcoords to texturecoords

getOutline

protected int getOutline(PdVector[] elemTex,
                         int width,
                         int height,
                         PiVector xc,
                         PiVector yc)
Calculates outline of triangle texture coordinates in texture pixels by line scanning. Line number j has points (xc[j],yc[j]), (xc[length-1-j],yc[j]).
Parameters:
elemTex - normalized texture coordinates of triangle
width - width of the texture image (pixel)
height - height of the texture image (pixel)
xc - output: x-coordinates of outline
yc - output: y-coordinates of outline
Returns:
length of coordinate arrays

JavaView® v2.00.008

The software JavaView® is copyright protected. All Rights Reserved.