Книга: DirectX 8 Programming Tutorial

2D Cartesian Coordinate System

2D Cartesian Coordinate System

Below are two diagrams showing how the 2D Cartesian coordinate system works.



In the examples above, we have an x-axis and a y-axis. Along each of these axis are numbers starting from zero (at the origin) and increasing the further along the axis you go. So, to specify a single point, all you need is an x value and a y value (see fig 2.1). It follows then, to represent a triangle you need three of these points that are joined together, each with an x value and a y value (fig 2.2). Notice that when we write a coordinate, it is always in the form: (x, y).

Оглавление книги


Генерация: 0.289. Запросов К БД/Cache: 3 / 0
поделиться
Вверх Вниз