Table of Contents

Class PolarToCart

Namespace
Bonsai.Dsp
Assembly
Bonsai.Dsp.dll

Represents an operator that computes the cartesian coordinates of 2D vectors represented in polar form.

public class PolarToCart : ArrayTransform
Inheritance
PolarToCart
Inherited Members

Properties

AngleInDegrees

Gets or sets a value specifying whether vector angle values are measured in degrees.

public bool AngleInDegrees { get; set; }

Property Value

bool

Methods

Process(IObservable<Point2d>)

Computes the cartesian coordinates for each pair of polar coordinates in the sequence.

public IObservable<Point2d> Process(IObservable<Point2d> source)

Parameters

source IObservable<Point2d>

A sequence of points in double-precision polar coordinates, where the first coordinate stores the magnitude, and the second coordinate the angle of a vector for which to compute the cartesian coordinates.

Returns

IObservable<Point2d>

A sequence of 2D points with double-precision cartesian coordinates.

Process(IObservable<Point2f>)

Computes the cartesian coordinates for each pair of polar coordinates in the sequence.

public IObservable<Point2f> Process(IObservable<Point2f> source)

Parameters

source IObservable<Point2f>

A sequence of points in single-precision polar coordinates, where the first coordinate stores the magnitude, and the second coordinate the angle of a vector for which to compute the cartesian coordinates.

Returns

IObservable<Point2f>

A sequence of 2D points with single-precision cartesian coordinates.

Process(IObservable<Tuple<double, double>>)

Computes the cartesian coordinates for each pair of polar coordinates in the sequence.

public IObservable<Tuple<double, double>> Process(IObservable<Tuple<double, double>> source)

Parameters

source IObservable<Tuple<double, double>>

A sequence of pairs specifying double-precision polar coordinates, where the first coordinate stores the magnitude, and the second coordinate the angle of a vector for which to compute the cartesian coordinates.

Returns

IObservable<Tuple<double, double>>

A sequence of pairs specifying double-precision cartesian coordinates, where the first item stores the x-coordinate, and the second item the y-coordinate of a 2D vector.

Process(IObservable<Tuple<float, float>>)

Computes the cartesian coordinates for each pair of polar coordinates in the sequence.

public IObservable<Tuple<float, float>> Process(IObservable<Tuple<float, float>> source)

Parameters

source IObservable<Tuple<float, float>>

A sequence of pairs specifying single-precision polar coordinates, where the first coordinate stores the magnitude, and the second coordinate the angle of a vector for which to compute the cartesian coordinates.

Returns

IObservable<Tuple<float, float>>

A sequence of pairs specifying single-precision cartesian coordinates, where the first item stores the x-coordinate, and the second item the y-coordinate of a 2D vector.

Process<TArray>(IObservable<Tuple<TArray, TArray>>)

Computes the cartesian coordinates for each pair of polar coordinates in the sequence.

public IObservable<Tuple<TArray, TArray>> Process<TArray>(IObservable<Tuple<TArray, TArray>> source) where TArray : Arr

Parameters

source IObservable<Tuple<TArray, TArray>>

A sequence of pairs of arrays, where the first array stores the magnitude, and the second array the angle of a 2D vector field for which to compute the cartesian coordinates.

Returns

IObservable<Tuple<TArray, TArray>>

A sequence of pairs of arrays, where the first array stores the x-coordinates, and the second array the y-coordinates of a 2D vector.

Type Parameters

TArray

The type of the array-like objects in the source sequence.

Process<TArray>(IObservable<TArray>)

Computes the cartesian coordinates for each array of vectors in polar form in the sequence.

public override IObservable<TArray> Process<TArray>(IObservable<TArray> source) where TArray : Arr

Parameters

source IObservable<TArray>

A sequence of 2D vector fields represented by a 2-channel array or image, for which to compute the cartesian coordinates.

Returns

IObservable<TArray>

A sequence of 2-channel arrays or images, where the first channel of each element stores the x-coordinates and the second channel the y-coordinates of a 2D vector.

Type Parameters

TArray

The type of the array-like objects in the source sequence.