Shivering in the Wind

Date: 1992
Type: Diskette
Platform(s): QL
Tags: Graphics

Draws a winter scene in MODE 8: a frozen lake with the moon reflected in the ice, randomly placed mountains on the horizon and a bare tree drawn by a recursive procedure, under the title “Shivering in the wind”. The mountains and branches are random, so it is never the same twice.

By A. Pritchard; the REM lines say QL User 1985, so it first appeared in the British magazine QL User. Hugh Howie took it from the GRAF_1 disk of the club QL Library, where it is called TREE_BAS.

Published in Sinc-Link September-October 1992 (QLIPS).

Related Articles

I cannot remember whether or not I have used this previously, If I have then I apologise, if not then...

Source Code

50 REMark by A. Pritchard
60 REMark QL USER 1985
100 PAPER 5: PAPER #2,5 : WINDOW 512,256,0,0: MODE 8
110 INK 7: FILL 1 : CIRCLE 80,60,10 : FILL 0: INK
    #2,0
120 FOR i=1 TO 10: CIRCLE 80,2,i,.1,PI/2:NEXT i
130 FOR h=25 TO 12 STEP -1: d :NEXT h: INK 0: FILL 1
140 LINE 0,-3 TO 28,40 TO 36,40: ARC TO 50,-3,PI/2
150 FILL 0: tr 28,40,20,8: INK 3: AT 0,5: OVER 1
160 CSIZE 3,1: PRINT '"Shivering in the wind"';
170 CSIZE 2,0: PRINT "AP85";
180 DEFine PROCedure tr (x,y,l,b):LOCal i,f,g,bl
190 IF l<2 THEN RETurn
200 FOR i=1 TO 4
210 bl=b/2: IF b/2>1 THEN FILL 1
220 f=x+(i*l-1.2*l-RND(1))*1.2:g=y+RND(l*2.3)-l/3
230 k=0: IF i=4 AND l=20 THEN k=3
240 LINE x,y TO f,g TO f+bl-1,g
250 LINE TO x+b-1,y-k TO x,y
260 FILL 0: tr f,g,l/2,b/2:NEXT i: END DEFine
270 DEFine  PROCedure d : p=RND(150)-30:g=RND(160)
280 INK 3: FILL 1: LINE p,10 TO (p+g)/2,h TO g,10
290 FILL 0: INK 7: LINE (p+g)/2,h TO g,10:INK 3,5
300 FILL 1: LINE p,10 TO (p+g)/2,10-(h-10)/3 TO g,10
310 FILL 0:END DEFine
400 PAUSE

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