Interesting patterns for HP42S Message #1 Posted by Tom Grydeland on 6 Mar 2012, 3:00 a.m.
There are doublyperiodic pixellated patterns in which the frequencies of lit to unlit pixels are equal across all rows, columns and diagonals (left and right) of the pattern. When the basic pattern is of size 8, the frequencies can be equal. Looking for particular symmetries can lead the way to some strikingly beautiful patterns. I was curious to find out how compactly I could represent these in the HP42S, and came up with the program listed below. (Rv is roll down, * is multiply).
Enter a number from 0 to 10 in ST X and XEQ "DPP". (only 0, 1, and 5 shown below, to save a bit of typing)
The underlying mathematics for the pattern search was published by prof. Ben Johnsen in the norwegian mathematical journal Normat in 2001. The paper (in Norwegian) is not available online, but I can provide copies upon request.
A small selection of patterns with other sizes and symmetries is shown in this album
00 { 46Byte Prgm }
01 LBL "PSHOW"
02 CLLCD
03 ALENG
04 1e5
05 *
06 1.131
07 +
08 STO 00
09 LBL 01
10 1
11 RCL 00
12 AGRAPH
13 X<>Y
14 8
15 +
16 X<>Y
17 AGRAPH
18 +
19 CLX
20 ISG 00
21 GTO 01
22 END
00 { 344Byte Prgm }
01 LBL "DPP"
02 GTO IND ST X
03 LBL 00
04 3903507479
05 3895678231
06 GTO 96
07 LBL 01
08 4036562913
09 1013367582
10 GTO 96
...
23 LBL 05
24 4039905177
25 4029878118
26 GTO 96
.... (add more patterns here, if so desired)
46 LBL 96
47 CLA
48 XEQ 97
49 Rv
50 XEQ 97
51 XEQ "PSHOW"
52 RTN
53 LBL 97
54 4
55 STO 00
56 Rv
57 LBL 98
58 XEQ 99
59 DSE 00
60 GTO 98
61 RTN
62 LBL 99
63 ENTER
64 ENTER (if anyone know a 1instruction DUP which does not disable stack lift, tell me)
65 255
66 AND
67 XTOA
68 Rv
69 8
70 ROTXY
71 END
