(expression "Inverse Lambert Azimuthal Projection" "# Thanks to Carlos A. Furuti\nc=2*asin(r/Y);\nphi =\n if r == 0 then\n 0\n else\n asin(y*sin(c)/r)\n end;\norigVal(xy:[atan(x*sin(c),r*cos(c))*X/180,phi*Y/90])")
(expression "Radial Mosaic Bertl Edition" "# Thanks to Herbert Poetzl\nA=300*t;\nB=(A*2.2)^0.5;\npi360=pi/360;\nn=floor(r/B)+0.5;\nalpha=360/floor(360/(A/(pi360*(n-0.5)*B*B)));\norigVal(ra:[(n*A/(alpha*pi360))^0.5,a-a%alpha])")
(expression "Zoom-Twist" "# tomr@aceldama.com\nsamples = user_slider(\"Samples\", 4, 64);\nzoom = user_slider(\"Zoom\", 0, 1);\ntfact = user_slider(\"Twist\", 0, 360) * (user_curve(\"Twist at t\", t) - 0.5);\nzfact = (user_curve(\"Zoom at t\", t)-0.5) * (user_curve(\"Zoom at r\", r/X)-0.5) * zoom;\nif zfact > 0 then\n sample = 0;\n total = rgba:[0,0,0,0];\n while (sample < samples) do\n radj = zfact * (user_curve(\"Sampling shape\", sample/samples)-0.5);\n sr = r + radj * X;\n sa = a + (user_curve(\"Twist at r\", radj)-0.5) * tfact; \n total = total + origVal(ra:[sr, sa]);\n sample = sample+1;\n end;\n total/samples; \nelse\n origVal(xy);\nend")
(expression "Spin-Zoom" "# tomr@aceldama.com\nzoom = user_slider(\"Zoom\", 0, 1);\nangle = user_slider(\"Angle\", 0, 360);\nsamples = user_slider(\"Samples\", 2, 64);\nzfact = (user_curve(\"Zoom at r\", r/X)*zoom*X)/samples;\nrfact = (user_curve(\"Position at t\", t)*angle)/samples;\nif zfact > 0 then\n sample = 0;\n total = rgba:[0,0,0,0];\n while (sample < samples) do\n total = total + origVal(ra + ra:[zfact, rfact] * sample);\n sample = sample+1;\n end;\n total/samples;\nelse\n origVal(xy);\nend"))
(expression "Life" "num=(gray(origVal(xy+xy:[-1,-1]))>0.5)+\n(gray(origVal(xy+xy:[-1,0]))>0.5)+\n(gray(origVal(xy+xy:[-1,1]))>0.5)+\n(gray(origVal(xy+xy:[0,-1]))>0.5)+\n(gray(origVal(xy+xy:[0,1]))>0.5)+\n(gray(origVal(xy+xy:[1,-1]))>0.5)+\n(gray(origVal(xy+xy:[1,0]))>0.5)+\n(gray(origVal(xy+xy:[1,1]))>0.5);\nval=gray(origVal(xy))>0.5;\nrgba:[0,0,0,1]+rgba:[1,1,1,0]*if num==2 then val else if num==3 then 1 else 0 end end"))
(group "Map"
(expression "Tile" "origVal((xy+XY)*2%WH-XY)")
(expression "Make Seamless" "# Edge Behaviour must be Wrap\nax=abs(x)/X;ay=abs(y)/Y;\nx1=max(0,ax-ay);\ny1=max(0,ay-ax);\nx2=min(1,ax+(1-ay));\ny2=min(1,ay+(1-ax));\nweight=clamp(1-(ax-x1)/(x2-x1),0,1);\nlerp(weight,origVal(xy+XY),origVal(xy))")