Ana içeriğe geç
Version: 1.6.0

Coordinate System

info

Note: All menu XML descriptors are defined at menu folder. View project structure for more info.

Understanding the coordinate system is an important part of graphical programming. The coordinate system represents the positions of the graphic objects on the screen.

Cartesian Coordinate System

The Cartesian coordinate system divides a two-dimensional plane into four regions, also called quartets, and two axes: x and y. The X axis is indicated by a horizontal line and the y axis by a vertical line. A given x and y position pair defines a point in a plane. The origin of the plane is a point with x = 0 and y = 0, and the dials divide the plane by origin.

To find out which point is falling, we compare the x and y positions of the point by origin.

  • Quadrant I: x > 0 and y > 0
  • Quadrant II: x < 0 and y > 0
  • Quadrant III: x < 0 and y < 0
  • Quadrant IV: x > 0 and y < 0

A point with positive x and y values will fall to the first quadrant. A point with positive -x and y values will fall to the second quadrant. A point with positive -x and -y values will fall to the third quadrant. A point with positive x and -y values will fall to the fourth quadrant.

TGI Coordinate System

Unlike the Cartesian coordinate system, the default TGI coordinate system starts with the origin in the upper left corner. By default, the x-axis points to the right and the y-axis points down.As shown in the figure below, the upper left corner starts with x = 0 and y = 0 points.

Because the TGI coordinate system starts with the upper-left corner (x = 0, y = 0) of the screen, you can see only the points with x and y values by default. Objects with -x or -y values do not appear on the screen. However, you can apply translate transform to move objects with negative values to the visible area.