What are OpenGL® coordinates?

OpenGL® coordinates are numerical values ​​that indicate specific positions in virtual, three -dimensional (3D) space. These values ​​are individual points similar to those that have been carried on the graph in mathematical activities in arithmetic and algebers. Using this type of system, coordinates can be identified by three different values ​​that indicate the location of a particular point in each of the three directions. OpenGL® coordinates are usually marked along the "Y -axis", which is up or down; “Axis x” that dictates the position of the point to the left or right of the center; and "axes" indicating how close or far from the viewer the point is placed. While these systems usually have two directions and values, the "X" and "Y" system, the OpenGL® system has a third value to determine where the 3D object is. They are used by a programmer to assign specific OpenGL® coordinates to different points, which can then be used to create objects in the program.

One simple way for someone who imagines the use of OpenGL® coordinates is to consider the basic graph used in mathematics. This type of system has a horizontal line and a vertical line or X -axis and axis. The point at the intersection between these two is usually marked with the coordinate (0, 0) with the first number representing the X -axis and the second position of the position on the Y axis.

OpenGL® coordinates use a similar system and allow someone to create objects in the program in the program to assign values ​​to distance along these axes. Numerical values ​​are then used to indicate the distance from this central intersection (0, 0). Negative values ​​indicate to the left or down on the axes, while the positive stacks positions to the right or up from the intersection. This means that point at (1, 1) is one unit to the right of the central point and one unit of it.

In addition to these two axes, the OpenGL® coordinates also use the Z -axis that represents the third dimension of space. This value basically controls how bListe or far is a point from the position of observation of an invisible camera in space. This camera represents a viewer if it was in an open -germ virtual environment. The positive value on the Z -axis indicates an object that is closer to the camera than the intersection, while the negative number is used for points that are gone.

The entire OpenGL® coordinate system allows someone to mark the exact location of the point in the virtual 3D space. Therefore, someone can mark one point on (1, 2, 3), which is an object one unit on the right, two units up and three units towards the viewer zcentral point. The second point can be created on (-1, 2, -1), which would be one unit on the left, two units up and one unit from the viewer from the central point. These two points can then be connected by a line that can exist in 3D environments, with other points and lines creating more complex shapes.

IN OTHER LANGUAGES

Was this article helpful? Thanks for the feedback Thanks for the feedback

How can we help? How can we help?