Abstract Class: ExpressionVectorField<ArrayType, GridType>
Defined in: RawField.ts:439
Extended by
Type Parameters
| Type Parameter |
|---|
ArrayType extends TypedArray |
GridType extends AutoZoomGrid |
Constructors
Constructor
new ExpressionVectorField<
ArrayType,GridType>(u,v,opts?):ExpressionVectorField<ArrayType,GridType>
Defined in: RawField.ts:444
Parameters
| Parameter | Type |
|---|---|
u | ExpressionScalarField<ArrayType, GridType> |
v | ExpressionScalarField<ArrayType, GridType> |
opts? | RawVectorFieldOptions |
Returns
ExpressionVectorField<ArrayType, GridType>
Properties
| Property | Modifier | Type | Defined in |
|---|---|---|---|
relative_to | readonly | VectorRelativeTo | RawField.ts:442 |
u | readonly | ExpressionScalarField<ArrayType, GridType> | RawField.ts:440 |
v | readonly | ExpressionScalarField<ArrayType, GridType> | RawField.ts:441 |
Methods
add()
add(
other):ComputedVectorField<ArrayType,GridType>
Defined in: RawField.ts:503
Add this vector field to another vector field. The addition occurs on the GPU if the resulting field is used in a plot component.
Parameters
| Parameter | Type | Description |
|---|---|---|
other | ExpressionVectorField<ArrayType, GridType> | Vector field to add. |
Returns
ComputedVectorField<ArrayType, GridType>
A ComputedVectorField representing the added vector field
divide()
divide(
other):ComputedVectorField<ArrayType,GridType>
Defined in: RawField.ts:494
Divide this vector field by a scalar. The division occurs on the GPU if the resulting field is used in a plot component.
Parameters
| Parameter | Type | Description |
|---|---|---|
other | number | ExpressionScalarField<ArrayType, GridType> | Scalar to divide by. Can be either a number or a scalar field. |
Returns
ComputedVectorField<ArrayType, GridType>
A ComputedVectorField representing the divided vector field
magnitude()
magnitude():
ComputedScalarField<ArrayType,GridType>
Defined in: RawField.ts:540
Get the magnitude of the vector field as a scalar field. The magnitude calculation occurs on the GPU if this field is used in a plot component.
Returns
ComputedScalarField<ArrayType, GridType>
A ComputedScalarField representing the subtracted vector field
multiply()
multiply(
other):ComputedVectorField<ArrayType,GridType>
Defined in: RawField.ts:485
Multiply this vector field by a scalar. The multiplication occurs on the GPU if the resulting field is used in a plot component.
Parameters
| Parameter | Type | Description |
|---|---|---|
other | number | ExpressionScalarField<ArrayType, GridType> | Scalar to multiply by. Can be either a number or a scalar field. |
Returns
ComputedVectorField<ArrayType, GridType>
A ComputedVectorField representing the multiplied vector field
sampleField()
sampleField(
lon,lat): [number,number]
Defined in: RawField.ts:564
Sample this field at a given latitude and longitude.
Parameters
| Parameter | Type | Description |
|---|---|---|
lon | number | Longitude of the sample in degrees east |
lat | number | Latitude of the sample in degrees north |
Returns
[number, number]
A tuple containing the [bearing, magnitude] of the vector field at the nearest grid point. The bearing is given as degrees from north, increasing clockwise.
If the point is outside the grid, it returns [NaN, NaN] instead.
subtract()
subtract(
other):ComputedVectorField<ArrayType,GridType>
Defined in: RawField.ts:512
Subtract another vector field from this vector field. The subtraction occurs on the GPU if the resulting field is used in a plot component.
Parameters
| Parameter | Type | Description |
|---|---|---|
other | ExpressionVectorField<ArrayType, GridType> | Vector field to subtract. |
Returns
ComputedVectorField<ArrayType, GridType>
A ComputedVectorField representing the subtracted vector field