Table Of Contents

Cartesian Coordinate Shift (2D Shift) (G Dataflow)

Last Modified: December 18, 2017

Shifts two-dimensional Cartesian coordinates along the x- and y-axes.

This node shifts points within a fixed coordinate system.

connector_pane_image
datatype_icon

x

X-coordinate.

This input accepts the following data types:

  • Double-precision, floating-point number
  • 1D array of double-precision, floating-point numbers
datatype_icon

y

Y-coordinate.

This input accepts the following data types:

  • Double-precision, floating-point number
  • 1D array of double-precision, floating-point numbers
datatype_icon

shift

Shift amount along each of the axes.

The sign of dx or dy is set to positive if you shift the coordinate in the default direction of Cartesian coordinate shift and negative if you shift the coordinate in the opposite of the default shift direction.

datatype_icon

dx

Shift amount along the x-axis.

Default: 0

datatype_icon

dy

Shift amount along the y-axis.

Default: 0

datatype_icon

error in

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Default: No error

datatype_icon

shifted x

Shifted x-coordinate.

This output can return the following data types:

  • Double-precision, floating-point number
  • 1D array of double-precision, floating-point numbers
datatype_icon

shifted y

Shifted y-coordinate.

This output can return the following data types:

  • Double-precision, floating-point number
  • 1D array of double-precision, floating-point numbers
datatype_icon

error out

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

error in does not contain an error error in contains an error
If no error occurred before the node runs, the node begins execution normally.

If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

Algorithm for Shifting Two-Dimensional Cartesian Coordinates

The following illustration demonstrates how this node shifts two-dimensional Cartesian coordinates in the default direction of Cartesian coordinate shift, which means the signs of dx and dy are both set to positive.

Before the shift, the coordinate of point P is (x, y). After the shift operation, the coordinate of point P is (x', y'), which is defined by the following equation:

{ x = x + d x y = y + d y

where

  • dx is the shift amount along the x-axis
  • dy is the shift amount along the y-axis

Where This Node Can Run:

Desktop OS: Windows

FPGA: This product does not support FPGA devices

Web Server: Not supported in VIs that run in a web application


Recently Viewed Topics