Graphics Programs Reference
In-Depth Information
Cartesian
The Cartesian coordinate system is the most commonly used one with charts.
If you've made a traditional graph, such as a bar chart or a dot plot, you've
used Cartesian coordinates.
You typically think of coordinates in the system as an x and y pair that is
denoted as (x, y). Two lines that are perpendicular to each other, and range
from negative to positive, form the axes. The place the lines intersect is the
origin, and the coordinate values indicate the distance from that origin. For
example, the (x, y) pair at (0, 0) is at the intersection of the lines, and the (1, 2)
pair is one unit away from the origin on the horizontal and two units away
on the vertical.
To make this high school geometry flashback complete, you can find the dis-
tance between any two points, denoted as (x 1 , y 1 ) and (x 2 , y 2 ), with the distance
formula.
You can also extend the Cartesian space to more than two dimensions. For
example, a three-dimensional space would use a (x, y, z) triplet instead of just
a (x, y) pair.
The takeaway is that you can describe geometric shapes using Cartesian coor-
dinates, which makes it easier to draw in the space. From an implementation
standpoint, the coordinate system enables you to encode values to paper or
a computer screen.
Polar
Made a pie chart? You've used the polar coordinate system, too. Although you
might have used only the angle part and not the radius. Referring to Figure 3-13,
the polar coordinate system consists of a circular grid, where the rightmost
point is zero degrees. The greater the angle is, the more you rotate counter-
clockwise. The farther away from the circle you are, the greater the radius is.
Place yourself on the outer-most circle, and increase the angle. This rotates you
counterclockwise toward the vertical line (or the y-axis if this were Cartesian
coordinates), which is 90 degrees (that is, a right angle). Rotate one-quarter
more, and you get to 180 degrees. Rotate back to where you started, and
that's a 360-degree rotation. Your radius would be smaller if you rotated along
the smaller circle.
Search WWH ::




Custom Search