Skip to main content

Interface: VectorFieldBaseOptions

Defined in: mobjects/graphing/VectorField.ts:27

Base options for all vector field types

Extended by

Properties

color?

optional color: string | ColorFunction

Defined in: mobjects/graphing/VectorField.ts:37

Color function or static color. Default: magnitude-based gradient


func

func: VectorFunction

Defined in: mobjects/graphing/VectorField.ts:29

The vector function mapping (x, y) to [vx, vy]


lengthScale?

optional lengthScale: number

Defined in: mobjects/graphing/VectorField.ts:35

Length scaling factor for vectors. Default: 1


maxMagnitude?

optional maxMagnitude: number

Defined in: mobjects/graphing/VectorField.ts:41

Maximum magnitude threshold (vectors are capped). Default: Infinity


minMagnitude?

optional minMagnitude: number

Defined in: mobjects/graphing/VectorField.ts:39

Minimum magnitude threshold (vectors smaller are not drawn). Default: 0


opacity?

optional opacity: number

Defined in: mobjects/graphing/VectorField.ts:45

Opacity. Default: 1


strokeWidth?

optional strokeWidth: number

Defined in: mobjects/graphing/VectorField.ts:43

Stroke width. Default: DEFAULT_STROKE_WIDTH / 2


xRange?

optional xRange: [number, number, number]

Defined in: mobjects/graphing/VectorField.ts:31

X range as [min, max, step]. Default: [-5, 5, 0.5]


yRange?

optional yRange: [number, number, number]

Defined in: mobjects/graphing/VectorField.ts:33

Y range as [min, max, step]. Default: [-3, 3, 0.5]