Option Compare Text
Option Explicit
Option Base 0
'auteur du code original: Taylor Scott
Public Sub SuperbeNon()
On Error GoTo 0
Dim part%, length%, M&, seed&, dir&, word&, carry&, bx!, by!, BRUSH, COLOR
Application.ScreenUpdating = False
Let COLOR = Array(&H89E2FF, &H459EE9, &H5AA5, 0)
Let BRUSH = Array( _
778, 14270, 12187, 1835, 3644, 62875, 35473, 6923, _
3773, 37752, 47166, 45146, 28853, 640, 53425, 40146, _
8339, 8348, 15633, 9942, 57113, 38901, 37027, 41799, _
35575, 2137, 10669, 41772, 32252, 3453, 54650, 12369, _
54321, 21547, 45634, 45332, 35478, 10516, 45297, 21292, _
1043, 2569, 16059, 59670, 6263, 47330, 44146, 32967, _
21056, 36156, 16047, 44387, 7700, 45629, 9103, 49275, _
44957, 12590, 38606, 9639, 40503, 11332, 11193, 8505)
Let dir = 0
Let carry = 0
Let seed = &H7EC80000
Let Cells.Interior.COLOR = 0
Let Cells.ColumnWidth = 2
For part = 0 To 63 Step 1
Let word = BRUSH(part)
Let seed = (seed And &HFFFF0000) Or word
Let bx = word And 255
Let by = Int(word / (2 ^ 8)) And 255
For length = 0 To (64 - part) * 32 - 1 Step 1
Let carry = seed And &H80000000
Let M = seed And &H40000000
Let seed = (seed And &H3FFFFFFF) * 2
If M <> 0 Then Let seed = seed Or &H80000000
Let seed = seed And &HFFFFFFFF
If carry Then
Let seed = seed Xor 79764919
Let dir = Int(seed And 255)
End If
Select Case dir And 130
Case 0: Let by = Int(by + 1) And 127
Case 2: Let bx = Int(bx + 1) And 127
Case 128: Let by = Int(by - 1) And 127
Case 130: Let bx = Int(bx - 1) And 127
End Select
Let Cells(by + 1, bx + 1).Interior.COLOR = COLOR(part And 3)
Next length
Next part
Let Range("97:999,DY:ZZ").Interior.COLOR = 0
ActiveWindow.Zoom = 10
End Sub