421
QB64 Discussion / Burning ship explorer
« on: July 21, 2017, 07:41:07 pm »
left mouse, zoom in
right mouse, zoom out
mousewheel, zoom size
+, increase iterations
-, decrease iterations
(edit: added other variations commented out)
right mouse, zoom out
mousewheel, zoom size
+, increase iterations
-, decrease iterations
(edit: added other variations commented out)
Code: QB64: [Select]
- defint a-z
- z = 0.01
- zz = 0.1
- redraw = -1
- iter = 100
- mw = 0
- getMouse
- u = 0
- v = 0
- xx = (x - sw/2)*z + x0
- yy = (y - sh/2)*z + y0
- '''mandelbrot
- 'u = u
- 'v = v
- 'uu = u*u - v*v + xx
- 'vv = 2*u*v + yy
- '''
- '''burning ship
- uu = u*u - v*v + xx
- vv = 2*u*v + yy
- '''
- '''tricorn
- 'u = u
- 'v = -v
- 'uu = u*u - v*v + xx
- 'vv = 2*u*v + yy
- '''
- '''tetration
- 'u = u
- 'v = v
- 'cexp uu, vv, u, v, u, v
- 'cexp uu, vv, uu, vv, xx, yy
- '''
- '''other, the possibilities are infinite
- 'if u > v then
- ' u = -abs(u)
- ' v = v
- 'elseif -1 then
- ' u = u
- ' v = -abs(v)
- 'end if
- 'uu = u*u - v*v + xx
- 'vv = 2*u*v + yy
- '''
- u = uu
- v = vv
- print "iter =";iter
- _dest p1
- _dest 0
- _putimage , p1
- redraw = 0
- zz = zz + 0.01
- 'draw box
- _putimage , p1
- omx = mx
- omy = my
- getMouse
- x0 = x0 + (mx - sw/2)*z
- y0 = y0 - (sh/2 - my)*z
- z = z*zz
- redraw = -1
- getMouse
- x0 = x0 + (mx - sw/2)*z
- y0 = y0 - (sh/2 - my)*z
- z = z/zz
- redraw = -1
- k = _keyhit
- iter = iter + 50
- redraw = -1
- redraw = -1
- mx = _mousex
- my = _mousey
- 'u + iv = (x + iy) ^ (a + ib)
- arg = a*argz + b*lnz