diff options
author | ubq323 <ubq323@ubq323.website> | 2024-06-21 16:23:03 +0100 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2024-06-21 16:23:03 +0100 |
commit | d6ce4e22ad9b98ab06812506f5bec2d4226ee7d2 (patch) | |
tree | 8d8c0435856faf871e7b5eff7d38a3c88da04051 /tests | |
parent | 81662aa56b8ad2fa397b1d3e9dd3bb398c7d1798 (diff) |
mandelbrot
Diffstat (limited to 'tests')
-rw-r--r-- | tests/mandel.bth | 21 | ||||
-rw-r--r-- | tests/mandel.out | 31 |
2 files changed, 52 insertions, 0 deletions
diff --git a/tests/mandel.bth b/tests/mandel.bth new file mode 100644 index 0000000..5eb3fcd --- /dev/null +++ b/tests/mandel.bth @@ -0,0 +1,21 @@ +(do + (set pxy 0) + (while (< pxy 30) + (set cim (/ (- pxy 15) 15)) + (set pxx 0) + (while (< pxx 60) + (set cre (/ (- pxx 40) 20)) + (set i 0) + (set zim cim) + (set zre cre) + (while (< i 25) + (set nzre (+ cre (- (* zre zre) (* zim zim)))) + (set nzim (+ cim (* 2 (* zre zim)))) + (set zre nzre) + (set zim nzim) + (set i (+ i 1))) + (set mag (+ (* zre zre) (* zim zim))) + (print (if (< mag 4) "#" ".")) + (set pxx (+ pxx 1))) + (puts "") + (set pxy (+ pxy 1)))) diff --git a/tests/mandel.out b/tests/mandel.out new file mode 100644 index 0000000..f9b5e6d --- /dev/null +++ b/tests/mandel.out @@ -0,0 +1,31 @@ +........................................#................... +............................................................ +......................................#..................... +....................................####.................... +....................................####.................... +..................................#..##..................... +.............................##..##########................. +.............................##################............. +.............................#################.............. +............................###################............. +...........................#######################.......... +.................#.##.....######################............ +.................#######..#######################........... +................#########.#######################........... +.............###################################............ +.#############################################.............. +.............###################################............ +................#########.#######################........... +.................#######..#######################........... +.................#.##.....######################............ +...........................#######################.......... +............................###################............. +.............................#################.............. +.............................##################............. +.............................##..##########................. +..................................#..##..................... +....................................####.................... +....................................####.................... +......................................#..................... +............................................................ +nil |