{
  "format": "field",
  "version": 1,
  "meta": {
    "name": "Rayleigh Benard Convection",
    "author": "Infinite",
    "description": "Thermal Rayleigh-Benard fluid convection cells with domain-warped buoyancy plumes, rolling thermal vortices, and indigo-to-amber heat mapping.",
    "domain": "pixel"
  },
  "device": {
    "code": "# Rayleigh Benard Convection (Field Pixel)\nparam float cell_scale = 5.5 [2.0, 12.0];\nparam float buoyancy = 0.55 [0.1, 1.2];\nparam float heat_contrast = 1.25 [0.6, 2.0];\n\np = vec2((uv.x - 0.5) * aspect, uv.y - 0.5) * cell_scale;\n\n# Multi-stage domain-warped thermal convection rolls\nq1 = vec2(sin(p.y * 1.3 + t * 0.45), cos(p.x * 1.3 - t * 0.38)) * buoyancy;\np1 = p + q1;\nq2 = vec2(cos(p1.y * 2.1 - t * 0.62), sin(p1.x * 2.1 + t * 0.54)) * (buoyancy * 0.65);\np2 = p1 + q2;\n\n# Cellular convection potential & ridge boundaries\ncellA = sin(p2.x * 1.8) * cos(p2.y * 1.8);\ncellB = sin((p2.x + p2.y) * 1.35 + t * 0.3) * cos((p2.x - p2.y) * 1.35);\ntemp = clamp((cellA * 0.6 + cellB * 0.4) * 0.5 * heat_contrast + 0.5, 0.0, 1.0);\n\n# Thermal palette: deep indigo-teal sink -> warm ochre -> incandescent sienna\ncCool = vec3(0.055, 0.135, 0.245);\ncMid = vec3(0.140, 0.460, 0.490);\ncWarm = vec3(0.890, 0.580, 0.140);\ncHot = vec3(0.950, 0.290, 0.120);\n\nc0 = mix(cCool, cMid, smoothstep(0.05, 0.42, temp));\nc1 = mix(c0, cWarm, smoothstep(0.42, 0.74, temp));\ncol = clamp(mix(c1, cHot, smoothstep(0.74, 0.96, temp)), 0.0, 1.0);\n",
    "params": {
      "cell_scale": 5.5,
      "buoyancy": 0.55,
      "heat_contrast": 1.25
    }
  }
}