Using Point!

Authors

Publication

Pub Details

Date

Pages

BASIC Terms

See all articles from The Plotter v9 n1

What is POINT? Our 2068 manual simply states that POINT tells you whether a PLOT point specified by coordinates is PAPER color (0), or INK color (1). The coordinates for x range from o to 255 and y ranges from o to 175. Note: input other than PLOT also is recognized, but the results are by coordinates. I recall trying this in the early days of 2068 experiments, but it didn’t seem of much value.

Sharon Aker’s book, T/S 2068 BASICS and BEYOND actually put POINT to some use with this short program:

Program #1

 10 INPUT"Press any key "; a$
15 PRINT a$
20 PRINT AT 10,0
25 FOR y=175 TO 168 STEP -1
30 FOR X=0 TO 8
35 PRINT POINT (x,y);
40 NEXT x: PRINT: NEXT y

Just input any character including graphic and see the result.

For some time I have thought that there should be some way to print the pixel addresses or coordinates of a graphic figure. For practical purposes it should be a small figure as an 8×8 figure requires 128 numbers for 64 addresses if the 8×8 is all INK color. Many designs may be much less than this. If such could be accomplished, then it would be possible to provide a design to any 2068 user. So, a design equal to the space of about 4 characters should be practical to convert to addresses.

Make these change in lines 35 and to get a numerical print out of character for INPUT:

 35 IF POINT (x,y) THEN PRINT x;",";y
40 NEXT x: NEXT y x;"

Now you have actual coordinates printed for the shape you INPUT. We are not interested in printing addresses of PAPER color. The first column is the x line and the second is the y column. Obviously the amount of information that can be displayed in this manner is very limited. See the 2068 manual, page 152 for a display of coordinates used on the 2068. If the whole screen was printed out in this manner the data printed would be enormous because the POINT for each part of data would also be printed! The solution is to do this on paper.

A more useful record can be obtained by sending the data to a 2040 printer. In this way the image can be any place on the screen. Make these line changes:

 33 IF POINT (x,y) THEN LPRINT x;",";
35 IF POINT (x,y) THEN PRINT y; "

This gives a line print out with a comma joining two coordinate numbers and a space between addresses. Try it with RUN and see the difference. This is more like a DATA line.

The reason that all of this works is that “IF POINT (x, y) ” means “ON” if it is a true statement. The next step is to work this DATA into a useable statement. This requires the numbers to be copied into DATA lines, adding commas at the spaces between addresses.

For an example, a Volkswagen BUG was used as it was 2 characters wide, being formed from a user graphic assigned to keys A and B. The basic design again was from Sharon Aker. Later, some changes were made to include parts of the next two lower character positions plus a slightly longer figure in these two character positions. Thus the figure was 9 pixels high and 20 pixels long. These changes will be described later, as well as reshaping the front end of the car. All easily accomplished! The original design can be obtained from page 116 for those with access to this book.

The next step was to develop a program to print out the coordinates for every INK 1 for this figure. At the same time a base line (road) was added. The program follows with line 20 being the LOAD command for Oliger. Just change this line to fit the readers equipment. Line 55 adds the ability to print on all 23 lines and scroll properly. Line 25 adds the base line under the BUG. You will have to wait until you get a SCREEN$ of BUG before you can use this next program. I will give you the data soon for this.

Program #2

 10 LET a$="BUG"
20 LOAD a$ SCREEN$
25 PLOT 0,167: DRAW 19,0
30 PRINT AT 1,0
50 FOR y=175 TO 165 STEP -1
55 POKE 23692, 255
60 FOR X=0 TO 20
70 IF POINT (x,y) THEN PRINT x;", "¡y;" ";
80 NEXT x: NEXT y

The raw DATA can be used to reproduce an image of the BUG by copying it as lines of DATA, adding commas in the spaces. However, we do not have a SCREEN$ yet to load in for line 10. The next program with DATA will be easier to use and to change. The program will reproduce the BUG and after a SCREEN$ save, called BUG, can be used in the above program to see the DATA that was used in the following program. As the reader does not have the image until this last step, the SCREEN$ can be used in this way.

Program #3

 100 FOR a=1 TO 125
110 LET m=175
112 LET n=174
114 LET o=173
116 LET p=172
118 LET q=171
120 LET r=170
122 LET s=169
124 LET t=168
126 LET u=167
130 READ x
135 READ y
140 DATA 5,m,6,m,7,m,8,m,9,m,10,m
145 DATA 3,n,4,n,5,n,6,n,7,n,8,n,9,n,10,n, 11,n,12,n,12,n
150 DATA 2,o,3,o,4,o,5,o,6,o,7,o,8,o,9, o,10,o,11,o,12,o,13,o,14,o
155 DATA 1,p,2,p,3,p,4,p,5,p,6,p,7,p,8,p, 9,p,10,p,11,p,12,p,13,p,14,p,15,p
160 DATA 0,q,1,q,2,q,3,q,4,q,5,q,6,q,7, q,8,q,q,q,10,q,11,q,12,q,13,q,14,q,15,q,
165 DATA 0,r,1,r,2,r,3,r,4,r,5,r,6,r, 7,r,8,r,9,r,10,r,11,r,12,r,13,r,14,r,15,r,
175 DATA 2,s,3,s,4,s,5,s,6,s,7,s,8,s ,9,s,10,s,11,s,12,s,13,s
180 DATA 3,t,4,t,11,t,12,t
185 DATA 0,u,1,u,2,u,3,u,4,u,5,u,6,u,7,u, 8,u,9,u,10,u,11,u,12,u,13,14,u,15,u,16,u, 17,u,18,u,19,u,20,u
200 PLOT x, y
210 NEXT a

Keying in this program and data will produce an image of a VW BUG at the upper left corner of the screen. To show the convenience of this last program to modify a figure, change lines 140 and delete 5, m; 145 and delete 3,n, 4, n,; 150 and delete 2,0,3,o,; and 160 with delete 1,p,. Now RUN again and see a better shaped BUG. SAVE this SCREEN$ if you like it. The SCREEN$ of BUG can now be used in program #2 as if you had it originally.

A next step might be to look at the new expanded image with the first program. However, this image takes up 3 character spaces across the screen (x axis) and 2 character spaces up (y axis). This program must be adjusted to match the new image.

You might have a preferred screen location for the figure. Just take the last program and change the PLOT by subtracting from the y coordinate the start of the new location. And if moved across the screen, add the change in the x coordinates. Suppose the location is 50 points down and 50 points across. Line 130 READ x+50 and line 135 READ y-50 are the changes. Run and SAVE again. Also, be sure and save the program each time.

Assume you don’t have have the screen location of a figure on the screen. Just make a broad bracket of the location. It might look like it is in the upper half of the screen and somewhere across! Change line 50 as 50 FOR y=175 TO (166-85) STEP -1, and line 60 as 60 FOR O TO 255. Now run this change and all of the INK 1 pixels will be located.

Several images can be displayed on the screen and saved back as a new SCREEN$ by using the following program that duplicates an image across the screen, or even in various locations. The duplicating program is very simple and works like a charm. The program starts with a VW BUG developed previously and saved. Then it is combined into 2 VW BUGS and saved as a SCREEN$ called BUGS. Line 210 provides for 9 pixel rows and line 220 produces a figure 39 pixels long including the original figure, 19 being added to the first 20.

Program #4

 200 LOAD "BUG"SCREEN$
210 FOR y=175 TO 175-8 STEP -1
220 FOR x=0 TO 19
230 IF POINT (x,y) THEN PLOT x+20, y
240 NEXT x: PRINT: NEXT y
250 SAVE "BUGS"SCREEN$

Save this program and the SCREEN$ of the 2 BUGS. Now that there are 2 BUGS we will join them into a total of 12 BUGS, adding 10. The following program will demonstrate how to make a border of “Volkswagen Bugs On Parade”.

Program #5

 110 LOAD "BUGS"SCREEN$
120 REM this image is from program #4
130 FOR Y=175 TO 175-8 STEP -1
140 IF POINT (x,y) THEN PLOT x+20, y
150 IF POINT (%,y) THEN PLOT x+40, y
160 IF POINT (x,y) THEN PLOT x+60, y
170 IF POINT (x,y) THEN PLOT x+80, y
180 IF POINT (x,y) THEN PLOT x+100, y
190 NEXT x: PRINT: NEXT y
200 PRINT AT 2,0; "--Volkswagen Bugs On Parade--"

Products

 

Media

 

Image Gallery

Source Code

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.

Scroll to Top