Title: Convergent rendering of Julias
Post by: David Makin on July 09, 2015, 12:25:59 PM
It struck me that all points on a circle around the origin of any radius >=n - for example >=2 - will map to points on the next iteration band, so one way of attempting to avoid the sparse point issue when using convergent (IFS style) rendering is to render many points at different angles on said circle. Here is a quick test done in Ultra Fractal, paste the whole into a UPR file as is - formula included. Converge1 { fractal: title="Converge1" width=640 height=480 layers=1 gamma=2.2000000000000002 credits="Dave Makin;7/9/2015" layer: caption="Background" opacity=100 method=multipass mapping: center=0/0 magn=1 formula: maxiter=100 percheck=off filename="ConvergeTest.ufm" entry="MMF-Two" p_const=-0.12/0.8 p_detail=12 p_angles=9 p_width=640 p_height=480 inside: transfer=none solid=4294967295 outside: transfer=none gradient: smooth=yes index=0 color=8716288 index=100 color=16121855 index=200 color=46591 index=300 color=156 opacity: smooth=no index=0 opacity=255 }
ConvergeTest.ufm:MMF-Two { global: $define debug ; print((cos(135*#pi/180)+flip(sin(135*#pi/180)))/sqrt(2)) ; print((cos(225*#pi/180)+flip(sin(225*#pi/180)))/sqrt(2)) int i=0 int j int k int l int m int n int s[@width+1,@height+1] complex v[2,round(2^@detail)];round(2^(24-@detail))] int angles = round(2^@angles) int p[15] float q[282] float a if angles<=0 p[0] = 1 p[1] = 2 p[2] = 3 p[3] = 5 p[4] = 7 p[5] = 11 p[6] = 13 p[7] = 17 p[8] = 19 p[9] = 23 p[10] = 29 p[11] = 31 p[12] = 37 p[13] = 41 p[14] = 43 q[0] = 0 i = 1 j = 1 repeat a = 2.0*#pi/p[j] k = 0 repeat q[i] = (k-0.5)*a i = i + 1 until (k=k+1)>p[j] j = j = 1 until i>=angles i=0 endif complex c complex zz repeat if angles>0;282 a = i*#pi*2.0/angles else a = q[i] endif zz = v[0,0] = 2.0*(cos(a)+flip(sin(a))) j = 0 m = 0 n = 1 repeat k = 0 l = round(2^j) ;print(l) repeat c = v[n,l] = sqrt(v[m,k]-@const) ;1.0-(0.5-flip(0.5))*v[m,k,i];0.5*(sqrt(1+4.0*v[m,k,i])-1.0); ;if j==@detail-1 s[floor(0.5*@width+real(c)*@width*#magn/4.0),floor(0.5*@height+imag(c)*@height*#magn/3.0)]=j*2048+i+1 ;endif c = v[n,k] = -v[n,l] ;-1.0-(0.5+flip(0.5))*v[m,k,i];-0.5*(sqrt(1+4.0*v[m,k,i])+1.0); ;if j==@detail-1 s[floor(0.5*@width+real(c)*@width*#magn/4.0),floor(0.5*@height+imag(c)*@height*#magn/3.0)]=j*2048+i+1 ;endif ;print(i," ",j, " ",k," ",l) l = l + 1 until (k=k+1)>=round(2^j) m = (m+1)%2 n = (n+1)%2 until (j=j+1)>=@detail until (i=i+1)>=angles init: bool res = false float t if s[round(real(#screenpixel)),round(imag(#screenpixel))] res=true t = (s[round(real(#screenpixel)),round(imag(#screenpixel))]-1) z = (t%2048)/angles + flip((t-t%2048)/(2048*@detail)) endif loop: bailout: res default: title = "Two" render=false complex param const default = (-0.12, 0.8) hint = "Julia seed" endparam int param detail default = 12 max = 25 min = 1 hint = "max = 25 iterations" endparam int param angles caption = "#angles (2^)" default = 9 min = 0 max = 10 hint = "max = 10 i.e. 2^10=1024" endparam int param width default = 640 hint = "Should match image width" endparam int param height default = 480 hint = "Should match image height" endparam }
(http://nocache-nocookies.digitalgott.com/gallery/17/141_09_07_15_12_45_02.jpeg)
Title: Re: Convergent rendering of Julias
Post by: Kalles Fraktaler on July 09, 2015, 08:30:43 PM
Maybe you discovered the mystical Huygens lines? :laugh:
http://www.fractalforums.com/meet-and-greet/new-fractal-programscreensaver/
|