The Java Course provides a general introduction to programming in Java. It is based on A.B. Downey's book, How to Think Like a Computer Scientist. Click here for details. 
Home Conditionals, Graphics and Recursion Coordinates  
Search the VIAS Library  Index  
Coordinates
You are probably familiar with Cartesian coordinates in two dimensions, in which each location is identified by an xcoordinate (distance along the xaxis) and a ycoordinate. By convention, Cartesian coordinates increase to the right and up, as shown in the figure. Annoyingly, it is conventional for computer graphics systems to use a variation on Cartesian coordinates in which the origin is in the upperleft corner of the screen or window, and the direction of the positive yaxis is down. Java follows this convention. The unit of measure is called a pixel; a typical screen is about 1000 pixels wide. Coordinates are always integers. If you want to use a floatingpoint value as a coordinate, you have to round it off to an integer (See Section 3.2).


Home Conditionals, Graphics and Recursion Coordinates 