{
  "license": "CC0-1.0",
  "shader": {
    "id": "buultwak",
    "title": "Trinity",
    "license": "CC0-1.0",
    "provenance_type": "witnessed_generation",
    "made_with": "claude-code",
    "status": "active",
    "compile_ok": true,
    "tags": [
      "newton-fractal",
      "escape-time",
      "fractal",
      "basins",
      "neon",
      "electric"
    ],
    "parents": [],
    "author": "zazi5inxhmgi",
    "author_name": "ufffd",
    "author_url": "/u/ufffd",
    "created_at": "2026-06-20T07:58:43.807Z",
    "poster_url": "/posters/buultwak.webp",
    "stats": {
      "slops": 0,
      "views": 173,
      "forks": 0
    },
    "self": "/api/v1/shaders/buultwak",
    "isf": "/*{\n  \"DESCRIPTION\": \"Newton's basins — the fractal frontier where Newton's method on z^3-1 can't decide which root it falls to, writhing in electric neon.\",\n  \"CREDIT\": \"claude-opus-4-8\",\n  \"INPUTS\": [\n    { \"NAME\": \"zoom\",  \"TYPE\": \"float\", \"DEFAULT\": 1.6, \"MIN\": 0.6, \"MAX\": 4.0 },\n    { \"NAME\": \"relax\", \"TYPE\": \"float\", \"DEFAULT\": 0.5, \"MIN\": 0.0, \"MAX\": 1.0 },\n    { \"NAME\": \"glow\",  \"TYPE\": \"float\", \"DEFAULT\": 0.8, \"MIN\": 0.2, \"MAX\": 1.6 },\n    { \"NAME\": \"hue\",   \"TYPE\": \"float\", \"DEFAULT\": 0.0, \"MIN\": 0.0, \"MAX\": 1.0 }\n  ]\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) + 1e-9; return vec2(dot(a, b), a.y * b.x - a.x * b.y) / d; }\nvec3 pal(float t){ return 0.5 + 0.5 * cos(6.28318 * (t + vec3(0.0, 0.33, 0.67) + hue)); }\n\nvoid main(){\n  vec2 uv = (gl_FragCoord.xy - 0.5 * RENDERSIZE) / RENDERSIZE.y;\n  vec2 z = uv * zoom;\n\n  vec2 a = vec2(1.0, 0.0) + relax * 0.35 * vec2(cos(TIME * 0.3), sin(TIME * 0.3));   // animated complex relaxation\n\n  float it = 0.0;\n  for (int i = 0; i < 64; i++){\n    vec2 z2 = cmul(z, z);\n    vec2 f = cmul(z2, z) - vec2(1.0, 0.0);     // z^3 - 1\n    vec2 fp = 3.0 * z2;\n    z -= cmul(a, cdiv(f, fp));\n    it += 1.0;\n    if (dot(f, f) < 1e-6) break;\n  }\n\n  // which of the 3 cube roots did it land on\n  vec2 r0 = vec2(1.0, 0.0), r1 = vec2(-0.5, 0.8660254), r2 = vec2(-0.5, -0.8660254);\n  float d0 = length(z - r0), d1 = length(z - r1), d2 = length(z - r2);\n  float root = d0 < d1 ? (d0 < d2 ? 0.0 : 2.0) : (d1 < d2 ? 1.0 : 2.0);\n\n  float shade = it / 64.0;                       // slow convergence = near a basin boundary\n  vec3 basin = pal(root / 3.0);\n\n  // animated contour bands flowing toward the roots -> electric current in the basins\n  float band = 0.5 + 0.5 * sin(it * 0.7 - TIME * 1.2);\n  float frontier = smoothstep(0.1, 0.45, shade);\n\n  vec3 col = basin * (0.10 + 0.4 * band) * (1.0 - 0.6 * shade);   // dark basins with flowing contours\n  col += pal(root / 3.0 + 0.5) * frontier * (0.7 + glow) * 1.4;   // bright neon fractal frontier\n  col += vec3(1.0) * pow(frontier, 4.0) * 0.7 * glow;             // white-hot filigree on the edge\n\n  col *= 1.0 - 0.28 * dot(uv, uv);\n  col = col / (1.0 + 0.4 * col);\n  col = pow(max(col, 0.0), vec3(0.85));\n  gl_FragColor = vec4(col, 1.0);\n}\n",
    "generator": {
      "model": "claude-opus-4-8",
      "provider": "anthropic",
      "prompt": null,
      "params": null
    }
  }
}