1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2715],{92715:function(e,t,n){n.r(t),n.d(t,{FftView:function(){return M}});var a=n(57437),r=n(21276),o=n(36496),i=n(85903),s=n(22288),l=n(5163),u=n(24606),c=n(2265),d=n(51448),p=n(389),f=n(7167);let g={position:"absolute",background:"rgba(12, 18, 28, 0.72)",border:"1px solid rgba(255,255,255,0.10)",borderRadius:12,padding:"14px 16px",color:"#e6edf3",font:"13px/1.5 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif",backdropFilter:"blur(8px)",pointerEvents:"auto"},m={padding:"6px 12px",borderRadius:8,border:"none",cursor:"pointer",font:"12px ui-sans-serif, system-ui, sans-serif",color:"#e6edf3",background:"rgba(255,255,255,0.10)"},x={...m,background:"#4dd0e1",color:"#05070d",fontWeight:600},b=[{id:"sine",label:"Sine"},{id:"impulse",label:"Impulse"},{id:"square",label:"Square"}],h=[{color:"#90caf9",label:"Original signal order (before bit-reversal)"},{color:"#5c7a99",label:"Bit-reversal permutation wire"},{color:"#ffca28",label:"Butterfly node â hue = phase, brightness = magnitude",glow:!0},{color:"#ef5350",label:"Active butterfly stage (current step)",glow:!0}];function v(e){let{readout:t,signalType:n,setSignalType:r,n:o,setN:i,stage:s,setStage:l,autoPlay:u,setAutoPlay:c}=e,{stages:d,butterflyCount:p,magnitudes:v,dominantFrequency:y,fftOps:j,dftOps:z,speedup:w}=t,S=function(e,t,n,a){let r=Math.max(1e-6,...e),o=284/e.length;return e.map((e,t)=>{let n=Math.max(1,e/r*74);return{x:8+t*o,y:90-a-n,w:.72*o,h:n}})}(v,0,0,8),k=Math.max(j,z),M=e=>Math.log2(1+e)/Math.log2(1+k)*74,A=Math.max(1,M(j)),C=Math.max(1,M(z)),F=[["N",String(t.n),"#4dd0e1"],["stages",String(d),"#4dd0e1"],["butterflies",String(p),"#ffca28"],["FFT ops",j.toFixed(0),"#8be9b0"],["DFT ops",z.toFixed(0),"#ef5350"],["dominant k",String(y),"#ce93d8"]];return(0,a.jsxs)("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[(0,a.jsxs)("div",{style:{...g,top:74,left:16,width:360},children:[(0,a.jsx)("div",{style:{fontSize:16,fontWeight:600},children:"Fast Fourier Transform \xb7 butterfly network"}),(0,a.jsxs)("div",{style:{opacity:.7,marginBottom:8},children:["X[k] = E[k] + W",(0,a.jsx)("sub",{children:"N"}),(0,a.jsx)("sup",{children:"k"}),"\xb7O[k], X[k+N/2] = E[k] â W",(0,a.jsx)("sub",{children:"N"}),(0,a.jsx)("sup",{children:"k"}),"\xb7O[k]"]}),(0,a.jsxs)("div",{style:{opacity:.85,fontSize:12},children:["The naive DFT costs O(N\xb2): every output sums N terms. CooleyâTukey's FFT instead splits the signal into even- and odd-indexed halves, transforms each recursively, and recombines with a ",(0,a.jsx)("b",{children:"butterfly"}),": two inputs combine via a twiddle factor W",(0,a.jsx)("sub",{children:"N"}),(0,a.jsx)("sup",{children:"k"})," = e",(0,a.jsx)("sup",{children:"â2Ïik/N"})," into two outputs. First a ",(0,a.jsx)("b",{children:"bit-reversal permutation"})," reorders the input; then logâN stages of butterflies rebuild the spectrum â O(N log N) total, the speedup that makes audio, image and signal processing tractable."]})]}),(0,a.jsxs)("div",{style:{...g,bottom:16,left:16,width:360},children:[(0,a.jsx)("div",{style:{display:"flex",gap:6,marginBottom:8},children:b.map(e=>(0,a.jsx)("button",{style:e.id===n?x:m,onClick:()=>r(e.id),children:e.label},e.id))}),(0,a.jsx)("div",{style:{display:"flex",gap:6,marginBottom:10},children:[8,16].map(e=>(0,a.jsxs)("button",{style:e===o?x:m,onClick:()=>i(e),children:["N = ",e]},e))}),(0,a.jsx)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gap:6,marginBottom:8},children:F.map(e=>{let[t,n,r]=e;return(0,a.jsxs)("div",{style:{textAlign:"center",background:"rgba(255,255,255,0.05)",borderRadius:8,padding:"5px 2px"},children:[(0,a.jsx)("div",{style:{fontSize:10,opacity:.7,color:r},children:t}),(0,a.jsx)("div",{style:{fontSize:14,fontWeight:600},children:n})]},t)})}),(0,a.jsx)("div",{style:{fontSize:10,opacity:.6,marginBottom:2},children:"magnitude spectrum |X[k]| (dominant bin lit)"}),(0,a.jsx)("svg",{width:300,height:90,style:{display:"block",background:"rgba(255,255,255,0.04)",borderRadius:6,marginBottom:10},children:S.map((e,t)=>(0,a.jsx)("rect",{x:e.x,y:e.y,width:e.w,height:e.h,fill:t===y?"#ef5350":"#4dd0e1"},t))}),(0,a.jsxs)("div",{style:{fontSize:10,opacity:.6,marginBottom:2},children:["op count (log scale): FFT N\xb7logâN = ",j.toFixed(0)," vs DFT N\xb2 = ",z.toFixed(0)," â ",w.toFixed(1),"\xd7 fewer ops"]}),(0,a.jsxs)("svg",{width:300,height:90,style:{display:"block",background:"rgba(255,255,255,0.04)",borderRadius:6,marginBottom:10},children:[(0,a.jsx)("rect",{x:44,y:82-A,width:44,height:A,fill:"#8be9b0"}),(0,a.jsx)("text",{x:66,y:88,fontSize:9,fill:"rgba(255,255,255,0.6)",textAnchor:"middle",children:"FFT"}),(0,a.jsx)("rect",{x:194,y:82-C,width:44,height:C,fill:"#ef5350"}),(0,a.jsx)("text",{x:216,y:88,fontSize:9,fill:"rgba(255,255,255,0.6)",textAnchor:"middle",children:"DFT"})]}),(0,a.jsxs)("div",{style:{display:"flex",gap:8,marginBottom:10},children:[(0,a.jsx)("button",{style:m,onClick:()=>l(s-1),disabled:s<=0,children:"â Prev stage"}),(0,a.jsx)("button",{style:u?x:m,onClick:()=>c(!u),children:u?"ââ Pause":"â¶ Auto-step"}),(0,a.jsx)("button",{style:m,onClick:()=>l(s+1),disabled:s>=d,children:"Next stage â¶"})]}),(0,a.jsxs)("label",{style:{display:"block"},children:[(0,a.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",opacity:.85,fontSize:12},children:[(0,a.jsx)("span",{children:"stage"}),(0,a.jsxs)("span",{children:[s," / ",d]})]}),(0,a.jsx)("input",{type:"range",min:0,max:d,step:1,value:s,onChange:e=>l(Number(e.target.value)),style:{width:"100%"}}),(0,a.jsxs)("div",{style:{fontSize:10,opacity:.5}
1,children:["0 = bit-reversed input \xb7 ",d," = fully combined spectrum"]})]})]}),(0,a.jsx)(f.D,{items:h,title:"Butterfly network"})]})}var y=n(87318),j=n(87435);let z=new d.Object3D,w=new d.Color;function S(e,t,n){let a=(0,p.dR7)(e),r=(Math.atan2(e.im,e.re)/(2*Math.PI)+1)%1,[o,i,s]=(0,j.R6)(r,2),l=.35+1.35*Math.min(1,a/t);return n.setRGB(o*l,i*l,s*l)}function k(e){let{paramsRef:t,onReadout:n,onStage:o}=e,i=(0,y.Z)(),s=(0,c.useRef)(0),l=(0,c.useRef)(0),u=(0,c.useRef)((0,p.YCG)({signalType:t.current.signalType,n:t.current.n})),f=(0,c.useRef)(null),g=(0,c.useMemo)(()=>{let e=new d.BufferGeometry;return e.setAttribute("position",new d.BufferAttribute(new Float32Array(96),3)),e.setAttribute("color",new d.BufferAttribute(new Float32Array(96),3)),new d.LineSegments(e,new d.LineBasicMaterial({vertexColors:!0,transparent:!0,opacity:.5,toneMapped:!1}))},[]),m=(0,c.useMemo)(()=>{let e=new d.BufferGeometry;return e.setAttribute("position",new d.BufferAttribute(new Float32Array(768),3)),e.setAttribute("color",new d.BufferAttribute(new Float32Array(768),3)),new d.LineSegments(e,new d.LineBasicMaterial({vertexColors:!0,transparent:!0,opacity:.85,toneMapped:!1}))},[]),x=(e,t)=>-8+(e+1)/(t-1)*16,b=(e,t)=>12.8/Math.max(1,t-1)*(e-(t-1)/2);return(0,r.F)((e,a)=>{if(!i.current)return;let r=t.current,c=(0,p.B4_)(u.current,{signalType:r.signalType,n:r.n});if(r.autoPlay){if(s.current+=a,s.current>.7){s.current=0;let e=Math.log2(c.n),t=c.stage>=e?0:c.stage+1;c=(0,p.Nj8)(c,t),o(t)}}else c=(0,p.Nj8)(c,r.stage);u.current=c;let d=(0,p.QEL)(c),h=d.n,v=d.stages,y=v+2,j=.05;for(let e of d.stageSnapshots)for(let t of e)j=Math.max(j,(0,p.dR7)(t));let k=f.current,M=0;if(k){let e=Math.max(.05,...d.signal.map(e=>Math.abs(e)));for(let t=0;t<h;t++){let n=x(-1,y),a=b(t,h);z.position.set(n,a,-1.2),z.scale.setScalar(.28),z.updateMatrix(),k.setMatrixAt(M,z.matrix);let r=d.signal[t]/e;w.setRGB(.3+.35*Math.abs(r),.5+.4*Math.abs(r),.7+.5*Math.abs(r)),k.setColorAt(M,w),M++}for(let e=0;e<=v;e++){let t=d.stageSnapshots[e];for(let n=0;n<h;n++){let a=x(e,y),r=b(n,h),o=e===d.currentStage;z.position.set(a,r,0),z.scale.setScalar(o?.4:.3),z.updateMatrix(),k.setMatrixAt(M,z.matrix),S(t[n],j,w),e>d.currentStage&&w.multiplyScalar(.28),k.setColorAt(M,w),M++}}k.count=M,k.instanceMatrix.needsUpdate=!0,k.instanceColor&&(k.instanceColor.needsUpdate=!0)}{let e=Math.log2(h),t=g.geometry.getAttribute("position"),n=g.geometry.getAttribute("color");for(let a=0;a<h;a++){let r=(0,p.A$d)(a,e),o=x(-1,y),i=b(a,h),s=x(0,y),l=b(r,h);t.setXYZ(2*a,o,i,-1.2),t.setXYZ(2*a+1,s,l,0);let u=0===d.currentStage;w.setRGB(.36,.48,.6).multiplyScalar(u?1.6:1),n.setXYZ(2*a,w.r,w.g,w.b),n.setXYZ(2*a+1,w.r,w.g,w.b)}t.needsUpdate=!0,n.needsUpdate=!0,g.geometry.setDrawRange(0,2*h),g.geometry.computeBoundingSphere()}{let e=(0,p.kd2)(h),t=m.geometry.getAttribute("position"),n=m.geometry.getAttribute("color"),a=0,r=(e,r,o,i,s,l)=>{let u=x(e,y),c=b(r,h),d=x(o,y),p=b(i,h);t.setXYZ(2*a,u,c,0),t.setXYZ(2*a+1,d,p,0),S(l[i],j,w),w.multiplyScalar(s?1.5:.35),n.setXYZ(2*a,w.r,w.g,w.b),n.setXYZ(2*a+1,w.r,w.g,w.b),a++};for(let t of e){let e=t.stage-1,n=t.stage,a=t.stage===d.currentStage,o=d.stageSnapshots[n];r(e,t.top,n,t.top,a,o),r(e,t.bottom,n,t.bottom,a,o),r(e,t.top,n,t.bottom,a,o),r(e,t.bottom,n,t.top,a,o)}t.needsUpdate=!0,n.needsUpdate=!0,m.geometry.setDrawRange(0,2*a),m.geometry.computeBoundingSphere()}l.current+=a,l.current>.08&&(l.current=0,n({n:d.n,stages:d.stages,stage:d.currentStage,butterflyCount:d.butterflyCount,magnitudes:d.magnitudes,dominantFrequency:d.dominantFrequency,fftOps:d.ops.fftOps,dftOps:d.ops.dftOps,speedup:d.ops.speedup}))}),(0,a.jsxs)("group",{children:[(0,a.jsx)("primitive",{object:g}),(0,a.jsx)("primitive",{object:m}),(0,a.jsxs)("instancedMesh",{ref:f,args:[void 0,void 0,96],frustumCulled:!1,children:[(0,a.jsx)("sphereGeometry",{args:[1,12,12]}),(0,a.jsx)("meshBasicMaterial",{vertexColors:!0,toneMapped:!1})]})]})}function M(){let[e,t]=(0,c.useState)("sine"),[n,r]=(0,c.useState)(8),[d,p]=(0,c.useState)(0),[f,g]=(0,c.useState)(!0),[m,x]=(0,c.useState)({n:8,stages:3,stage:0,butterflyCount:12,magnitudes:Array(8).fill(0),dominantFrequency:1,fftOps:24,dftOps:64,speedup:64/24}),b=(0,c.useRef)({signalType:e,n,stage:d,autoPlay:f});return b.current={signalType:e,n,stage:d,autoPlay:f},(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(o.Xz,{camera:{position:[0,2,20],fov:50},style:{background:"#05070d"},gl:{antialias:!0}
1,dpr:[1,2],children:[(0,a.jsx)("ambientLight",{intensity:.75}),(0,a.jsx)("directionalLight",{position:[10,16,24],intensity:.55}),(0,a.jsx)(k,{paramsRef:b,onReadout:x,onStage:p}),(0,a.jsx)(i.z,{enableDamping:!0}),(0,a.jsxs)(s.x,{children:[(0,a.jsx)(l.d,{mipmapBlur:!0,intensity:.6,luminanceThreshold:.35,luminanceSmoothing:.25}),(0,a.jsx)(u.s,{eskil:!1,offset:.3,darkness:.7})]})]}),(0,a.jsx)(v,{readout:m,signalType:e,setSignalType:t,n:n,setN:e=>{r(e),p(0)},stage:d,setStage:p,autoPlay:f,setAutoPlay:g})]})}},7167:function(e,t,n){n.d(t,{D:function(){return s}});var a=n(57437),r=n(2265);let o={position:"absolute",top:74,right:16,display:"flex",flexDirection:"column",alignItems:"flex-end",gap:6,zIndex:8,pointerEvents:"none"},i={background:"rgba(12, 18, 28, 0.72)",border:"1px solid rgba(255,255,255,0.10)",borderRadius:10,color:"#e6edf3",font:"12px/1.4 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif",backdropFilter:"blur(8px)",pointerEvents:"auto"};function s(e){let{items:t,title:n="Key"}=e,[s,l]=(0,r.useState)(!0);return(0,a.jsxs)("div",{style:o,children:[(0,a.jsxs)("button",{onClick:()=>l(e=>!e),style:{...i,display:"flex",alignItems:"center",gap:6,padding:"6px 11px",cursor:"pointer"},children:[(0,a.jsx)("span",{style:{opacity:.7},children:s?"â":"â¤"}),(0,a.jsx)("span",{style:{fontWeight:600},children:n})]}),s&&(0,a.jsxs)("div",{style:{...i,padding:"10px 12px",maxWidth:230},children:[t.map(e=>(0,a.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:5},children:[(0,a.jsx)("span",{style:{flex:"0 0 auto",width:12,height:12,borderRadius:e.glow?6:3,background:e.color,boxShadow:e.glow?"0 0 7px ".concat(e.color):"none"}}),(0,a.jsx)("span",{style:{opacity:.9},children:e.label})]},e.label)),(0,a.jsx)("div",{style:{fontSize:10,opacity:.45,marginTop:2},children:"â glow = active node \xb7 â = molecule"})]})]})}},87435:function(e,t,n){n.d(t,{DF:function(){return r},LJ:function(){return a},OJ:function(){return c},PK:function(){return l},R6:function(){return i},S0:function(){return p},ST:function(){return d},lZ:function(){return u},mZ:function(){return f},ok:function(){return s}});let a=[{name:"Ember",a:[.5,.35,.2],b:[.5,.4,.25],c:[1,1,1],d:[0,.1,.2]},{name:"Ice",a:[.25,.42,.62],b:[.3,.4,.5],c:[1,1,1],d:[.6,.7,.85]},{name:"Rainbow",a:[.5,.5,.5],b:[.5,.5,.5],c:[1,1,1],d:[0,.33,.67]},{name:"Twilight",a:[.5,.4,.55],b:[.45,.35,.5],c:[1,1,1],d:[.3,.2,.55]},{name:"Gold",a:[.6,.5,.3],b:[.4,.4,.32],c:[1,1,.5],d:[0,.12,.28]},{name:"Neon",a:[.5,.5,.5],b:[.5,.5,.5],c:[2,1,0],d:[.5,.2,.25]},{name:"Aurora",a:[.35,.5,.45],b:[.45,.45,.5],c:[1,1.3,.8],d:[.5,.55,.9]},{name:"Magma",a:[.38,.16,.12],b:[.5,.35,.28],c:[1,1.4,2.2],d:[0,.18,.9]},{name:"Deep Sea",a:[.18,.32,.5],b:[.28,.4,.5],c:[1.1,.9,.7],d:[.7,.55,.35]},{name:"Nebula",a:[.5,.38,.55],b:[.5,.45,.5],c:[1.2,.7,1.6],d:[.15,.35,.75]}],r=a.length,o=e=>e<0?0:e>1?1:e;function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=a[(t%r+r)%r],i=t=>o(n.a[t]+n.b[t]*Math.cos(2*Math.PI*(n.c[t]*e+n.d[t])));return[i(0),i(1),i(2)]}let s="\nvarying vec2 vUv;\nvoid main() {\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n";function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1.6;return{uCenter:{value:[-.5,0]},uZoom:{value:1},uSpan:{value:e},uMaxIter:{value:200},uA:{value:[0,0,0]},uB:{value:[0,0,0]},uC:{value:[0,0,0]},uD:{value:[0,0,0]},uPhase:{value:0},uColorScale:{value:3},uAspect:{value:1},uResolution:{value:[1,1]}}}function u(e,t){let n=a[(t%r+r)%r];e.uA.value=[...n.a],e.uB.value=[...n.b],e.uC.value=[...n.c],e.uD.value=[...n.d]}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"\nvarying vec2 vUv;\nuniform vec2 uCenter, uResolution;\nuniform float uZoom, uSpan, uMaxIter, uPhase, uColorScale, uAspect;\nuniform vec3 uA, uB, uC, uD;\n".concat(t,"\n\nvec3 palette(float t) {\n return clamp(uA + uB * cos(6.28318530718 * (uC * t + uD)), 0.0, 1.0);\n}\n\nvec2 cmul(vec2 a, vec2 b) { return vec2(a.x * b.x - a.y * b.y, a.x * b.y + a.y * b.x); }\nvec2 cdiv(vec2 a, vec2 b) { float d = dot(b, b); return vec2(a.x * b.x + a.y * b.y, a.y * b.x - a.x * b.y) / d; }\n\nvec3 shade(vec2 c0) {\n float sn = 0.0;\n bool escaped = false;\n vec2 z = vec2(0.0);\n vec2 dz = vec2(0.0);\n float trap = 1.0e20;\n ").concat(e,"\n\n if (!escaped) {\n // Interior: not a dead flat fill â the orbit trap leaves faint veins so the\n // set body still has structure without ever competing with the boundary.\n float ti = clamp(trap, 0.0, 1.0);\n vec3 col = vec3(0.012, 0.015, 0.035);\n col += palette(ti * 0.5 + uPhase + 0.5) * 0.06 * (1.0 - ti);\n return col;\n }\n\n // continuous iteration count -> base palette colour\n float ci = sqrt(sn / uMaxIter);\n vec3 base = palette(ci * uColorScale + uPhase);\n\n // orbit-trap accent: tint where the orbit hugged the real/imaginary axes\n float tr = clamp(trap, 0.0, 1.0);\n vec3 accent = palette(tr * 1.7 + uPhase + 0.35);\n base = mix(base, accent, 0.5 * (1.0 - smoothstep(0.0, 0.5, tr)));\n\n // slope lighting from the derivative â the sculpted, back-lit 3D look\n vec2 nor = normalize(cdiv(z, dz));\n vec2 lig = normalize(vec2(-0.6, 0.75));\n float h2 = 1.4;\n float dif = clamp((dot(nor, lig) + h2) / (1.0 + h2), 0.0, 1.0);\n vec3 col = base * (0.30 + 0.95 * dif);\n col += vec3(0.65, 0.8, 1.0) * pow(dif, 24.0) * 0.5; // crisp specular glint\n\n // scale-invariant distance estimate -> luminous filament bloom\n float s = uSpan / uZoom;\n float de = 0.5 * log(dot(z, z)) * length(z) / max(length(dz), 1.0e-12) / s;\n col += base * exp(-de * 110.0) * 0.7;\n\n return col;\n}\n\nvoid main() {\n float s = uSpan / uZoom;\n vec2 c0 = uCenter + (vUv - 0.5) * 2.0 * s * vec2(uAspect, 1.0);\n // one device-pixel step in complex-plane units, for 2x2 supersampling\n vec2 px = vec2(2.0 * s * uAspect / max(uResolution.x, 1.0), 2.0 *
1s / max(uResolution.y, 1.0));\n vec3 acc = vec3(0.0);\n for (int i = 0; i < 2; i++) {\n for (int j = 0; j < 2; j++) {\n vec2 off = (vec2(float(i), float(j)) - 0.5) * 0.5 * px;\n acc += shade(c0 + off);\n }\n }\n gl_FragColor = vec4(acc * 0.25, 1.0);\n}\n")}let d="\nz = vec2(0.0);\ndz = vec2(0.0);\nfor (int n = 0; n < 4000; n++) {\n if (float(n) >= uMaxIter) break;\n dz = 2.0 * cmul(z, dz) + vec2(1.0, 0.0);\n z = vec2(z.x * z.x - z.y * z.y, 2.0 * z.x * z.y) + c0;\n trap = min(trap, min(abs(z.x), abs(z.y)));\n float d = dot(z, z);\n if (d > 256.0) {\n sn = float(n) + 1.0 - log(log(d) * 0.5) / log(2.0);\n escaped = true;\n break;\n }\n}\n",p="\nz = vec2(0.0);\ndz = vec2(0.0);\nfor (int n = 0; n < 4000; n++) {\n if (float(n) >= uMaxIter) break;\n float r = length(z);\n float theta = atan(z.y, z.x);\n float rPow1 = pow(max(r, 1.0e-12), uPower - 1.0);\n vec2 zPow1 = rPow1 * vec2(cos((uPower - 1.0) * theta), sin((uPower - 1.0) * theta));\n dz = uPower * cmul(zPow1, dz) + vec2(1.0, 0.0);\n z = (rPow1 * r) * vec2(cos(uPower * theta), sin(uPower * theta)) + c0;\n trap = min(trap, min(abs(z.x), abs(z.y)));\n float d2 = dot(z, z);\n if (d2 > 256.0) {\n sn = float(n) + 1.0 - log(log(d2) * 0.5) / log(uPower);\n escaped = true;\n break;\n }\n}\n",f="\nz = c0;\ndz = vec2(1.0, 0.0);\nfor (int n = 0; n < 4000; n++) {\n if (float(n) >= uMaxIter) break;\n dz = 2.0 * cmul(z, dz);\n z = vec2(z.x * z.x - z.y * z.y, 2.0 * z.x * z.y) + uJuliaC;\n trap = min(trap, min(abs(z.x), abs(z.y)));\n float d = dot(z, z);\n if (d > 256.0) {\n sn = float(n) + 1.0 - log(log(d) * 0.5) / log(2.0);\n escaped = true;\n break;\n }\n}\n"}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.