Sharp logo

MZ-800 course Chapter 7 
7. Graphical applications


7.3 Funny figures

In this part of Chapter 7 we will demonstrate how to make funny figures. The figures are constructed with graphical instrucions, like LINE, PATTERN and so on.
Of course there are inifitely many possibilities, of which a few are shown here. All of there examples are in only one colour, otherwise the programs would be far too big. The first two figures are ones that you will encounter more often, because we use them for programs and books. In fact, they are the preliminary logos of Neptunes Productions.

Figure 1: The preliminary logo of Neptunes Productions

10 INIT "CRT:M1":PAL 1,5
20 BOX [2],0,0,245,199,2
30 BOX [0],5,15,240,64,0
40 DATA 142,134,17,20,20,20,138,143,191,133,17,20,20,20,20,135,140,153,130,17,20,20,20,141,177
50 CURSOR 3,3:FOR G=1 TO 25:READ F:PRINT CHR$(F);:NEXT G
60 LINE 8,39,56,39:LINE 8,40,56,40
70 LINE 32,16,32,63:LINE 31,16,31,63
80 CIRCLE 31,39,17:CIRCLE 31,39,20:PAINT 33,37 :PAINT 30,41
90 BLINE 50,39,49,39:BLINE 50,40,49,40
100 BLINE 12,39,13,39:BLINE 12,40,13,40
110 BLINE 31,20,31,21:BLINE 32,20,32,21
120 BLINE 31,57,32,57:BLINE 31,58,32,58
130 SYMBOL [1]89,20,"NEPTUNES",2,2
140 SYMBOL [1]65,45,"PRODUCTIONS",2,2
150 CURSOR 0,10

Figure 2: The logo of programmer Arjan Habing

10 DATA 0,22,31,0,18,21,32,37,0,15,17,38,
39,0,13,14,40,41,0,11,12,42,42,0,10,10,
43,43,0,9,9,27,27,40,40,44,44,0,8,8,44,
44,0,8,8,10,13,23,23,25,26,38,38,44,44,0,
7,7,9,9,14,14,22,22,25,26,32,34,37,37,39,
40,43,43
20 DATA 0,7,8,11,12,15,15,30,31,35,35,40,
40,43,43,0,7,8,11,11,36,36,43,43,54,57,
0,7,7,9,9,12,12,27,27,44,44,52,53,57,60,
0,8,8,10,11,14,14,26,29,37,37,44,44,51,51,
55,56,60,63
30 DATA 0,9,9,12,13,24,25,29,36,38,38,44,
44,50,51,54,54,57,59,64,65,0,10,11,17,17,
32,34,43,44,50,50,52,53,56,56,61,61,65,
65,0,11,17,42,43,50,50,54,55,58,60,66,66
40 DATA 0,7,13,17,18,40,41,51,51,55,58,65,
65,0,6,9,14,15,19,20,38,39,52,52,56,56,
64,64,0,4,5,10,12,16,16,20,25,36,38,41,
47,53,53,63,63
50 DATA 0,3,3,13,13,17,17,20,20,26,35,48,
49,54,54,57,57,62,62,0,2,2,7,10,14,14,16,
16,18,20,50,51,54,54,61,61,0,2,2,10,12,
14,15,19,19,52,53,61,61
60 DATA 0,3,3,11,11,14,14,18,18,53,53,61,
61,0,4,4,13,13,15,17,45,45,52,52,62,62,
0,5,6,11,15,46,46,52,52,62,62,0,6,7,10,
10,14,14,25,25,44,44,47,47,53,53,62,62
70 DATA 0,5,5,14,14,47,49,61,61,0,4,4,15,
15,19,19,30,37,47,47,50,52,59,60,0,3,3,
16,16,19,19,26,29,38,39,48,48,53,58,0,2,
2,16,16,19,19,25,25,40,40,49,49
80 DATA 0,2,2,15,15,19,19,25,25,41,41,49,
49,0,2,2,18,18,24,24,42,42,50,50,0,3,3,
17,17,23,23,42,42,51,51,61,66,0,4,6,13,16,
23,23,43,43,53,53,56,60,67,69
90 DATA 0,7,13,22,22,27,27,43,43,50,55,70,
70,0,13,13,22,22,27,27,43,43,46,49,52,52,
56,56,71,71,0,14,14,21,21,25,25,28,28,43,
45,49,49,51,51,56,56,71,71
100 DATA 0,14,14,17,20,26,28,42,42,46,46,
48,48,55,55,61,61,72,72,0,15,16,19,19,29,
29,41,41,45,45,55,55,57,57,61,61,73,73,
84,85,0,15,15,18,18,30,30,41,41,54,54,57,
57,60,60,74,74,82,83,86,86
110 DATA 0,14,14,18,18,31,32,40,40,52,53,
55,55,58,58,60,60,75,75,80,81,86,86,0,13,
13,19,19,33,34,39,39,50,52,54,54,56,57,
59,60,75,75,78,79,85,85
120 DATA 0,13,13,19,19,35,35,39,39,49,51,
53,53,55,55,57,59,61,61,76,77,85,85,0,13,
13,15,15,20,21,36,36,48,50,52,52,54,54,
56,56,58,58,62,63,84,84
130 DATA 0,14,14,22,23,37,37,49,51,53,53,
55,55,57,57,64,65,82,83,0,15,15,18,18,24,
25,38,38,49,50,52,52,54,54,56,56,58,58,
66,67,80,81
140 DATA 0,15,15,17,17,21,21,23,23,25,27,
37,37,39,39,48,49,51,51,53,53,55,55,57,
58,68,69,79,79
150 DATA 0,16,16,19,19,22,22,24,24,26,26,
28,30,36,36,38,38,40,41,47,48,50,50,52,
52,54,56,69,79,79
160 DATA 0,17,19,21,21,23,23,25,25,27,27,
29,29,31,35,37,37,39,39,41,41,43,43,45,
45,47,47,49,49,51,53,70,70,78,78
170 DATA 0,21,23,26,26,28,28,30,30,32,32,
34,34,36,36,38,38,40,46,48,50,71,71,77,
78,0,24,25,27,31,33,39,73,76
180 INIT "CRT:M1":PAL 3,0:PAL 0,7
190 H = 2:FOR R=1 TO 380
200 READ C:IF C=0 THEN READ B:H=H+1 ELSE B=C
210 READ A:BOX B,H,A,H:NEXT R
220 SYMBOL 75,17,"BABY-programmer",2,3
:CURSOR 0,8:END

Figure 3: A doggie

A very funny picture of a doggie.

10 INIT "CRT:M1":PAL 3,0:PAL 0,7:Y=1
20 CURSOR 0,20
30 FOR T=0 TO 375
40 READ X1,X2
50 IF X1=0 THEN X1=X2:Y=Y+1:READ X2
60 LINE X1+110,Y+80,X2+110,Y+80
70 NEXT T
80 DATA 16,32,39,44,0,13,15,33,35,37,38,
44,45,0,11,12,45,46,0,9,10,44,44,46,47,0,
5,8,34,34,45,45,47,48,0,4,4,7,7,35,35,44,
44,46,46,48,48,0,2,3,6,6,18,18,21,21,24,
24,35,35,45,45,47,48
90 DATA 0,1,1,6,6,15,15,19,19,22,22,24,24,
34,34,44,44,46,47,0,1,1,5,5,13,13,17,17,
34,34,43,43,45,45,47,48,75,76,0,1,1,4,6,
15,15,22,22,24,25,34,34,44,44,46,46,48,
49,76,78
100 DATA 0,2,2,7,8,21,21,25,27,35,35,47,
47,50,50,77,80,0,3,3,9,10,21,21,24,27,35,
35,50,50,78,78,81,83,0,3,3,11,11,19,19,
22,22,24,26,36,36,47,47,50,50,77,77,80,
80,82,82,84,85
110 DATA 0,4,4,10,10,18,18,20,20,37,38,44,
44,48,49,76,76,81,81,83,83,85,85,86,0,3,3,
8,9,17,17,19,19,21,21,23,23,38,40,45,45,
49,50,75,75,84,84,86,86
120 DATA 0,2,2,7,7,16,16,18,18,20,20,37,
38,41,42,46,46,48,49,75,75,85,85,87,87,0,
2,2,6,15,17,17,25,25,36,41,43,43,46,47,
49,53,76,76,84,84,86,87
130 DATA 0,3,3,7,13,24,24,34,35,40,40,44,
45,54,59,77,77,81,81,85,86,0,4,4,9,12,22,
23,32,39,60,62,77,78,82,82,84,84,86,86,
0,5,8,12,13,20,21,28,31,35,37,63,66,76,
76,79,79,85,85,87,87
140 DATA 0,14,18,25,35,67,68,76,76,80,80,
84,84,87,87,0,18,26,30,32,69,73,77,78,86,
86,0,25,29,74,76,79,80,87,87,0,26,27,77,
79,81,81,88,88,0,25,25,80,81,88,88,0,24,
24,82,82,88,88
150 DATA 0,13,19,24,24,35,35,87,87,0,12,
13,20,21,25,25,34,34,66,66,86,86,0,10,11,
14,16,22,25,33,33,64,64,86,86,0,9,9,17,
19,24,25,32,32,61,61,63,63,65,65,86,86
160 DATA 0,10,14,26,26,32,32,60,60,62,64,
87,87,0,10,10,15,17,26,28,31,32,61,61,63,
63,87,87,0,11,11,29,31,45,45,60,60,62,
62,87,87,0,12,13,42,42,46,46,57,57,61,61,
86,86,0,14,16,43,43,47,47,56,56,58,58,60,
60,85,85
170 DATA 0,13,18,40,40,44,47,53,53,55,55,
57,57,59,60,85,85,0,11,13,18,21,37,37,41,
43,48,49,51,51,54,54,56,56,58,60,82,82,
85,85,0,9,11,19,20,22,23,27,27,33,33,38,
38,41,41,51,51,53,54,56,58,61,61,83,83,
86,86
180 DATA 0,8,9,15,18,20,20,22,22,24,24,28,
28,34,34,37,37,39,40,61,62,79,79,83,83,
86,86,0,7,8,13,14,17,19,21,21,23,23,25,
27,29,29,33,36,62,64,80,80,84,85,0,7,8,12,
12,15,20,22,22,30,32,60,61,64,66,81,82,
85,85
190 DATA 0,7,9,12,12,14,14,16,17,19,19,59,
60,66,66,68,69,78,78,82,82,84,84,0,9,11,
14,14,16,16,54,59,65,65,67,67,70,70,79,
80,83,83,0,49,53,64,64,66,66,68,68,70,70,
80,81,83,83
200 DATA 0,47,48,55,57,61,61,63,65,67,69,
80,80,82,83,0,47,47,52,54,60,60,62,64,66,
66,69,69,81,81,0,48,52,57,57,59,64,78,78,
82,82,0,53,54,56,56,58,61,67,67,79,81,0,
54,58,65,66,72,73,80,80
210 DATA 0,57,57,63,64,70,70,79,79,0,58,
59,62,63,68,70,77,78,0,60,61,64,64,66,66,
68,68,71,72,74,75

Figure 4: An owl

10 DATA 0,0,2,0,4,0,6,0,8,0,10,0,12,0,14,
0,16,0,1,1,7,1,9,1,15,1
20 DATA 0,2,4,2,8,2,12,2,16,2,3,3,5,3,11,
3,13,3,0,4,4,4,12,4,16,4
30 DATA 1,5,7,5,9,5,15,5,0,6,3,6,8,6,14,
6,16,6,1,7,3,7,13,7
40 DATA 0,8,2,8,4,8,6,8,8,8,10,8,12,8,16,
8,1,9,3,9,5,9,7,9
50 DATA 0,10,2,10,4,10,6,10,8,10,16,10,1,
11,3,11,5,11,7,11
60 DATA 2,12,4,12,6,12,8,12,16,12,3,13,5,
13,7,13,9,13
70 DATA 4,14,6,14,8,14,10,14,16,14,5,15,
7,15,9,15,11,15
80 DATA 6,16,8,16,10,16,12,16,16,16,7,17,
11,17,13,17,6,18,10,18,14,18,16,18
90 DATA 1,19,3,19,5,19,7,19,9,19,11,19,15,
19,16,20
100 INIT "CRT:M1":PAL 0,7:PAL 3,0
110 INPUT "SIZE (0-8)";GR:IF GR<0 OR GR>8 THEN 110
120 GR=GR+1:X1=(320-G*17)/2:Y1=(200-G*21)/2:CLS
130 FOR A=0 TO 97:READ B,C:BOX B*G+X1,C*G+Y1,B*G+GR+X1,C*G+GR+Y1,3 NEXT A
140 GET A$:IF A$="" THEN 140 ELSE CLS:END

Figure 5: A riding tank

Moving pictures are actually part of the animations, but since a tank is not made to stand still, we have included this program here.

10 INIT "CRT:M1":PAL 0,7:PAL 3,0
20 A$=CHR$(0,24,60,63,61,36,61,63,62,60,
36,61,61,60,60,38,63,61,60,61,39,60,24,0)
30 B$=CHR$(24,24,24,231,231,231,231,231,
36,102,195,66,66,195,102,60,255,255,255,
255,255,0,0,0)
40 C$=CHR$(0,24,60,252,188,36,188,252,124,
60,36,188,188,60,60,100,252,188,60,188,
228,60,24,0)
50 D$=A$+B$+C$
60 FOR Y=0 TO 224:POSITION 150,Y:PATTERN 24,D$ :NEXY Y
70 FOR Y=200 TO -24 STEP -1:POSITION 150,Y:PATTERN -24,D$:NEXT Y

Figure 6: Head of Bengashie

10 INIT "CRT:M1":PAL 0,7:PAL 3,0
20 A$=CHR$(239,111,95,96,31,120,74,120,95,
223,39,190,167,167,51,25,95,86,182,103,
111,95,111,239)
30 B$=CHR$(66,231,255,60,165,165,165,165,
165,165,36,255,195,255,128,127,170,148,
127,128,255,247,65)
40 C$=CHR$(247,246,250,6,248,30,82,30,250,
244,116,228,142,226,242,126,174,174,102,
246,250,254,237)
50 D$=A$+B$+C$
60 POSITION 150,90:PATTERN -24,D$

Of course there are many more possibilities, but you have seen that the best results come from programs that exceed 1 page. You can guess how big a program would be if it uses multiple colours.
For nice colour images, we refer to the program PICTURESHOW made by Neptunes Productions. In this program you will find a couple of very nice images, even better than the ones in this chapter.

Previous page
Next page
Contents


Go to the top of this page Home

last updated February 4, 2008
Arjan Habing, Mark de Rover, Jeroen F. J. Laros, sharpmz@sharpmz.org