BIRTHDAY PLOT
Hewlett-Packard used several demonstration programs to show the drawing capabilities of their computers and plotters. The 9830 computer could be attached to a 9862 or 9872 plotter and produce a variety of charts and graphics.

This program generates an abstract design reminiscent of string art based on an entered birthday.

10 DIM R[15,2]
20 DISP "DATE (NUMERIC)  MMDDYY";
30 INPUT Z
40 C=INT(LOGZ-7)*0.01
50 I=RND(-Z*0.0000001)
60 I=INT(RND(Z)*10)+5
70 U1=U2=0
80 L1=L2=1
90 FOR J=1 TO I
100 R[J,1]=RND(Z)
110 IF R[J,1] <= U1 THEN 130
120 U1=R[J,1]
130 IF R[J,1] >= L1 THEN 150
140 L1=R[J,1]
150 R[J,2]=RND(Z)
160 IF R[J,2] <= U2 THEN 180
170 U2=R[J,2]
180 IF R[J,2] >= L2 THEN 200
190 L2=R[J,2]
200 NEXT J
210 SCALE L1,U1,L2,U2
220 FOR J=1 TO 60
230 R[I+1,1]=R[1,1]
240 R[I+1,2]=R[1,2]
250 FOR K=1 TO I+1
260 PLOT R[K,1],R[K,2]
270 IF K>I THEN 300
280 R[K,1]=C*(R[K+1,1]-R[K,1])+R[K,1]
290 R[K,2]=C*(R[K+1,2]-R[K,2])+R[K,2]
300 NEXT K
310 NEXT J
320 PLOT U1,U2,1
330 DISP "CHANGE PAPER AND PRESS SPACE BAR                                    ";
340 WAIT 32000
350 GOTO 20


Comments to Webmaster

Click here for the Home page.
Click here for the Wanted page.

Last updated January 6, 2010