maybe
This commit is contained in:
parent
27d046011e
commit
f50882a24d
1 changed files with 12 additions and 7 deletions
19
mandel.s
19
mandel.s
|
@ -226,26 +226,31 @@ positive_result:
|
||||||
|
|
||||||
.proc iter
|
.proc iter
|
||||||
; (cx and cy should be pre-scaled to 6.26 fixed point)
|
; (cx and cy should be pre-scaled to 6.26 fixed point)
|
||||||
|
|
||||||
; zx = 0
|
; zx = 0
|
||||||
; zx_2 = 0
|
|
||||||
; zy = 0
|
; zy = 0
|
||||||
; zx_2 = 0
|
; zx_2 = 0
|
||||||
|
; zy_2 = 0
|
||||||
|
; zx_zy = 0
|
||||||
|
|
||||||
loop:
|
loop:
|
||||||
; iters++
|
; iters++
|
||||||
|
|
||||||
; zx_next = zx_2 + zy_2 + cx
|
; 6.26:
|
||||||
; zy_next = 2 * zx * zy + cy
|
; zx = zx_2 + zy_2 + cx
|
||||||
; (detect overflows to -4 or +4 and break if necessary)
|
; zy = zx_zy + zx_zy + cy
|
||||||
; (re-downshift into zx and zy as 3.13 fixed point; round.)
|
; round to 6.10.
|
||||||
|
|
||||||
|
; 12.20:
|
||||||
; zx_2 = zx * zx
|
; zx_2 = zx * zx
|
||||||
; zy_2 = zy * zy
|
; zy_2 = zy * zy
|
||||||
; dist = zx_2 + zy_2
|
; dist = zx_2 + zy_2
|
||||||
|
|
||||||
; if dist >= 4 break, else continue iterating
|
; if dist >= 4 break, else continue iterating
|
||||||
|
|
||||||
|
; round zx_2, zy_2, dist to 6.26
|
||||||
|
|
||||||
|
; if may be in the lake, look for looping output with a small buffer
|
||||||
|
; as an optimization vs running to max iters
|
||||||
|
|
||||||
.endproc
|
.endproc
|
||||||
|
|
||||||
.proc start
|
.proc start
|
||||||
|
|
Loading…
Reference in a new issue