# Fractals/Mathematics/Vector field

< Fractals

Jump to navigation
Jump to search
Vector field^{[1]}

Here mainly numerical methods for time independent 2D vector fields are described.

## Contents

# Field types[edit]

- time independent (= stationary = Steady ) or time dependent ( unsteady flow)
- dimension: 2D, 3D, ...
- mesh ( grid) type
- scalar function
- potential

- vector function
- equation ( for symbolic computations) - ODE
- numerical values ( for numerical computations)

- field line integration method (scheme):
^{[2]}- Euler
- RK4

# Algorithm[edit]

- start with
- plane (parameter plane or dynamic plane)
- scalar function
- vector function

- create scalar field using scalar function ( potential)
- create vector field from scalar field using vector function ( gradient of the potential)
- compute:
- filed lines ( stream lines )
- contour lines ( equipotential lines )
- map whole field using
- Line Integral Convolution (LIC)

## Field line integration method[edit]

### rk4[edit]

Fourth-order Runge-Kutta (RK4) in case of 2D time independent vector field

is a vector function that for each point p

p = (x, y)

in a domain assigns a vector v

where each of the functions is a scalar function:

A **field line** is a line that is everywhere tangent to a given vector field.

Let r(s) be a field line given by a system of ordinary differential equations, which written on vector form is:

where:

- s representing the arc length along the field line
- is a seed point

Given a **seed point** on the field line, the update rule ( RK4) to find the next point along the field line is^{[3]}

where:

- h is the step size
- k are the intermediate vectors:

# Visualisation of vector field[edit]

Plot types (Visualization Techniques for Flow Data) : ^{[4]}

- Glyphs = Icons or signs for visualizing vector fields
- simplest glyph = Line segment (hedgehog plots)
- arrow plot = quiver plot = Hedgehogs (global arrow plots)

- Characteristic Lines
^{[5]}- stremlines = curve everywhere tangential to the instantaneous vector (velocity) field (time independent vector field). For time independent vector field streaklines = Path lines = streak lines
^{[6]}

- stremlines = curve everywhere tangential to the instantaneous vector (velocity) field (time independent vector field). For time independent vector field streaklines = Path lines = streak lines
- texture (line integral convolution = LIC)
^{[7]} - Topological skeleton
^{[8]}- fixed point extraction ( Jacobian)

# Examples[edit]

## Potential of Mandelbrot set[edit]

# Programs[edit]

- CGAL - 2D_Placement_of_Streamlines by Abdelkrim Mebarki
- Python
- Matplotlib (python library ):
- VectorFieldPlot , images created with VectorFieldPlot

- OpenProcessing
- G'MIC - display_quiver
- OpenCV
- dsp.stackexchange: how-to-detect-gradients-in-images - Histogram of Oriented Gradients ( HOG )
- arrowed line

- Maxima CAS
- plotdf ( for ODE)

# Dictionary[edit]

- vector function is a function that gives vector as an output
- field : space (plane, sphere, ... )
- field line is a line that is everywhere tangent to a given vector field
- scalar/ vector / tensor:
- Scalars are real numbers used in linear algebra. Scalar is a tensor of zero order
- Vector is a tensor of first order. Vector is an extension of scalar
- tensor is an extension of vector

## Vector[edit]

Forms of 2D vector:^{[9]}

- [z1] ( only one complex number when first point is known , for example z0 is origin
- [z0, z1] = two complex numbers
- 4 scalars ( real numbers)
- [x, y, dx , dy]
- [x0, y0, x1, y1]
- [x, y, angle, magnitude]

- 2 scalars : [x1, y1] for second complex number when first point is known , for example z0 is origin

# Examples[edit]

- LIC

## Shadertoy[edit]

- arrows = quiver plot
- Line Integral Convolution (LIC)
- 3D vector field

## Videos[edit]

- by Chris Thomasson
- Numerical Approximations of Gradients from Deeplearning.ai

# See also[edit]

# References[edit]

- ↑ Vector field in wikipedia
- ↑ Numerical Methods for Particle Tracing in Vector Fields by Kenneth I. Joy
- ↑ Classification and visualisation of critical points in 3d vector fields. Master thesis by Furuheim and Aasen
- ↑ Flow Visualisation from TUV
- ↑ Data visualisation by Tomáš Fabián
- ↑ A Streakline Representation of Flow in Crowded Scenes from UCF
- ↑ lic by Zhanping Liu
- ↑ Vector Field Topology in Flow Analysis and Visualization by Guoning Chen
- ↑ Euclidian vector in wikipedia