Element: VectorField.

Icon: 

Text: A field of vectors.

Description: A VectorField is a drawing element that displays a vector field defined in a region of the plane or of the space. For this, it draws a given number of vectors of the field. The element automatically colors these vectors according to the values (between a minimum and a maximum) of one of the components of the field.

Table of properties

Name Description Values accepted
Configuration
Data The array with the data for the vector field. Vector field in the plane: A three-dimensional array [m][n][5] of type double, where m and n indicate (usually) the number of vectors in the X and Y axes, respectively. Each element array[i][j] actually represents a vector. The five components of this vector are: 
  • [0] the X component of its position, 
  • [1] the Y component of its position,
  • [2] the X component of its size,
  • [3] the Y component of its size,
  • [4] a value used to determine the color of the vector (the modulus of the vector is the value commonly used).

Vector field in the space: A four-dimensional array [m][n][p][7] of type double, where m, n and p indicate (usually) the number of vectors in the X, Y, and Z axes, respectively. Each element array[i][j][k] actually represents a vector. The seven components of this vector are:

  • [0] the X component of its position, 
  • [1] the Y component of its position,
  • [2] the Z component of its position,
  • [3] the X component of its size,
  • [4] the Y component of its size,
  • [5] the Z component of its size,
  • [6] a value used to determine the color of the vector (the modulus of the vector is the value commonly used).
Autoscale Whether to automatically compute the extrema of the last component of the vectors. A boolean variable or one of the constants true or false.
Minimum The smallest value of the last component of the vectors that will be translated into a color in the scale (Autoscale must be false). Any constant or variable of type double or int.
Maximum The largest value of the last component of the vectors that will be translated into a color in the scale (Autoscale must be false). Any constant or variable of type double or int.
Graphical Aspect
Levels Number of different color to use in the range [Minimum, Maximum]. The colors are computed interpolating between the values for the next two properties. Any constant or variable of type int.
Min Color The color to assign to the minimum value of the last component of the vectors. An Object variable of the class java.awt.Color or one of the predefined colors: black, blue, cyan, darkGray, gray, green, lightGray, magenta, orange, pink, red, white, yellow.

A color can also be specified providing its integer RGB coordinates (between 0 and 255), plus an optional transparency coordinate.

The default value is decided by the system.

Max Color The color to assign to the maximum value of the last component of the vectors. See the values for the Min Color property.
Invis Level A minimum level so that vectors with a smaller or equal value of the last component will not be drawn.
This can be useful to improve the display of vector fields with many small values.
Cualquier constante o variable de tipo double o int.
Zoom A scale factor to apply to the vectors displayed. Cualquier constante o variable de tipo double o int.
Visible The visibility of the element. A boolean variable or one of the constants true or false.