﻿ Coordinate System

Coordinates ☆☆☆

BASIC manipulates graphics with respect to the problem coordinates，which do not depend on hardware pixels.

SET WINDOW

A SET WINDOW statement introduce a problem coordinates on the drawing pane.

`SET WINDOW left , right , bottom , top`
introduces the coordinate system on which the x-coordinate of the left-hand edge is left, the x-coordinate of right-hand edge is right, the y-coordinate of the bottom-end is bottom, and the y-coordinate of top-end is top, where left , right , bottom and top are numerical expressions.

Example.
` SET WINDOW -4,4,0,8`
The range of x-coordinates shall be from -4 to 4，the y-coordinates from 0 to 8.

The initial aspect of the drawing pane is square.
Thus, the ratio of the vertical length to the horizontal length is 1:1 when the coordinates are set so that right `-` left =top `-` bottom.

If no SET WINDOW statement has been executed, the left-hand edge coordinate and the bottom-end coordinate are 0, and the right-hand edge coordinate and the top-end coordinate are 1.

`ASK WINDOW x1, x2, y1, y2`