Giter VIP home page Giter VIP logo

vector-field-topolgy-2d's Introduction

Vector-Field-Topolgy-2D

Python version Matlab version

alt text alt text alt text

alt text alt text alt text

alt text

Vector field topology (VFT) [Ref. 1, 2] is an intuitive visualization technique of vector fields. It is a representation of the global topology based on an analysis of the critical points and their connections. For a complex vector field, it can be difficult to understand the field properties by plotting streamlines or field lines (quiver). By showing only the critical points and key integral lines connecting those points, the VFT technique produces a minimalistic intuitive representation of the field.

VFT methods have been used in many fields including fluid flow analysis, computer vision and photonics.

The algorithm was initially implemented in MATLAB. A python version has been added since. The two versions are not equivalent. The python implementation contains more upgraded algorithms for identifying the critical points.

Usage

Please cite the papers mentioned in the reference section and this github repository if you use the code for your research/work.

Sample output

Python version alt text

For a test vector filed ux = sin(X+Y)exp(-0.5X2 - 0.3Y2), uy = cos(X-Y)exp(-0.5X2 - 0.3Y2), the calculated vector field topology is shown below (with quiver lines and without quiver lines):

alt text alt text

The colors on the integral lines correspond to the magnitude of the field.

Matlab version alt text

For a test vector filed ux = -X2 + Y2, uy = X2 + Y2 - 2, the calculated vector field topology is shown below (with quiver lines and without quiver lines):

alt text alt text

Theory

Integral Lines

The integral lines follow the direction of the vector field, denoted here by u = [ux uy]T. For simplicity, we will assume that u is normalized. Let's consider a point on the integral line denoted by the coordinates (x0, y0). Considering the locus of the integral line is formed by a discrete set of points (x0, y0), (x1, y1), (x2, y2), ..., (xn, yn). Then,

x1 = x0 + ux(x0,y0) Δx

x2 = x1 + ux(x1,y1) Δx = x0 + ux(x0,y0) Δx + ux(x1,y1) Δx

. .

xn = x0 + ∑i=0n-1 ux(xi,yi) Δx

In the continuous limit, x = x0 + ∫ ux dx'

References

  1. J. Helman, and L. Hesselink. "Representation and display of vector field topology in fluid flow data sets." Computer, vol. 22, pp. 27-36, August 1989.
  2. J. Helman, and L. Hesselink. "Visualizing vector field topology in fluid flows." IEEE Computer Graphics and Applications, vol. 11, pp. 36-46, May/June 1991.

vector-field-topolgy-2d's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.