Created
July 31, 2021 06:54
-
-
Save YonatanKra/0840f38bb3a75c4f3aa5f225e61cb076 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const matrices = { | |
last: null, | |
current: null | |
}; | |
matrices.current = new Array(MATRIX_DIMENSIONS.height).fill(0) | |
.map(() => { | |
return generateWhiteNoise(MATRIX_DIMENSIONS.width, WHITE_LEVEL); | |
}); | |
while (areMatricesDifferent(matrices.current, matrices.last) || someCounter > someLimit) { | |
matrices.last = matrices.current; | |
matrices.current = cellularAutomaton(matrices.last); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment