Skip to content

Trigonometry

The Trigonometry group includes components for the trigonometric functions. All trigonometric functions are in Radians.

This group includes the following components:

Arccos

Description:

This component calculates the arccosine of the input that is bounded by -1 to 1. Output is in Radians. The output values are the arccos valued in the range [0, pi].

Name Description Data Type
Input Input Floating Point
Output Arccos (Input) in Radians Floating Point

Equation:

Output = Arccos (Input)

Arcsin

Description:

This component calculates the arcsine of the input that is bounded by -1 to 1. Output is in Radians. The output values are the arcsin values in the range [-pi/2, pi/2].

Name Description Data Type
Input Input Floating Point
Output Arcsin (Input) in Radians Floating Point

Equation:

Output = Arcsin (Input)

Arctan

Description:

This component calculates the arctangent of the unbounded input. Output is in Radians. The output values are the arctan values in the range [-pi/2, pi/2].

Name Description Data Type
Input Input Floating Point
Output Arctan (Input) in Radians Floating Point

Equation:

Output = Arctan (Input)

Cos

Description:

This component calculates the cosine of the unbounded input. Output is in Radians.

Name Description Data Type
Input Input Floating Point
Output Cos (Input) in Radians Floating Point

Equation:

Output = Cos (Input)

Distance

Description:

Calculates the distance between two points in x,y space. Useful for computing distance between output of eye tracker and desired focus location.

Name Description Data Type
Input Stereo signal, put x, y data in stereo format Floating Point
Output Mono signal Floating Point
Xo X-value in X,Y space Floating Point
Yo Y-value in X,Y space Floating Point

Note:

Stereo processor input (put x,y data in stereo format) X = X position, Y = Y position

Example:

Distance

File: Examples\Distance_ex.rcx

Default Device: RP2.1 Processor

Sampling Rate: 50 kHz

This example demonstrates how Distance can be used to detect when the output from an eye-tracker is within a specified radius of a target. A StereoADC is used to acquire two channels of eye tracker input. The distance between the X,Y input from the ADC and the XCenter and YCenter of the target is compared to 0.5 V and a TTL pulse is sent out whenever it is less than 0.5 V. Use the ConstF functions to modify the circuit in RPvdsEx.

Note:

XCenter and YCenter require the use of ActiveX controls or TDT programs other than RPvdsEx. Additional circuitry not shown is included to make the example run within RPvdsEx.

Sin

Description:

This component calculates the sine of the unbounded input. Output is in Radians.

Name Description Data Type
Input Input Floating Point
Output Sin (Input) in Radians Floating Point

Equation:

Output = Sin(Input)

Tan

Description:

This component calculates the tangent of the unbounded input. Output is in Radians.

Name Description Data Type
Input Input Floating Point
Output Tan (Input) in Radians Floating Point

Equation:

Output = Tan (Input)