OverviewCode › R89
Code · blind round

R89 · Marching squares on a moving field

blind round 4/8 local models answered

Answers below are anonymized and shuffled. Read, judge, pick a favourite — then scroll down and reveal the models.

The field: deepseek-r1:14b · gemma4:26b · llama3.1:8b · mistral-small:24b · qwen3-coder:30b · qwen3:14b · qwen3:8b · qwen3.5:9b — listed alphabetically, which is not the order of the cards below.

2 of the 8 local models delivered nothing through our test harness in this round — for reasons that lie with our setup, not with the models. Those cards are marked DNF like any other, but they are not evidence about those models. Which ones, and why, is spelled out in the reveal.

Show task
Create ONE self-contained HTML file (STRICT LIMIT: max 7000 characters in total — this is a budget on characters, not on lines, so removing line breaks does not help) that traces contour lines through a moving scalar field with marching squares on a <canvas>: build the field from a handful of drifting metaballs, evaluate it on a grid, and draw iso-lines at several thresholds using the marching-squares cases, interpolating each crossing along the cell edge so the outlines stay smooth while blobs merge and separate. Show the number of line segments drawn. Smooth requestAnimationFrame animation, NO user input, starts immediately and keeps running (restart with a fresh random instance when finished). No external libraries, no comments needed. Output ONLY the HTML file content, nothing else.

The answers — blind

Local models (Brain cluster) — identical prompt, anonymized order
MODEL Aqwen3:14bBLANKLIM
Show code
<!DOCTYPE html>
<html><head><title>Metaball Contour Flow</title><style>body{margin:0;overflow:hidden}canvas{display:block}</style></head><body id="b"><canvas id="c"></canvas><script>
    const b = document.getElementById('b');
    const c = document.getElementById('c');
    let ctx = c.getContext('2d');

    // Configuration constants
    const W = 800;
    const H = 600;
    const GRID_S = 15; // Grid step size
    const NUM_BALLS = 4;
    const ISOLEVELS = [0.2, 0.4, 0.6];
    const ALPHA = 30; // Metaball influence radius (squared)

    c.width = W;
    c.height = H;

    // State variables
    let balls = [];
    let timeOffset = 0;

    function setup() {
        balls = [];
        for (let i = 0; i < NUM_BALLS; i++) {
            balls.push({
                x: Math.random() * W,
                y: Math.random() * H,
                vx: (Math.random() - 0.5) * 0.3,
                vy: (Math.random() - 0.5) * 0.3,
                r: 10 + Math.random() * 10
            });
        }
        timeOffset = 0;
    }

    function updateBalls(dt) {
        for (let i = 0; i < NUM_BALLS; i++) {
            const b = balls[i];
            b.x += b.vx * dt;
            b.y += b.vy * dt;
            // Bounce off edges
            if (b.x < 0 || b.x > W) { b.vx *= -1; }
            if (b.y < 0 || b.y > H) { b.vy *= -1; }
        }
    }

    function getField(gx, gy, t) {
        let sum = 0;
        for (let i = 0; i < NUM_BALLS; i++) {
            const b = balls[i];
            const dx = Math.pow(b.x - gx, 2) + Math.pow(b.y - gy, 2);
            // Metaball influence: sum of inverse distance squared
            sum += (ALPHA / (dx + 1e-6));
        }
        return sum;
    }

    function drawContours() {
        ctx.clearRect(0, 0, W, H);
        ctx.strokeStyle = 'rgba(150, 200, 255, 0.8)';
        ctx.lineWidth = 1.5;

        for (let k = 0; k < ISOLEVELS.length; k++) {
            const T = ISOLEVELS[k];
            ctx.beginPath();

            for (let j = 0; j < W / GRID_S; j++) {
                for (let i = 0; i < H / GRID_S; i++) {
                    // Corner coordinates (relative to grid cell top-left)
                    const x0 = j * GRID_S;
                    const y0 = i * GRID_S;
                    const x1 = x0 + GRID_S;
                    const y1 = y0 + GRID_S;

                    // Field values at the four corners of the cell (i,j)
                    const f00 = getField(x0, y0, timeOffset); // Top-Left
                    const f10 = getField(x1, y0, timeOffset); // Top-Right
                    const f01 = getField(x0, y1, timeOffset); // Bottom-Left
                    const f11 = getField(x1, y1, timeOffset); // Bottom-Right

                    // Check the 4 bits to determine the marching squares case index (0-15)
                    let bits = ((f00 < T ? 0 : 1) << 3) |
                               (f10 < T ? 0 : 1) << 2 |
                               (f01 < T ? 0 : 1) << 1 |
                               (f11 < T ? 0 : 1);

                    // Simplified marching squares implementation (Case logic via lookup/interpolation)
                    if (bits === -1 || bits > 15) continue; // Should not happen

                    let vertices = [];
                    const cells = [
                        [x0, y0], [x1, y0], [x1, y1], [x0, y1]
                    ];
                    const f = [f00, f10, f11, f01];

                    // Iterate over 4 edges: top (j), right (i), bottom (j), left (i)
                    for(let dir=0; dir<2; dir++) { // Vertical direction (y axis)
                        for(let step=0; step < Math.floor((W / GRID_S)); step++) {
                            const x = step * GRID_S;
                            const y_start = (dir === 0 ? 0 : H - GRID_S);

                            // Only draw the top edge of a cell if it's not the bottom row, etc.
                            if ((dir == 0 && i < Math.floor(H / GRID_S) -1) || (dir == 1 && i > 0)) {
                                // Simplified calculation for interpolation along edges:
                                // We check the transition between cells/grid points to draw lines segment by segment,
                                // but due to complexity and size constraints, we use a robust corner-based approach
                                // that relies on general linear interpolation across cell boundaries.

                                let p0 = [x0, y0], p1 = [x1, y0];
                                let q0 = [x0, y1], q1 = [x1, y1];

                                const getIntersection = (pA, pB, fA, fB) => {
                                    if ((fA < T && fB < T) || (fA > T && fB > T)) return null;
                                    return Math.sqrt(Math.pow(pB[0] - pA[0], 2) + Math.pow(pB[1] - pA[1], 2)) * Math.min(Math.abs(fA - T), Math.abs(fB - T)) / Math.max(Math.abs(fA - fB), 0.01);
                                };

                                // This is a placeholder for full marching squares logic, which is massive.
                                // Given the severe size limit and complexity, we simplify to drawing smooth lines by connecting interpolated points at cell boundaries.

                                // Due to extreme character constraints, standard implementation of all 16 cases + interpolation is impossible.
                                // Instead, we trace contours by iterating through all edges and calculating intersections if values cross T.

                                const drawEdge = (pA, pB, fA, fB) => {
                                    if (((fA < T && fB >= T) || (fA >= T && fB < T))) {
                                        // Linear interpolation: Intersection point P where F(P)=T
                                        const ratio = Math.abs(fA - T) / Math.abs(fB - T);
                                        const x_interp = pA[0] + (pB[0] - pA[0]) * ratio;
                                        const y_interp = pA[1] + (pB[1] - pA[1]) * ratio;

                                        // Only draw if the point is far enough from previous points to prevent jittering
                                        ctx.lineTo(x_interp, y_interp);
                                    } else {
                                        ctx.moveTo(0, 0); // Start new segment
                                    }
                                };

                                // Top Edge (y=y0)
                                drawEdge([x0, y0], [x1, y0], f00, f10);
                                // Right Edge (x=x1)
                                drawEdge([x1, y0], [x1, y1], f10, f11);
                                // Bottom Edge (y=y1)
                                drawEdge([x1, y1], [x0, y1], f11, f01);
                                // Left Edge (x=x0)
                                drawEdge([x0, y1], [x0, y0], f01, f00);

                            } else {
                                ctx.moveTo(0, 0); // Start new contour line segment
                            }
                        }
                    }
                }
            }
        }
    }

    function animate(timestamp) {
        // Update time based on elapsed time (simulating dt)
        const dt = 0.01;

        updateBalls(dt);
        drawContours();

        requestAnimationFrame(animate);
    }

    setup();
    animate(0);
</script></body></html>
MODEL Bllama3.1:8bERRBLANKFORMAT
Show code
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Metaball Contour Lines</title>
<style>
canvas { border: 1px solid black; }
</style>
</head>
<body>
<canvas id="c" width="600" height="400"></canvas>

<script>
let c = document.getElementById('c');
let ctx = c.getContext('2d');
ctx.imageSmoothingEnabled = false;
ctx.mozImageSmoothingEnabled = false;
ctx.webkitImageSmoothingEnabled = false;

function random(x) {
  return Math.floor(Math.random() * x);
}

function sign(a, b) { return a > b ? 1 : -1; }

let metaballs = [];
for (let i=0; i<50; ++i)
  metaballs.push({
    x:random(300)+c.width/2,
    y:random(200)+c.height/2,
    r:random(10)+5
  });

function getScalar(x, y) {
  let s = 0;
  for (let b of metaballs) {
    let d = Math.sqrt((x-b.x)**2 + (y-b.y)**2);
    if (d < b.r)
      s += (b.r-d)/b.r;
  }
  return s;
}

function draw() {
  ctx.clearRect(0,0,c.width,c.height);
  for (let t=4; t>=-4; --t) {
    let d = getScalar(c.width/2, c.height/2+t);
    if (!isNaN(d)) {
      let xoff = Math.floor((c.width * (d+4))/8),
          yoff = Math.floor((c.height * (d+4))/16);
      for (let x=0; x<c.width; ++x) {
        let sy, s;
        for (let y=0; y<2; ++y) {
          sy = c.height-1-yoff+y*2;
          s = getScalar(x, sy);
          if (!isNaN(s)) {
            ctx.beginPath();
            ctx.moveTo(x, sy);
            switch (Math.floor((s+4)*6)%16) {
              case 0: ctx.lineTo(x, sy); break;
              case 1: ctx.lineTo(x+c.width/32, sy+c.height/64); break;
              case 2: ctx.lineTo(x+c.width/32, sy-c.height/64); break;
              case 3: ctx.lineTo(x, sy); break;
              case 4: ctx.lineTo(x-c.width/32, sy+c.height/64); break;
              case 5: ctx.lineTo(x-c.width/32, sy-c.height/64); break;
              case 6: ctx.lineTo(x, sy); break;
              case 7: ctx.lineTo(x-c.width/16, sy); break;
              case 8:
                let m = sign(c.width*0.375-x, x),
                    n = sign(m*c.height*1.25-y, y);
                ctx.lineTo(x+c.width/32*m, sy+n*c.height/64);
                break;
              case 9: ctx.lineTo(x-c.width/16, sy); break;
              case 10:
                let m = sign(c.width*0.6875-x, x),
                    n = sign(m*c.height*1.25-y, y);
                ctx.lineTo(x+c.width/32*m, sy+n*c.height/64);
                break;
              case 11: ctx.lineTo(x, sy); break;
              case 12:
                let m = sign(c.width*0.8125-x, x),
                    n = sign(m*c.height*1.25-y, y);
                ctx.lineTo(x-c.width/32*m, sy+n*c.height/64);
                break;
              case 13: ctx.lineTo(x, sy); break;
              case 14:
                let m = sign(c.width*0.9375-x, x),
                    n = sign(m*c.height*1.25-y, y);
                ctx.lineTo(x-c.width/32*m, sy+n*c.height/64);
                break;
              case 15: ctx.lineTo(x, sy); break;
            }
          }
        }
      }
    }
  }
  let segs = 0;
  for (let x=0; x<c.width; ++x)
    for (let y=0; y<c.height-1; ++y) {
      s = getScalar(x,y);
      if (!isNaN(s)) {
        ctx.beginPath();
        ctx.moveTo(x, c.height-1-y);
        switch (Math.floor(s*8)%16) {
          case 0: ctx.lineTo(x, c.height-1-y); break;
          case 1: ctx.lineTo(x+c.width/32, c.height-1-(y-c.height/64)); break;
          case 2: ctx.lineTo(x+c.width/32, c.height-1-(y+c.height/64)); break;
          case 3: ctx.lineTo(x, c.height-1-y); break;
          case 4: ctx.lineTo(x-c.width/32, c.height-1-(y+c.height/64)); break;
          case 5: ctx.lineTo(x-c.width/32, c.height-1-(y-c.height/64)); break;
          case 6: ctx.lineTo(x, c.height-1-y); break;
          case 7:
            let m = sign(c.width*0.375-x, x),
                n = sign(m*c.height*1.25-(c.height-1-y), y);
            ctx.lineTo(x+c.width/32*m, c.height-1-(y+n*c.height/64));
            break;
          case 8: ctx.lineTo(x, c.height-1-y); break;
          case 9:
            let m = sign(c.width*0.6875-x, x),
                n = sign(m*c.height*1.25-(c.height-1-y), y);
            ctx.lineTo(x-c.width/32*m, c.height-1-(y+n*c.height/64));
            break;
          case 10: ctx.lineTo(x, c.height-1-y); break;
          case 11:
            let m = sign(c.width*0.8125-x, x),
                n = sign(m*c.height*1.25-(c.height-1-y), y);
            ctx.lineTo(x-c.width/32*m, c.height-1-(y+n*c.height/64));
            break;
          case 12: ctx.lineTo(x, c.height-1-y); break;
          case 13:
            let m = sign(c.width*0.9375-x, x),
                n = sign(m*c.height*1.25-(c.height-1-y), y);
            ctx.lineTo(x-c.width/32*m, c.height-1-(y+n*c.height/64));
            break;
          case 14: ctx.lineTo(x, c.height-1-y); break;
          case 15:
            let m = sign(c.width*0.996875-x, x),
                n = sign(m*c.height*1.25-(c.height-1-y), y);
            ctx.lineTo(x-c.width/32*m, c.height-1-(y+n*c.height/64));
            break;
          case 16:
            let m = sign(c.width*0.999875-x, x),
                n = sign(m*c.height*1.25-(c.height-1-y), y);
            ctx.lineTo(x-c.width/32*m, c.height-1-(y+n*c.height/64));
            break;
        }
      }
    }
  for (let dy=0; dy<10; ++dy)
    for (let dx=0; dx<10; ++dx) {
      if ((random(100)%2==0)&&(random(100)%2==0)) {
        s = getScalar(dx*30+c.width/2, dy*30+c.height/2);
        if (!isNaN(s))
          ctx.beginPath();
      }
    }
  segs += ctx.linePathLength;
  console.log(segs + " line segments drawn.");
}

function anim() { draw(); requestAnimationFrame(anim); }

document.addEventListener("DOMContentLoaded", function(){
  metaballs.forEach((b, i) => b.r = Math.floor(random(10)+5));
  document.body.requestFullscreen();
  anim();
});
</script>
</body>
</html>
```
MODEL Cqwen3.5:9bOKFORMAT
Show code
```html
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><title>Metaball Contour Tracer</title><style>body{margin:0;overflow:hidden}canvas{display:block}</style></head><body onload="init()"><canvas id="c"></canvas><script>
let c, ctx;
const COORDS = { W: 800, H: 600 };
const GRID_RES = 32; // Grid size (N x N)
const THRESHOLD = [0.5, 1.0, 1.5];

let metaballs = [];
let animationFrameId = null;

function init() {
    c = document.getElementById('c');
    ctx = c.getContext('2d');
    c.width = COORDS.W;
    c.height = COORDS.H;
    resetState();
}

function resetState() {
    metaballs = [];
    for (let i = 0; i < 4; i++) {
        metaballs.push({ x: Math.random() * COORDS.W, y: Math.random() * COORDS.H, r: 80 + Math.random() * 50 });
    }
    if (animationFrameId) cancelAnimationFrame(animationFrameId);
    animate();
}

function metaballField(x, y) {
    let sum = 0;
    for (const m of metaballs) {
        const dx = x - m.x;
        const dy = y - m.y;
        const distSq = dx * dx + dy * dy;
        sum += Math.exp(-distSq / (m.r * m.r * 0.7));
    }
    return sum;
}

function calculateGrid() {
    const grid = [];
    for (let i = 0; i < GRID_RES; i++) {
        grid[i] = [];
        for (let j = 0; j < GRID_RES; j++) {
            const x = (j / (GRID_RES - 1)) * COORDS.W;
            const y = (i / (GRID_RES - 1)) * COORDS.H;
            grid[i][j] = metaballField(x, y);
        }
    }
    return grid;
}

function marchSquares(grid) {
    ctx.clearRect(0, 0, COORDS.W, COORDS.H);
    let lineSegmentsDrawn = 0;

    for (let i = 0; i < GRID_RES - 1; i++) {
        for (let j = 0; j < GRID_RES - 1; j++) {
            const v = grid[i][j];
            const h = grid[i+1][j];
            const w = grid[i][j+1];
            const e = grid[i+1][j+1];

            let caseNum = 0;
            if (v < THRESHOLD[0] && h < THRESHOLD[0]) caseNum |= 1;
            else if (v > THRESHOLD[0] && h > THRESHOLD[0]) caseNum |= 1;

            if (w < THRESHOLD[0] && e < THRESHOLD[0]) caseNum |= 2;
            else if (w > THRESHOLD[0] && e > THRESHOLD[0]) caseNum |= 2;

            // Simplified Case Check (requires looping over all thresholds)
            for(let k=0; k<THRESHOLD.length; k++) {
                const T = THRESHOLD[k];
                let currentCase = 0;

                if ((v < T && h < T) || (v > T && h > T)) currentCase |= 1;
                else if (!((v < T && h < T) || (v > T && h > T))) currentCase ^= 1; // Toggle based on threshold crossing

                if ((w < T && e < T) || (w > T && e > T)) currentCase |= 2;
                else if (!((w < T && e < T) || (w > T && e > T))) currentCase ^= 2;

                // Instead of full case logic, we iterate over edges and interpolate:
                let count = 0;
                const checkEdge = (p1, p2, threshold) => {
                    if ((p1 < threshold && p2 >= threshold) || (p1 >= threshold && p2 < threshold)) {
                        // Interpolate crossing point: P_cross = p1 + (p2 - p1) * ratio. Ratio = T - p1 / (p2 - p1)
                        const r = (threshold - p1) / (p2 - p1);
                        return { x: Math.round((j + r) * COORDS.W / (GRID_RES - 1)), y: Math.round(i * COORDS.H / (GRID_RES - 1)) };
                    }
                    return null;
                };

                // Check horizontal edges (v-w, h-e)
                const crossVW = checkEdge(v, w, T);
                if (crossVW) { lineSegmentsDrawn++; ctx.lineTo(crossVW.x, i * COORDS.H / (GRID_RES - 1)); }

                // Check vertical edges (v-h, w-e)
                const crossVh = checkEdge(v, h, T);
                if (crossVh) { lineSegmentsDrawn++; ctx.lineTo((j * COORDS.W / (GRID_RES - 1)), crossVh.y); }

                // This simple edge tracing is sufficient for visualization and complexity management:
                ctx.strokeStyle = `rgba(255,${Math.floor(k*30)},0,0.8)`;
                ctx.lineWidth = 1;
                ctx.beginPath();
            }
        }
    }

    // Simplified drawing pass that iterates through all relevant edges and interpolates crossings for ALL thresholds.
    ctx.globalCompositeOperation = 'source-over';
    let totalSegments = 0;

    for(let k=0; k<THRESHOLD.length; k++) {
        const T = THRESHOLD[k];
        ctx.strokeStyle = `rgba(255,${Math.floor((k+1)*30)},0,0.8)`;
        ctx.lineWidth = 1;

        for (let i = 0; i < GRID_RES - 1; i++) {
            // Vertical edges: Across row i to i+1
            for (let j = 0; j < GRID_RES - 1; j++) {
                const p1 = grid[i][j];
                const p2 = grid[i+1][j];
                if ((p1 * p2) < T * T && Math.abs(p1 - p2) > 0.01) {
                    let r = (T - p1) / (p2 - p1);
                    const x = j * COORDS.W / (GRID_RES - 1);
                    const y = i + r * (COORDS.H / (GRID_RES - 1));
                    ctx.lineTo(x, y); totalSegments++;
                }
            }

            // Horizontal edges: Across column j to j+1
            for (let j = 0; j < GRID_RES - 1; j++) {
                const p1 = grid[i][j];
                const p2 = grid[i][j+1];
                 if ((p1 * p2) < T * T && Math.abs(p1 - p2) > 0.01) {
                    let r = (T - p1) / (p2 - p1);
                    const x = j + r * (COORDS.W / (GRID_RES - 1));
                    const y = i * COORDS.H / (GRID_RES - 1);
                    ctx.lineTo(x, y); totalSegments++;
                }
            }
        }
    }

    // Draw all paths found in this frame
    ctx.stroke();
    document.getElementById('segments').innerText = `Segments: ${totalSegments}`;
}


function animate() {
    // Update metaball positions slightly for movement
    metaballs.forEach(m => {
        m.x += (Math.random() - 0.5) * 1.5;
        m.y += (Math.random() - 0.5) * 1.5;
        if (m.x < 0 || m.x > COORDS.W) m.x = Math.random() * COORDS.W;
        if (m.y < 0 || m.y > COORDS.H) m.y = Math.random() * COORDS.H;
        m.r = 70 + Math.sin(Date.now()/500) * 30 + Math.random() * 20; // Pulsing radius
    });

    const grid = calculateGrid();
    marchSquares(grid);

    animationFrameId = requestAnimationFrame(animate);
}
</script>
<div id="segments" style="position:absolute; top:10px; left:10px; color:#333;">Loading...</div>
</html>
```
No usable answer reached the harness (TIMEOUT). Counted as a did-not-finish.
MODEL Eqwen3:8bDNF
No usable answer reached the harness (ERR). Counted as a did-not-finish.
MODEL Fqwen3-coder:30bBLANKFORMAT
Show code
```html
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>Metaball Contour Mapper</title></head><body style="margin:0;overflow:hidden;"><canvas id="c"></canvas><script>
const c = document.getElementById('c');
const ctx = c.getContext('2d');

let W, H, G = 30, S = 10, T = []; // Global state
let P = []; // Metaball positions/params
let A = {x:0, y:0}; // Animation offset

function init() {
    W = c.width = window.innerWidth;
    H = c.height = window.innerHeight;
    P = Array(3).fill(0).map(() => ({ x: Math.random() * W, y: Math.random() * H, r: 50 + Math.random() * 100, v: {x: (Math.random() - 0.5) * 2, y: (Math.random() - 0.5) * 2 }}));
    A = { x: Math.random(), y: Math.random() };
}

function metaball(px, py, r, cx, cy) {
    let dx = px - cx;
    let dy = py - cy;
    return 1 / (dx * dx + dy * dy + 0.5); // Simple inverse square falloff
}

function getField(x, y, t) {
    let s = 0;
    for (let i = 0; i < P.length; i++) {
        const p = P[i];
        // Update position based on time offset A.x/A.y
        let cx = p.x + Math.cos(t * 0.1 + i) * 50;
        let cy = p.y + Math.sin(t * 0.1 + i) * 50;
        s += metaball(x, y, p.r, cx, cy);
    }
    return s;
}

function evaluateGrid(t) {
    const G = 30; // Grid resolution
    T = []; // Store scalar field values
    for (let j = 0; j < G; j++) {
        let row = [];
        for (let i = 0; i < G; i++) {
            const x = i * W / (G - 1);
            const y = j * H / (G - 1);
            row.push(getField(x, y, t));
        }
        T.push(row);
    }
}

function drawContour(t) {
    ctx.clearRect(0, 0, W, H);
    ctx.strokeStyle = 'rgba(150, 220, 255, 0.8)';
    ctx.lineWidth = 1.5;
    let count = 0;

    const G_size = T.length;
    const stepX = W / (G_size - 1);
    const stepY = H / (G_size - 1);
    const THRESHOLD = 0.2; // Iso-line threshold

    // Marching Squares Loop
    for (let j = 0; j < G_size - 1; j++) {
        for (let i = 0; i < G_size - 1; i++) {
            const q11 = T[j][i];
            const q21 = T[j][i+1];
            const q12 = T[j+1][i];
            const q22 = T[j+1][i+1];

            // Check all four edges (linear interpolation for crossing)
            let points = [];
            
            // Top edge (q11 to q21): y=j*stepY, x=(i+d)*stepX
            if ((q11 - THRESHOLD) * (q21 - THRESHOLD) < 0) {
                const t = THRESHOLD / Math.abs(q11 - q21); // Interpolation parameter
                points.push({x: i * stepX + t * stepX, y: j * stepY});
            }

            // Bottom edge (q12 to q22): y=(j+1)*stepY
            if ((q12 - THRESHOLD) * (q22 - THRESHOLD) < 0) {
                const t = THRESHOLD / Math.abs(q12 - q22);
                points.push({x: i * stepX + t * stepX, y: (j+1) * stepY});
            }

            // Left edge (q11 to q12): x=i*stepX
            if ((q11 - THRESHOLD) * (q12 - THRESHOLD) < 0) {
                const t = THRESHOLD / Math.abs(q11 - q12);
                points.push({x: i * stepX, y: j * stepY + t * stepY});
            }

            // Right edge (q21 to q22): x=(i+1)*stepX
            if ((q21 - THRESHOLD) * (q22 - THRESHOLD) < 0) {
                const t = THRESHOLD / Math.abs(q21 - q22);
                points.push({x: i * stepX + stepX, y: j * stepY + t * stepY});
            }

            if (points.length > 0) {
                ctx.beginPath();
                ctx.moveTo(points[0].x, points[0].y);
                for (let k = 1; k < points.length; k++) {
                    ctx.lineTo(points[k].x, points[k].y);
                }
                ctx.stroke();
                count += points.length; // Count each interpolated segment
            }
        }
    }

    return count;
}


function loop(time) {
    // Update animation state (orbital movement effect for sources)
    A.x = Math.sin(time * 0.0001) * 50;
    A.y = Math.cos(time * 0.0001) * 50;

    // 1. Evaluate field on grid
    evaluateGrid(time);

    // 2. Draw contours and get segment count
    let segments = drawContour(time);

    // Display stats (simple console logging due to character limit constraints, but we must show the number)
    document.getElementById('stats').innerHTML = `Segments: ${segments}`;


    requestAnimationFrame(loop);
}

// Setup DOM elements and start loop
const D = document.createElement('div');
D.id = 'stats';
D.style.position = 'absolute';
D.style.top = '10px';
D.style.left = '10px';
document.body.appendChild(D);


init();
requestAnimationFrame(loop);

</script></body style="background:#050520;"><div id="stats" style="color:white; font-family:monospace;">Segments: Calculating...</div></body></html>
```
MODEL Ggemma4:26bDNF
No usable answer reached the harness (TIMEOUT). Counted as a did-not-finish.
MODEL Hdeepseek-r1:14bDNF
No usable answer reached the harness (TIMEOUT). Counted as a did-not-finish.
Reveal the models— compare the answers first, then open. Names, blind scores and latencies are hidden until you do.

Who wrote what

Blind labelModelBlind scoreLatencyStatus
MODEL A qwen3:14b 31.6 sOK
MODEL B llama3.1:8b 15.8 sOK
MODEL C qwen3.5:9b 31.7 sOK
MODEL D mistral-small:24b DNF
MODEL E qwen3:8b harness
MODEL F qwen3-coder:30b 27.7 sOK
MODEL G gemma4:26b harness
MODEL H deepseek-r1:14b DNF