``

prev Menu next

Difference between Decimal BASIC and Microsoft BASIC

Graphics

1. Coordinates
A coordinate system is introduced by a SET WINDOW statement.
SET WINDOW has four parameters left, right, bottom, top.
That is, first two parameters are the range of x-coordinate, the rest are the range of y-coordinate.
`SET WINDOW` x1,x2,y1,y2
correspond to WINDOW (x1,y2)-(x2,y1) on Quick BASIC.
The positive direction of y-axis is upward, though a user can set the coordinate system y-axis downward.
Thus, `WINDOW (x1,y1)-(x2,y2)`
can be replaced by
`SET WINDOW x1,x2,y2,y1`

If you want to set the pane size 640×480, execute an original statement
`SET BITMAP SIZE 640,480`

2. Points and lines
In most cases, re-written can be done by
replacing `PSET(x,y)` by `PLOT x,y`
`LINE (x1,y1)-(x2,y2)` by `PLOT x1,y1 ; x2,y2`
`LINE -(x,y)` by `PLOT x,y;`
`PLOT x,y;` means `LINE (x,y)-` in the notation style of Microsoft BASIC.
The PLOT x,y; executed first does not draw a line except the point.
That is, the PLOT x,y; executed first determines the initial point of a line graph.
To terminate a line graph, add a PLOT statement that has no arguments.

Refer to Introduction to BASIC Curves and Graphs Foundation of Graphics