OverviewCode › R117
Code · blind round

R117 · De Casteljau construction of a Bezier curve

blind round 10/11 local models answered

Every answer below carries the name of the model that wrote it. Blind refers to the scoring: the review was done without knowing which model produced which answer — the published result names them.

1 of the 11 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 — the reason is noted on the card itself.

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 animates the De Casteljau construction on a <canvas>: take four control points that drift slowly, and for a parameter t sweeping from 0 to 1 draw the intermediate interpolation points and the lines connecting them, plus the traced curve itself, so the geometric construction of the Bezier curve is visible rather than just its result. Show t and the control-point positions. 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

Local models (Brain cluster) — identical prompt, shuffled order (the sequence is not a ranking)
qwen3-coder:30bBLANKFORMAT
Show code
```html
<!DOCTYPE html>
<html>
<head>
<title>De Casteljau Animation</title>
<style>body {margin:0;overflow:hidden;background-color:#111;}canvas {display:block;}</style>
</head>
<body>
<canvas id="c"></canvas>
<script>
const canvas = document.getElementById('c');
const ctx = canvas.getContext('2d');

let W, H;
let P = []; // Control points [x, y] for 4 points
let t_val = 0;
let animationFrameId;

function resize() {
    W = window.innerWidth;
    H = window.innerHeight;
    canvas.width = W;
    canvas.height = H * 0.85;
}
window.addEventListener('resize', resize);
resize();


function initPoints(seed) {
    // Initialize points in a stable area, slightly offset for movement visualization
    P[0] = [W * 0.1 + Math.cos(seed/2), H * 0.3];
    P[1] = [W * 0.5 - W * 0.2, H * 0.7];
    P[2] = [W * 0.5 + W * 0.2, H * 0.7];
    P[3] = [W * 0.9 - Math.cos(seed/2), H * 0.3];
}

function updatePoints() {
    // Slow drift simulation using sine waves based on time
    const offsetFactor = 0.5;
    const speed = 0.001;
    
    P[0][0] = W * 0.1 + Math.cos(Date.now() * speed) * offsetFactor;
    P[0][1] = H * 0.3 + Math.sin(Date.now() * speed * 0.7) * offsetFactor;

    P[1][0] = W * 0.5 - W * 0.2 + Math.sin(Date.now() * speed * 0.9) * offsetFactor;
    P[1][1] = H * 0.7 + Math.cos(Date.now() * speed) * offsetFactor;

    P[2][0] = W * 0.5 + W * 0.2 + Math.cos(Date.now() * speed * 0.9) * offsetFactor;
    P[2][1] = H * 0.7 + Math.sin(Date.now() * speed * 0.9) * offsetFactor;

    P[3][0] = W * 0.9 - Math.cos(Date.now() * speed) * offsetFactor;
    P[3][1] = H * 0.3 + Math.sin(Date.now() * speed * 0.7) * offsetFactor;
}

function lerp(A, B, t) {
    return [A[0] * (1 - t) + B[0] * t, A[1] * (1 - t) + B[1] * t];
}

function drawDeCasteljau(t) {
    ctx.clearRect(0, 0, W, H);
    ctx.fillStyle = '#111';
    ctx.fillRect(0, 0, W, H);

    // Calculate intermediate points (Levels 1, 2, 3)
    let L = [];
    L[4] = P; // Level 0: Control Points

    for (let j = 0; j < 3; j++) { // Loop through levels (j=0 is level 1, j=2 is level 3)
        const currentLevel = [];
        for (let i = 0; i < L[4].length - j; i++) {
            currentLevel.push(lerp(L[4][i], L[4][i + 1], t));
        }
        L[j] = currentLevel; // Store the level points (L[3] is the final curve point)
    }

    // --- Drawing the construction lines and points ---
    ctx.strokeStyle = 'rgba(100, 150, 255, 0.4)';
    ctx.lineWidth = 1;

    // Draw connections between levels (L[j] to L[j+1])
    for (let j = 0; j < 3; j++) {
        const levelPoints = L[j];
        for (let i = 0; i < levelPoints.length - 1; i++) {
            ctx.beginPath();
            ctx.moveTo(levelPoints[i][0], levelPoints[i][1]);
            ctx.lineTo(levelPoints[i + 1][0], levelPoints[i + 1][1]);
            ctx.stroke();
        }
    }

    // Draw the final curve path (L[3] points)
    ctx.strokeStyle = 'rgba(255, 165, 0, 1)';
    ctx.lineWidth = 3;
    ctx.beginPath();
    ctx.moveTo(L[4][0][0], L[4][0][1]); // Start at P0
    for (let j = 1; j < 4; j++) {
        // We need to trace the curve segment by segment, not just connect the points calculated above
        // But since we are animating t from 0 to 1, we draw the curve defined by L[3]
        if (j === 1) ctx.moveTo(L[3][0][0], L[3][0][1]);
        ctx.lineTo(L[3][j-1][0], L[3][j-1][1]);
    }

    // Simplified: Just draw the final curve segment based on the calculated points at t.
    ctx.strokeStyle = 'rgba(255, 165, 0, 1)';
    ctx.lineWidth = 3;
    ctx.beginPath();
    ctx.moveTo(L[4][0][0], L[4][0][1]); // Start at P0 (for visual anchor)
    // We draw the curve by connecting points generated by calculating B(t_prev) and B(t_curr), 
    // but since we only track one 't', we just draw the segment up to the final point.
    ctx.moveTo(W*0.1, H*0.3); // This is too simple. Let's trust L[3] represents the endpoint of the current t.

    // Re-implementing curve drawing correctly: The overall construction shows how the point B(t) is formed by the lines.
    ctx.strokeStyle = 'rgba(255, 165, 0, 1)';
    ctx.lineWidth = 3;
    ctx.beginPath();
    // Start at t=0 (P0) and draw to current P_final(t)
    ctx.moveTo(L[4][0][0], L[4][0][1]); // Move to the starting point of the whole process
    for (let k = 1; k < 4; k++) {
        // This section is tricky for a single frame draw. We draw the line segment connecting P0's initial position and the current B(t).
        // For visualization, we just connect the points calculated by L[3].
    }
    ctx.lineTo(L[3][2][0], L[3][2][1]); // The final point after 4 stages of prediction

    // --- Drawing Control Points (The anchors) ---
    ctx.fillStyle = '#99ccff';
    P.forEach(p => {
        ctx.beginPath();
        ctx.arc(p[0], p[1], 5, 0, Math.PI * 2);
        ctx.fill();
    });

    // --- Display Info (t and Points) ---
    ctx.fillStyle = '#eee';
    ctx.font = '14px monospace';
    let info = `t: ${t_val.toFixed(3)}<br>`;
    info += `P0: (${P[0][0].toFixed(2)}, ${P[0][1].toFixed(2)})<br>`;
    info += `P1: (${P[1][0].toFixed(2)}, ${P[1][1].toFixed(2)})<br>`;
    info += `P2: (${P[2][0].toFixed(2)}, ${P[2][1].toFixed(2)})<br>`;
    info += `P3: (${P[3][0].toFixed(2)}, ${P[3][1].toFixed(2)})`;

    ctx.fillText(info, 10, 20);
}


function animate() {
    updatePoints();

    // Increment t_val (slowly sweeps from 0 to 1, then resets)
    t_val += 0.005;
    if (t_val >
qwen3.5:9bERRSTATFORMAT
Show code
```html
<!DOCTYPE html>
<html><head><title>De Casteljau Animation</title></head><body style="background:#111;margin:0;"><canvas id="c" width="800" height="600" style="display:block;"></canvas><script>
const c = document.getElementById('c');
const ctx = c.getContext('2d');

let P = []; // Control Points [x, y]
let time = 0;
let animationFrameId = null;

function initPoints(seed) {
    P[0] = [Math.random() * 150 + seed*10 % 100, Math.random() * 200 + seed*20 % 20];
    P[1] = [Math.random() * 400 - 100 + seed*30 % 50, Math.random() * 300 + seed*40 % 30];
    P[2] = [Math.random() * 550 - 100 + seed*60 % 50, Math.random() * 250 + seed*80 % 20];
    P[3] = [Math.random() * 700 - 100 + seed*90 % 50, Math.random() * 100 + seed*10 % 10];
}

function updatePoints(t) {
    const offsetX = Math.sin(time * 0.0005 + 1) * 150;
    const offsetY = Math.cos(time * 0.0003 + 2) * 80;
    
    // Drift based on time and initial random offset
    P[0][0] = P[0][0] + Math.sin(t/5) * 1 * (Math.cos(time*0.0001) + 1);
    P[0][1] = P[0][1] - Math.cos(t/7) * 1 * (Math.sin(time*0.0002) + 1);

    P[1][0] = P[1][0] + Math.sin(t/3) * 1 * (Math.cos(time*0.0001) + 1);
    P[1][1] = P[1][1] - Math.cos(t/5) * 1 * (Math.sin(time*0.0002) + 1);

    P[2][0] = P[2][0] + Math.sin(t/4) * 1 * (Math.cos(time*0.0001) + 1);
    P[2][1] = P[2][1] - Math.cos(t/3) * 1 * (Math.sin(time*0.0002) + 1);

    P[3][0] = P[3][0] + Math.sin(t/6) * 1 * (Math.cos(time*0.0001) + 1);
    P[3][1] = P[3][1] - Math.cos(t/4) * 1 * (Math.sin(time*0.0002) + 1);

}

function deCasteljau(pts, t) {
    let result = [...pts];
    for (let k = 0; k < pts.length - 1; k++) {
        let nextLevel = [];
        for (let i = 0; i < pts.length - 1; i++) {
            const p0 = pts[i];
            const p1 = pts[i + 1];
            nextLevel.push([p0[0] * (1 - t) + p1[0] * t, p0[1] * (1 - t) + p1[1] * t]);
        }
        result = nextLevel;
    }
    return result[0]; // The final point is the sole remaining element
}

function draw(t) {
    ctx.clearRect(0, 0, c.width, c.height);
    
    // --- Draw Initial Control Polygon and Lines ---
    ctx.strokeStyle = '#444';
    ctx.lineWidth = 1;
    ctx.beginPath();
    for (let i = 0; i < P.length - 1; i++) {
        ctx.moveTo(P[i][0], P[i][1]);
        ctx.lineTo(P[i+1][0], P[i+1][1]);
    }
    ctx.stroke();

    // --- De Casteljau Construction Levels (Intermediate Points) ---
    const levels = [];
    let currentLevel = [...P];
    for (let k = 0; k < P.length - 1; k++) {
        let nextLevel = [];
        for (let i = 0; i < P.length - 1; i++) {
            const p0 = currentLevel[i];
            const p1 = currentLevel[i + 1];
            nextLevel.push([p0[0] * (1 - t) + p1[0] * t, p0[1] * (1 - t) + p1[1] * t]);
        }
        levels.push(nextLevel);
        currentLevel = nextLevel;
    }

    // Draw lines connecting intermediate points at parameter t
    ctx.strokeStyle = '#888';
    ctx.lineWidth = 0.5;
    for (let k = 0; k < P.length - 1; k++) {
        const levelPoints = levels[k];
        if (!levelPoints) continue;

        // Connect points horizontally at this level for parameter t
        ctx.beginPath();
        ctx.moveTo(levelPoints[0][0], levelPoints[0][1]);
        for (let i = 1; i < levelPoints.length; i++) {
            ctx.lineTo(levelPoints[i][0], levelPoints[i][1]);
        }
        ctx.stroke();

        // Draw connecting lines from P_k to P_{k+1} for parameter t (the linear segment)
        for (let i = 0; i < P.length - 2; i++) {
            const pA = levels[k][i];
            const pB = levels[k][i + 1];
            ctx.beginPath();
            ctx.moveTo(pA[0], pA[1]);
            ctx.lineTo(pB[0], pB[1]);
            ctx.stroke();
        }
    }

    // --- Draw the final Bezier Curve and Points ---
    ctx.strokeStyle = '#0f0';
    ctx.lineWidth = 2;
    ctx.beginPath();
    ctx.moveTo(P[0][0], P[0][1]);
    for (let i = 1; i < c.width * 0.95; i++) {
        const t_step = Math.min(1, i / (c.width * 0.95)); // Normalize step to [0, 1]
        // Calculate the point on the curve using De Casteljau at normalized time
        const nextPoint = deCasteljau(P, t_step);
        ctx.lineTo(nextPoint[0], nextPoint[1]);
    }
    ctx.stroke();

    // Draw Control Points
    ctx.fillStyle = '#fff';
    for (let i = 0; i < P.length; i++) {
        ctx.beginPath();
        ctx.arc(P[i][0], P[i][1], 5, 0, Math.PI * 2);
        ctx.fill();
    }

    // --- Display Status (t and CP positions) ---
    const status = `t=${t.toFixed(3)} | P0:(${P[0][0].toFixed(1)},${P[0][1].toFixed(1)}) | P1:(${P[1][0].toFixed(1)},${P[1][1].toFixed(1)}) | P2:(${P[2][0].toFixed(1)},${P[2][1].toFixed(1)}) | P3:(${P[3][0].toFixed(1)},${P[3][1].toFixed(1)})`;
    ctx.fillStyle = '#ccc';
    ctx.font = '14px monospace';
    ctx.fillText(status, 10, 20);
}

function animate(timestamp) {
    time = timestamp;
    const t_param = (Math.sin(time * 0.0005) + Math.cos(time * 0.0003)) / 2; // Smoothly oscillates between -1 and 1, then scaled to [0, 1]

    updatePoints(t_param);
    draw(t_param);

    animationFrameId = requestAnimationFrame(animate);
}

// Initialization sequence
initPoints(Math.random());
requestAnimationFrame(animate);
</script></body></html>
```
qwen3:8bharness
No answer reached us (ERR) — and the reason lies with our setup, not with the model: reasoning consumed the entire token budget and the answer stayed empty; the gateway rejects budgets above 3000 tokens Counted as a did-not-finish, but it is not evidence about this model.
mistral-small:24bERRSTATFORMAT
Show code
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>De Casteljau Construction</title>
<style>
canvas { border: 1px solid black; }
#info { position: absolute; top: 10px; left: 10px; color: white; background: rgba(0, 0, 0, 0.5); padding: 5px; font-family: Arial, sans-serif; font-size: 14px; }
</style>
</head>
<body style="background-color:#000;">
<canvas id="bezierCanvas" width="800" height="600"></canvas>
<div id="info"></div>
<script>
const canvas = document.getElementById('bezierCanvas');
const ctx = canvas.getContext('2d');
const infoDiv = document.getElementById('info');

let controlPoints = [];
let t = 0;
let increment = 0.01;

function getRandomPoint() {
    return { x: Math.random() * canvas.width, y: Math.random() * canvas.height };
}

function initControlPoints() {
    controlPoints = [getRandomPoint(), getRandomPoint(), getRandomPoint(), getRandomPoint()];
}

function drawPoint(ctx, point) {
    ctx.beginPath();
    ctx.arc(point.x, point.y, 5, 0, 2 * Math.PI);
    ctx.fillStyle = 'white';
    ctx.fill();
}

function interpolate(p1, p2, t) {
    return { x: (1 - t) * p1.x + t * p2.x, y: (1 - t) * p1.y + t * p2.y };
}

function drawLine(ctx, p1, p2) {
    ctx.beginPath();
    ctx.moveTo(p1.x, p1.y);
    ctx.lineTo(p2.x, p2.y);
    ctx.strokeStyle = 'white';
    ctx.stroke();
}

function drawControlPoints() {
    controlPoints.forEach(point => drawPoint(ctx, point));
}

function deCasteljau(t) {
    let points = [...controlPoints];
    for (let i = 1; i < 4; i++) {
        const newPoints = [];
        for (let j = 0; j < 4 - i; j++) {
            const p = interpolate(points[j], points[j + 1], t);
            drawPoint(ctx, p);
            if (j > 0) drawLine(ctx, lastP, p);
            newPoints.push(p);
        }
        points = newPoints;
    }
}

function animate() {
    ctx.clearRect(0, 0, canvas.width, canvas.height);

    controlPoints.forEach((point, index) => {
        point.x += (Math.random() - 0.5) * 2;
        point.y += (Math.random() - 0.5) * 2;
    });

    drawControlPoints();
    deCasteljau(t);

    infoDiv.innerHTML = `t: ${t.toFixed(2)}<br>P1: (${controlPoints[0].x.toFixed(0)}, ${controlPoints[0].y.toFixed(0)})<br>P2: (${controlPoints[1].x.toFixed(0)}, ${controlPoints[1].y.toFixed(0)})<br>P3: (${controlPoints[2].x.toFixed(0)}, ${controlPoints[2].y.toFixed(0)})<br>P4: (${controlPoints[3].x.toFixed(0)}, ${controlPoints[3].y.toFixed(0)})`;

    t += increment;
    if (t > 1) {
        initControlPoints();
        t = 0;
    }

    requestAnimationFrame(animate);
}

initControlPoints();
animate();
</script>
</body>
</html>
```
gemma4:26bBLANKFORMAT
Show code
```html
<!DOCTYPE html>
<html style="background:#111;margin:0;overflow:hidden">
<body style="margin:0;overflow:hidden">
<canvas id="c"></canvas>
<script>
const canvas = document.getElementById('c');
const ctx = canvas.getContext('2d');
let points = [], history = [], t = 0, time = 0;

function init() {
    const w = canvas.width = window.innerWidth;
    const h = canvas.height = window.innerHeight;
    points = Array.from({length: 4}, () => ({
        x: Math.random() * (w - 200) + 100,
        y: Math.random() * (h - 200) + 100,
        ox: Math.random() * 100,
        oy: Math.random() * 100
    }));
    history = [];
    t = 0;
}

function lerp(a, b, t) {
    return { x: a.x + (b.x - a.x) * t, y: a.y + (b.y - a.y) * t };
}

function draw() {
    ctx.clearRect(0, 0, canvas.width, canvas.height);
    time += 0.01;
    t += 0.005;

    if (t > 1) {
        t = 0;
        history = [];
        init();
    }

    // Smoothly drift points
    points.forEach((p, i) => {
        p.x = p.ox + Math.sin(time + i) * 50;
        p.y = p.oy + Math.cos(time * 0.8 + i) * 50;
    });

    // De Casteljau calculation
    const [p0, p1, p2, p3] = points;
    const l0 = lerp(p0, p1, t);
    const l1 = lerp(p1, p2, t);
    const l2 = lerp(p2, p3, t);
    const q0 = lerp(l0, l1, t);
    const q1 = lerp(l1, l2, t);
    const b = lerp(q0, q1, t);

    history.push({x: b.x, y: b.y});

    // Draw Curve
    ctx.beginPath();
    ctx.strokeStyle = '#fff';
    ctx.lineWidth = 3;
    ctx.lineJoin = 'round';
    history.forEach((p, i) => i === 0 ? ctx.moveTo(p.x, p.y) : ctx.lineTo(p.x, p.y));
    ctx.stroke();

    // Draw Level 0 (Control Points & Skeleton)
    ctx.lineWidth = 1;
    ctx.setLineDash([5, 5]);
    ctx.strokeStyle = '#555';
    ctx.beginPath();
    ctx.moveTo(p0.x, p0.y);
    [p1, p2, p, p3].forEach(p => ctx.lineTo(p.x,
deepseek-r1:14bERRBLANKFORMAT
Show code
```html
<!DOCTYPE html>
<html><body style="margin:0;overflow:hidden;">
<canvas id="c"></canvas>
<div style="position:absolute;top:10px;left:10px;font-family:Arial;">t=<span id="t">0</span></div>
<div style="position:absolute;top:40px;left:10px;">A:<span id="a" style="color:red;"></span></div>
<div style="position:absolute;top:60px;left:10px;">B:<span id="b" style="color:green;"></span></div>
<div style="position:absolute;top:80px;left:10px;">C:<span id="c2" style="color:blue;"></span></div>
<div style="position:absolute;top:100px;left:10px;">D:<span id="d" style="color:magenta;"></span></div>

<script>
const c = document.getElementById('c'), ctx=c.getContext('2d');
let t=0,a,b,c2,d,animId;
function init(){a={x:Math.random()*400-200,y:(Math.random()+1)*150};b={x:a.x+200+Math.random()*150,y:a.y+(Math.random()-0.5)*100};
c2={x:b.x+Math.random()*300-100,y:b.y+Math.random()*100};d={x:c2.x+Math.random()*300-200,y:c2.y+Math.random()*50}
updatePoints();clearInterval(animId);startAnimation()}
function updatePoints(){let points=[a,b,c2,d];let points1=[],points2=[];for(let i=0;i<points.length-1;i++)points1.push(interpolate(points[i],points[i+1],t));for(i=0;i<points1.length-1;i++)points2.push(interpolate(points1[i],points1[i+1],t));draw();}
function interpolate(a,b,t){return{x:a.x*(1-t)+b.x*t,y:a.y*(1-t)+b.y*t}}
function draw(){ctx.clearRect(0,0,500,300);ctx.beginPath();ctx.moveTo(a.x,a.y);ctx.lineTo(b.x,b.y);ctx.strokeStyle='black';ctx.stroke();
let points=[a,b,c2,d];let points1=[],points2=[];for(let i=0;i<points.length-1;i++)points1.push(interpolate(points[i],points[i+1],t));
for(i=0;i<points1.length-1;i++)points2.push(interpolate(points1[i],points1[i+1],t));drawInterpolation();}
function drawInterpolation(){let len = points2.length; if(len>0){let p=points2[0]; ctx.beginPath();ctx.moveTo(p.x,p.y); ctx.strokeStyle='rgba(0,0,0,.3)'; 
for(let i=1;i<points2.length;i++){if(i<len) ctx.lineTo(points2[i].x,points2[i].y); else {ctx.lineTo(d.x,d.y); break;}}}
ctx.stroke(); let p = points2[0]; if(p) {ctx.beginPath(); ctx.arc(p.x,p.y,3,0,Math.PI*2,1); ctx.fillStyle='black'; ctx.fill();}
document.getElementById('t').textContent=t.toFixed(2);
document.getElementById('a').textContent=a.x.toFixed(1)+','+a.y.toFixed(1);
document.getElementById('b').textContent=b.x.toFixed(1)+','+b.y.toFixed(1);
document.getElementById('c2').textContent=c2.x.toFixed(1)+','+c2.y.toFixed(1);
document.getElementById('d').textContent=d.x.toFixed(1)+','+d.y.toFixed(1);}}
function startAnimation(){t=0; animId=setInterval(function(){t+=0.005;if(t>1)init();requestAnimationFrame(draw)},100)}
window.onload=startAnimation;
</script>
</body></html>
```
llama3.1:8bSTATFORMAT
Show code
```html
<!DOCTYPE html>
<html>
<head>
<style>
body {
  margin: 0;
  padding: 0;
}
</style>
</head>
<body>
<canvas id="c"></canvas>
<script>
const c = document.getElementById("c");
c.width = innerWidth;
c.height = innerHeight;

let t = 0, pt1, pt2, pt3, pt4, curve;
function init() {
  c.getContext("2d").clearRect(0, 0, c.width, c.height);
  pt1 = {x: Math.random()*innerWidth, y: Math.random()*innerHeight};
  pt2 = {x: Math.random()*innerWidth, y: Math.random()*innerHeight};
  pt3 = {x: Math.random()*innerWidth, y: Math.random()*innerHeight};
  pt4 = {x: Math.random()*innerWidth, y: Math.random()*innerHeight};
}

function draw() {
  c.getContext("2d").clearRect(0, 0, c.width, c.height);
  const ctx = c.getContext("2d");
  ctx.font = "12px Arial";
  ctx.fillStyle = "#000";
  ctx.textAlign = "left";
  ctx.textBaseline = "top";
  ctx.fillText(`t: ${Math.round(t*100)/100}`, 10, 20);
  ctx.fillText(`(${Math.round(pt1.x)},${Math.round(pt1.y)})`, 10, 40);
  ctx.fillText(`(${Math.round(pt2.x)},${Math.round(pt2.y)})`, 10, 60);
  ctx.fillText(`(${Math.round(pt3.x)},${Math.round(pt3.y)})`, 10, 80);
  ctx.fillText(`(${Math.round(pt4.x)},${Math.round(pt4.y)})`, 10, 100);

  let x1 = pt1.x + (pt2.x - pt1.x)*t;
  let y1 = pt1.y + (pt2.y - pt1.y)*t;
  let x2 = pt2.x + (pt3.x - pt2.x)*t;
  let y2 = pt2.y + (pt3.y - pt2.y)*t;

  ctx.beginPath();
  ctx.moveTo(x1, y1);
  ctx.lineTo(x2, y2);
  ctx.stroke();

  x1 = pt2.x + (pt3.x - pt2.x)*t;
  y1 = pt2.y + (pt3.y - pt2.y)*t;
  x2 = pt3.x + (pt4.x - pt3.x)*t;
  y2 = pt3.y + (pt4.y - pt3.y)*t;

  ctx.beginPath();
  ctx.moveTo(x1, y1);
  ctx.lineTo(x2, y2);
  ctx.stroke();

  let x0 = pt1.x+(pt2.x-pt1.x)*t+(pt3.x-pt2.x)*Math.pow(t,2)+(pt4.x-pt3.x)*Math.pow(t,3);
  let y0 = pt1.y+(pt2.y-pt1.y)*t+(pt3.y-pt2.y)*Math.pow(t,2)+(pt4.y-pt3.y)*Math.pow(t,3);

  ctx.beginPath();
  ctx.moveTo(x1, y1);
  ctx.lineTo(x0, y0);
  ctx.stroke();

  if (t === 1) {
    t = 0;
    init();
  } else {
    t += 0.01;
    requestAnimationFrame(draw);
  }
}
init();
draw();
</script>
</body>
</html>
```
qwen3:14bERRBLANKFORMAT
Show code
```html
<!DOCTYPE html>
<html>
<head>
<title>De Casteljau Animation</title>
<style>
body { margin: 0; display: flex; justify-content: center; align-items: center; height: 100vh; background-color: #222; color: white; font-family: monospace; }
canvas { border: 1px solid #444; background-color: #333; }
#info { position: absolute; top: 10px; left: 10px; padding: 10px; background-color: rgba(0,0,0,0.5); border-radius: 5px; font-size: 14px; max-width: 300px; }
</style>
</head>
<body>

<canvas id="bezierCanvas"></canvas>
<div id="info">t: 0.00 | P0: (0,0) | P1: (0,0) | P2: (0,0) | P3: (0,0)</div>

<script>
const canvas = document.getElementById('bezierCanvas');
const ctx = canvas.getContext('2d');
const infoDiv = document.getElementById('info');

let W, H; // Canvas dimensions

// Control Points structure: [[x0, y0], [x1, y1], [x2, y2], [x3, y3]]
let P = []; 
let t = 0.0;
let animationRunning = true;

function resize() {
    W = canvas.width = window.innerWidth * 0.9;
    H = canvas.height = window.innerHeight * 0.8;
}
window.addEventListener('resize', () => {
    resize();
    // Redraw immediately if resized
    if (animationRunning) drawScene(); 
});

function initPoints() {
    P = [[Math.random() * W, Math.random() * H], [Math.random() * W, Math.random() * H], [Math.random() * W, Math.random() * H], [Math.random() * W, Math.random() * H]];
}

// De Casteljau step: Interpolates n points to get one point at parameter t
function deCastelzyStep(points, t) {
    let result = [];
    for (let i = 0; i < points.length; i++) {
        result[i] = [points[i][0], points[i][1]];
    }

    // Iteratively calculate subsequent points
    for (let k = 0; k < points.length - 1; k++) {
        for (let i = 0; i < points.length - 1 - k; i++) {
            const pA = points[i];
            const pB = points[i + 1];
            // Linear interpolation: (1-t)*pA + t*pB
            result[i][0] = (1 - t) * pA[0] + t * pB[0];
            result[i][1] = (1 - t) * pA[1] + t * pB[1];
        }
    }
    // The final element is the point at parameter t
    return result[0]; 
}

function drawControlPolygon() {
    ctx.strokeStyle = '#888';
    ctx.lineWidth = 2;
    ctx.beginPath();
    for (let i = 0; i < P.length - 1; i++) {
        ctx.moveTo(P[i][0], P[i][1]);
        ctx.lineTo(P[i+1][0], P[i+1][1]);
    }
    ctx.stroke();
}

function drawIntermediatePoints() {
    const points = [...P]; // Copy the initial points
    let currentStep = [];

    // De Casteljau construction visualized: 3 steps needed for degree 3
    for (let k = 0; k < 3; k++) {
        currentStep = [];
        for (let i = 0; i < points.length - k; i++) {
            const pA = points[i];
            const pB = points[i+1];
            // Calculate the interpolated point for this level
            const x = (1 - t) * pA[0] + t * pB[0];
            const y = (1 - t) * pA[1] + t * pB[1];
            currentStep.push([x, y]);
        }
        // Draw the lines connecting points at this level k
        ctx.strokeStyle = `rgba(70, 130, 180, ${k / 4})`; // Steel blue fading
        ctx.lineWidth = 1;
        if (currentStep[0]) {
            ctx.beginPath();
            for (let i = 0; i < currentStep.length - 1; i++) {
                ctx.moveTo(currentStep[i][0], currentStep[i][1]);
                ctx.lineTo(currentStep[i+1][0], currentStep[i+1][1]);
            }
            ctx.stroke();
        }
    }

    // Draw the intermediate points (the final point of each level)
    for (let k = 0; k < 3; k++) {
        currentStep = [];
        for (let i = 0; i < P.length - k; i++) {
            const pA = P[i];
            const pB = P[i+1];
            const x = (1 - t) * pA[0] + t * pB[0];
            const y = (1 - t) * pA[1] + t * pB[1];
            currentStep.push([x, y]);
        }
        // Draw the resulting points of each level's calculation
        ctx.fillStyle = `rgba(70, 130, 180, ${k / 4})`
        if (currentStep[0]) {
            let lastX = currentStep[0][0], lastY = currentStep[0][1];
            for (let i = 1; i < currentStep.length; i++) {
                ctx.beginPath();
                ctx.arc(currentStep[i][0], currentStep[i][1], 3, 0, Math.PI * 2);
                ctx.fillStyle = `rgba(70, 130, 180, ${k / 4})`;
                ctx.fill();
            }
        }
    }
}

function drawBézierCurve() {
    // The final point from the De Casteljau construction at parameter t is the curve point.
    const C = deCastelzyStep(P, t); 
    // Instead of just drawing a dot, we plot the actual Bézier function result for visualization
    ctx.strokeStyle = '#6aff6a'; // Green color for the smooth curve
    ctx.lineWidth = 3;
    ctx.beginPath();

    const steps = 200;
    for (let i = 0; i <= steps; i++) {
        const u = i / steps;
        // Cubic Bézier formula: B(u) = (1-u)^3*P0 + 3*(1-u)^2*u*P1 + 3*(1-u)*u^2*P2 + u^3*P3
        const x = Math.pow(1 - u, 3) * P[0][0] + 
                   3 * Math.pow(1 - u, 2) * u * P[1][0] + 
                   3 * (1 - u) * Math.pow(u, 2) * P[2][0] + 
                   Math.pow(u, 3) * P[3][0];
        const y = Math.pow(1 - u, 3) * P[0][1] + 
                   3 * Math.pow(1 - u, 2) * u * P[1][1] + 
                   3 * (1 - u) * Math.pow(u, 2) * P[2][1] + 
                   Math.pow(u, 3) * P[3][1];

        if (i === 0) {
            ctx.moveTo(x, y);
        } else {
            ctx.lineTo(x, y);
        }
    }
    ctx.stroke();
}

function drawScene() {
    // Clear canvas for fresh frame
    ctx.clearRect(0, 0, W, H);

    // Draw the final curve result
    drawBézierCurve();

    // Draw the De Casteljau construction lines and intermediate points (the geometry)
    drawIntermediatePoints();

    // Draw the initial control polygon
    drawControlPolygon();

    // Update Info Panel
    infoDiv.innerHTML = `t: ${t.toFixed(2)} | P0: (${P[0][0].toFixed(0)},${P[0][1].toFixed(0)}) | P1: (${P[1][0].toFixed(0)},${P[1][1].toFixed(0)}) | P2: (${P[2][0].toFixed(0)},${P[2][1].toFixed(0)}) | P3: (${P[3][0].toFixed(0)},${P[3][1].toFixed(0)})`;
}

function updateAnimation() {
    if (!animationRunning) return;

    // 1. Update t (Slowly sweep from 0 to 1 and loop)
    t += 0.005 * (Math.sin(Date.now() / 2000) + 1); // Oscillating speed factor
    if (t > 1.0) {
        t = 0.0;
    }

    // 2. Update Control Points (Slow, drifting random movement)
    const driftFactor = 0.005;
    for (let i = 0; i < P.length; i++) {
        P[i][0] += (Math.random() - 0.5) * driftFactor * W * 0.1;
        P[i][1] += (Math.random() - 0.5) * driftFactor * H * 0.1;

        // Keep points within bounds
        P[i][0] = Math.max(0, Math.min(W, P[i][0]));
        P[i][1] = Math.max(0, Math.min(H, P[i][1]));
    }

    drawScene();
    requestAnimationFrame(updateAnimation);
}

// Initialization sequence
resize();
initPoints();
updateAnimation(); 
</script>

</body>
</html>
```
deepseek-r1:32bOKFORMAT
Show code
```html
<!DOCTYPE html><html><body style="background:#f0f0f0;display:flex;flex-direction:column;height:100vh"><canvas id="c" width="600" height="400"></canvas><div style="padding:20px;background:white;text-align:center;color:black">t = <span id="t">0</span></div>
<script>
class Bezier {
  constructor(canvas) {
    this.canvas = canvas;
    this.ctx = canvas.getContext('2d');
    this.reset();
  }
  reset() {
    this.t = -1;
    this.points = [
      {x:50,y:350,vx:.1,vy:-.1},
      {x:200,y:50,vx:-.2,vy:.1},
      {x:400,y:300,vx:.1,vy:-.2},
      {x:550,y:100,vx:-.2,vy:.1}
    ];
    this.curve = [];
  }
  draw() {
    if (this.t < 0) return;
    this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height);
    
    // Draw control points
    this.points.forEach((p,i)=>{
      this.ctx.beginPath();
      this.ctx.arc(p.x,p.y,5,0,Math.PI*2);
      this.ctx.fillStyle = 'black';
      this.ctx.fill();
      this.ctx.font='14px Arial';
      this.ctx.fillText(`P${i} (${p.x.toFixed(1)},${p.y.toFixed(1)})`,p.x-30,p.y+15);
    });
    
    // Compute De Casteljau points
    const levels = [[...this.points]];
    for(let j=1;j<4;j++) {
      levels[j] = [];
      for(let i=0;i<4-j;i++) {
        let a = levels[j-1][i];
        let b = levels[j-1][i+1];
        let dx = b.x - a.x;
        let dy = b.y - a.y;
        let nx = a.x + dx * this.t;
        let ny = a.y + dy * this.t;
        levels[j].push({x:nx,y:ny});
      }
    }

    // Draw lines between points
    for(let j=1;j<4;j++) {
      levels[j-1].forEach((p,i)=>{
        const parent = i < levels[j].length ? levels[j][i] : null;
        if (parent) {
          this.ctx.beginPath();
          this.ctx.strokeStyle = '#999';
          this.ctx.lineWidth = 2;
          this.ctx.moveTo(p.x,p.y);
          this.ctx.lineTo(parent.x,parent.y);
          this.ctx.stroke();
        }
      });
    }

    // Draw intermediate points
    for(let j=1;j<4;j++) {
      levels[j].forEach((p,i)=>{
        const c = ['blue','green','#ff0'][j-1];
        this.ctx.beginPath();
        this.ctx.arc(p.x,p.y,5,0,Math.PI*2);
        this.ctx.fillStyle = c;
        this.ctx.fill();
      });
    }

    // Draw curve
    if (levels[3][0]) {
      this.curve.push(levels[3][0]);
      if (this.curve.length > 100) this.curve.shift();
      
      this.ctx.beginPath();
      this.ctx.strokeStyle = 'red';
      this.ctx.lineWidth = 2;
      this.ctx.moveTo(this.curve[0].x,this.curve[0].y);
      this.curve.forEach(p => this.ctx.lineTo(p.x,p.y));
      this.ctx.stroke();
    }

    // Update positions
    if (this.t >= 1) {
      this.reset();
    } else {
      this.points.forEach(p => {
        p.x += p.vx;
        p.y += p.vy;
        if (p.x < 20 || p.x > this.canvas.width-20) p.vx *= -1;
        if (p.y < 20 || p.y > this.canvas.height-20) p.vy *= -1;
      });
    }
  }
}

const canvas = document.getElementById('c');
const bezier = new Bezier(canvas);
let animate = () => {
  if (bezier.t < 0) {
    bezier.t = 0;
  } else {
    bezier.t += .02;
    document.getElementById('t').textContent = bezier.t.toFixed(3);
  }
  bezier.draw();
  requestAnimationFrame(animate);
};
animate();
</script></body></html>
```
command-r:35bERRBLANK
Show code
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>De Casteljau Construction</title>
    <style>
        canvas { border: 1px solid black; }
    </style>
</head>
<body>

    <canvas id="myCanvas" width="600" height="400"></canvas>

<script>

c=document.getElementById("myCanvas");w=c.width;h=c.height;ctx=c.getContext("2d");cls=()=>ctx.clearRect(0,0,w,h);pt=(x,y)=>ctx.fillText(`${Math.round(x)},${Math.round(y)}`,x+10,y-5);draw=t=>{ctx.strokeStyle="#ccc";ctx.lineWidth=.2;cls();ctx.beginPath();[p0,p1,p2,p3]=[[46,280],[587,274],[96,161],[572,153]];[[p0,p1,p2],[p1,p2,p3]].forEach((pts,i)=>{ctx.moveTo(pts[0][0],pts[0][1]);for(j=1;j<3;++j){ctx.lineTo(pts[j][0],pts[j][1]);pt(pts[j][0],pts[j][1])}});ctx.stroke();ctx.beginPath();ctx.moveTo(p0[0],p0[1]);for(i=1;i<4;++i){x=(1-t)**(4-i)*p0[0]+(4-i)*(1-t)**(3-i)*t*p1[0]+(choose(3,i)-choose(2,i-1))*(1-t)**(4-(i+1))*t**2*p2[0]+(t**(i+3))/choose(3,i)*p3[0];y=(1-t)**(4-i)*p0[1]+(4-i)*(1-t)**(3-i)*t*p1[1]+(choose(3,i)-choose(2,i-1))*(1-t)**(4-(i+1))*t**2*p2[1]+(t**(i+3))/choose(3,i)*p3[1];ctx.lineTo(x,y);pt(x,y)}ctx.stroke();pt((1-t)*(1-t)*(1-t)*p0[0]+3*(1-t)**2*t*p1[0]+3*(1-t)*t**2*p2[0]+t**3*p3[0],(1-t)*(1-t)*(1-t)*p0[1]+3*(1-t)**2*t*p1[1]+3*(1-t)*t**2*p2[1]+t**3*p3[1])};

function choose(n,k){
    let res=1;
    for(i=1;i<=k;++i)res*=n-k+i;for(--n;--k;)res/=i;return res}

(function anim(){
  requestAnimationFrame(anim);draw(t+=.015);if(t>1){c.width=600;c.height=400;t=0}
})();
</script>
</body>
</html>
qwq:32bOKLIM
Show code
<think>

Okay, I need to create a self-contained HTML file that animates the De Casteljau construction for a cubic Bezier curve using a canvas. Let me start by recalling how De Casteljau's algorithm works. For a cubic Bezier with four control points, at each parameter t, we compute intermediate points by linear interpolation between the control points step by step until we get the final point on the curve.

The user wants the control points to drift slowly. So I need to define four control points that change over time. Maybe I can make them move in random directions or follow some path, but keep it simple. Maybe each point has a velocity vector that's updated periodically. But since the animation uses requestAnimationFrame, I can adjust their positions each frame slightly. Let's think of each point having a small random movement each frame.

The animation should start immediately and loop when it finishes. So I need to handle the animation loop with requestAnimationFrame. The parameter t should sweep from 0 to 1, incrementing each frame. Once t reaches 1, reset everything including the control points to new random positions and restart.

The HTML structure will include a canvas element and some text elements to display the current t value and control points' coordinates. But wait, the user mentioned showing the control point positions. Hmm, how to do that. Maybe using a <div> for the text, but since it's a self-contained HTML file with no external dependencies, I can create a div with id and update it each frame.

Wait, but the user said "Show t and the control-point positions". So maybe add a div that's updated each frame with the current t value and the coordinates of each control point. Alternatively, since the canvas can have text drawing, maybe draw the text on the canvas itself. That might be better because it's all within the canvas context.

So, drawing text on the canvas: use context.fillText. I can display t at the bottom, and the control points' coordinates next to each point. But that might be too cluttered. Alternatively, just show t in the top-right corner and maybe the coordinates in a separate text box. Or perhaps a small info area on the canvas.

Let me outline the steps:

1. Set up the canvas in the HTML body.
2. In JavaScript:
   a. Initialize control points with random positions.
   b. Set up variables for animation, like t, which starts at 0 and increments each frame.
   c. Define a function to update the control points' positions slowly. Maybe each control point has a velocity, so their position is adjusted by velocity * delta time? Or perhaps just a small fixed step each frame. Since the animation is smooth, maybe using a small delta each frame.
   d. The main animation loop (requestAnimationFrame) will:
      i. Clear the canvas.
      ii. Update control points (maybe move them a tiny bit each frame).
      iii. Calculate all intermediate points using De Casteljau for current t.
      iv. Draw all the points, connecting lines, and the traced curve.
      v. Display t and control point positions on the canvas.
      vi. Update t, if it reaches 1, reset everything (including control points) and restart.
   e. Start the animation loop.

Wait, how to implement the De Casteljau steps. For four control points (P0, P1, P2, P3):

At each step:
- First level: compute P01 = P0 + t*(P1-P0), similarly for others.
- Second level: compute P012 = P01 + t*(P12 - P01), etc.
- Third level: compute P0123 which is the point on the curve.

So for each t, the intermediate points are the ones at each level. Need to draw lines between these points as well. The lines would be between each pair in the same level, and the points themselves.

Wait, the lines connecting the interpolation points. So first level lines connect P0-P1, P1-P2, P2-P3 (but actually, the interpolation is between each pair to get the next level). Wait, actually in De Casteljau, each step reduces the number of points by one.

Wait, let me think again. For four points P0-P3 (cubic Bezier):

At step 1: between each pair, so three segments. The points computed here are P0+ t*(P1-P0), P1 + t*(P2-P1), etc. These form three new points.

Step 2: between those three points, so two new points.

Step 3: one point, which is on the Bezier curve.

So the lines to draw are between each adjacent pair at each step. So for step1, lines between the three points, step2 lines between the two points, and the final point.

Additionally, the traced curve itself (the Bezier curve) should be drawn over time as t progresses. To show the traced curve, we need to keep track of previous points as t increases. Maybe store an array of points along the curve and draw them with a line.

Wait, but if we're drawing the traced curve, each frame adds a new point, so building up the curve progressively.

Also, the intermediate points and lines should be drawn for the current t. The control points themselves should be shown as dots, maybe with a different color.

So the steps in the animation loop:

1. Clear the canvas.
2. Update control points (move them slightly each frame).
3. Compute all intermediate points for current t.
4. Draw control points (as small circles or crosses).
5. Draw lines connecting the control points (maybe the original Bezier's control polygon).
6. Draw the intermediate points and lines between them at each De Casteljau step.
7. Draw the traced curve (all previous points from 0 to current t).
8. Draw the current t value and possibly control points' coordinates on the canvas.
9. Update t, if t exceeds 1, reset (set t=0, reset control points to new random positions, clear the traced curve array?), then start over.

Wait, the traced curve array: Each time we compute the final point (the P0123 point), we can add it to an array, then draw a line connecting all those points. The array would grow over time as t increases from 0 to 1. Once t reaches 1, the array is cleared for the next animation cycle.

So variables needed:

- controlPoints: array of four objects with x and y coordinates, which drift.
- t: the current parameter (from 0 to 1).
- tracedCurve: array of points (x,y) for the Bezier curve.
- velocity for control points? Or maybe just a small random step each frame. To make them drift slowly, perhaps each control point has a very small velocity, which can be implemented by adding a small delta to x and y each frame. Alternatively, each point has a direction and speed, but that might complicate. Maybe each frame, add a small random delta to each control point's position. Or a fixed small step in some direction. Hmm, perhaps to keep it simple, each control point's position is updated by adding a small random value between -0.1 and 0.1 to x and y each frame. So over time they drift in some direction.

But that might cause them to move too much. Alternatively, have a velocity vector for each point that's reset periodically? Maybe not. Let's think of each control point moving in a circular path, but that might be overcomplicating.

Alternatively, each point's new position is their current position plus a small random delta each frame. So:

controlPoints[i].x += (Math.random() * 0.2 - 0.1);
controlPoints[i].y += (Math.random() * 0.2 - 0.1);

Wait, but that would cause them to move in random directions each frame. It might look like they're drifting. Alternatively, to make them drift smoothly, perhaps each point has a direction vector and speed, but that adds variables. To keep it simple, maybe just add a small random delta each frame. The key is that they should move slowly so the animation is visible but not too fast.

Alternatively, have each point's position change by a small amount each frame, but in a direction that drifts. Hmm, perhaps it's okay to just have a small random delta each frame. The exact implementation can be adjusted later.

Now, putting this into code structure:

First, in the HTML, have a canvas element:

<canvas id="bezierCanvas"></canvas>

Then in JavaScript:

var canvas = document.getElementById('bezierCanvas');
var ctx = canvas.getContext('2d');

Set canvas size, maybe 600x400 or similar. But in the code, setting width and height via attributes:

<canvas id="bezierCanvas" width="600" height="400"></canvas>

Then variables:

var controlPoints = [];
var t = 0;
var tracedCurve = [];
var dt = 0.01; // increment per frame
var animate;

Initialize controlPoints with random positions:

function init() {
   controlPoints = [];
   for (var i=0; i<4; i++) {
      controlPoints.push( {
         x: Math.random() * canvas.width,
         y: Math.random() * canvas.height
      });
   }
   tracedCurve = [];
   t = 0;
}

Then, the update function in the animation loop:

function animate() {
   requestAnimationFrame(animate);
   ctx.clearRect(0,0,canvas.width,canvas.height);

   // Update control points (drift slowly)
   controlPoints.forEach( function(pt) {
      pt.x += (Math.random() * 0.4 - 0.2);
      pt.y += (Math.random() * 0.4 - 0.2);
      // Constrain to canvas?
      if (pt.x < 0) pt.x = 0;
      if (pt.x > canvas.width) pt.x = canvas.width;
      if (pt.y < 0) pt.y = 0;
      if (pt.y > canvas.height) pt.y = canvas.height;
   });

   // Compute De Casteljau steps for current t
   var points = [];
   // Step 1: first level
   points[0] = controlPoints.map( function(p) { return {x:p.x, y:p.y}; });
   for (var i=1; i<=3; i++) {
      points[i] = [];
      for (var j=0; j < points[i-1].length -1; j++) {
         var p0 = points[i-1][j];
         var p1 = points[i-1][j+1];
         points[i].push( {
            x: p0.x + t*(p1.x - p0.x),
            y: p0.y + t*(p1.y - p0.y)
         });
      }
   }
   // points[3][0] is the final point on the Bezier.

   // Draw control points and polygon
   ctx.strokeStyle = 'black';
   ctx.beginPath();
   ctx.moveTo( controlPoints[0].x, controlPoints[0].y );
   for (var i=1; i<4; i++) {
      ctx.lineTo( controlPoints[i].x, controlPoints[i].y );
   }
   ctx.stroke();
   // Draw control points as dots
   ctx.fillStyle = 'red';
   controlPoints.forEach( function(p) {
      ctx.beginPath();
      ctx.arc(p.x, p.y, 3, 0, 2*Math.PI);
      ctx.fill();
   });

   // Draw intermediate points and lines for each step
   ctx.strokeStyle = 'blue';
   // Step 1 lines (3 points)
   ctx.beginPath();
   ctx.moveTo(points[0][0].x, points[0][0].y);
   for (var i=1; i < points[0].length; i++) {
      ctx.lineTo(points[0][i].x, points[0][i].y);
   }
   ctx.stroke();
   // Step 2 (2 points)
   ctx.strokeStyle = 'green';
   ctx.beginPath();
   ctx.moveTo(points[1][0].x, points[1][0].y);
   ctx.lineTo(points[1][1].x, points[1][1].y);
   ctx.stroke();
   // Step 3 (one point)
   ctx.fillStyle = 'orange';
   ctx.beginPath();
   ctx.arc(points[2][0].x, points[2][0].y, 3, 0, 2*Math.PI);
   ctx.fill();
   // The final point is points[3][0], add to tracedCurve
   tracedCurve.push( {x:points[3][0].x, y:points[3][0].y} );

   // Draw the traced curve
   if (tracedCurve.length >=2) {
      ctx.strokeStyle = 'black';
      ctx.beginPath();
      ctx.moveTo(tracedCurve[0].x, tracedCurve[0].y);
      for (var i=1; i<tracedCurve.length; i++) {
         ctx.lineTo(tracedCurve[i].x, tracedCurve[i].y);
      }
      ctx.stroke();
   }

   // Update t
   if (t >= 1) {
      init(); // restart
      return;
   }
   t += dt;

   // Draw t value
   ctx.fillStyle = 'black';
   ctx.font = '12px Arial';
   ctx.fillText('t = ' + t.toFixed(2), 10, 20);

   // Draw control points coordinates (maybe just the first one?)
   // Alternatively, display all 4 points' coordinates?
   // To save space, maybe just show t and that's it. Or use a box.
   // For simplicity, let's just show the coordinates of the first point.
   // Or loop through all points and print their positions in text.
   // Maybe too much, but user asked for control-point positions.
   // Perhaps show each control point's coordinates near them?

   // Draw coordinates next to each control point (maybe small text)
   ctx.fillStyle = 'black';
   ctx.font = '10px Arial';
   controlPoints.forEach( function(p,i) {
      ctx.fillText('P'+i+': ('+Math.round(p.x)+', '+Math.round(p.y)+')', p.x +5, p.y +5);
   });

   // Also, maybe display t in a more prominent place.

   // Finally, redraw all intermediate steps.
}

Wait, but in the animate function, this code is going to run every frame via requestAnimationFrame. However, the initial setup needs to be called. So in the init function, we set t=0, control points, etc., then start the animation loop.

Wait, the initial setup should be done once before starting the animation. So in the script:

init();
animate(); // which calls requestAnimationFrame(animate), creating the loop.

But in code:

function animate() {
   // ... the code above
   // At the end, if t over 1, call init() and then return, so it stops the loop.
   // But requestAnimationFrame is called again automatically. Wait, no: the function is recursive via requestAnimationFrame.

Wait, the animate function should call requestAnimationFrame again except when resetting. Wait, the code as written:

Inside animate():
requestAnimationFrame(animate); // first line.

Then, after updating, if t >=1, then call init(), and then return. So the next line after that return would not execute, so the next frame won't be scheduled again? Wait no: requestAnimationFrame is called before any other steps, so when t reaches 1, the next frame would still be scheduled, but when it runs, after the init, but then the next frame would not be scheduled again? Hmm, no. Let me think step by step.

When the function animate is called, it does:

requestAnimationFrame(animate); // schedules the next frame.

Then proceeds to process the current frame. If t reaches 1, then after processing, t is set to 0 (through init()), and returns. So after returning, the next animation frame is still scheduled. Wait, perhaps that approach may have issues because after resetting, the next call would be the same as a new cycle.

Alternatively, perhaps when t reaches 1, we should call init() and then restart the animation loop. Hmm, maybe better to do:

Inside animate():

if (t >=1) {
   init(); // reset everything
   return; // do not schedule the next frame?
}

But no, because requestAnimationFrame(animate) was already called first. Wait, the order is:

Inside animate():

1. Schedule next animation frame (requestAnimationFrame(animate))
2. Clear canvas etc.
3. ... processing ...
4. if t >=1: call init() and return, so no further processing in this frame.

The next frame will happen because step 1 scheduled it. So when t reaches 1, the next frame will be handled, but after init(), which sets t=0, so it will proceed again.

Alternatively, perhaps it's okay. The code flow might work as intended.

Potential issues:

- When control points move, their motion might be too erratic with the random deltas. Maybe better to have a small fixed step in some direction, but that would require more variables. Alternatively, use a per-point velocity. Let me think.

Alternatively, each point has a velocity vector (dx, dy), which is updated slowly. For example, each point has a velocity, and each frame, position += velocity * delta_time. But since delta_time is handled by requestAnimationFrame, which varies, but perhaps we can just use fixed small steps. Maybe to keep it simple, each frame, add a small random offset to each control point's position. For example:

pt.x += (Math.random() * 0.2 - 0.1); // between -0.1 and +0.1

This way, the points drift slowly. But with Math.random(), each frame the direction is random, so they might jitter. Alternatively, store a velocity vector for each control point, and update their position by adding velocity each frame, and update velocity occasionally. Hmm, that might be overcomplicating.

Alternatively, for simplicity, just let each control point's position be updated with small random steps. The exact movement might not be too important as long as they drift over time.

Another thing: the control points might go outside the canvas. So adding constraints to keep them within the canvas's boundaries. In the code above, I added:

if (pt.x < 0) pt.x = 0;
if (pt.x > canvas.width) pt.x = canvas.width;
// same for y.

This way, they can't go outside.

Another point: the tracedCurve is being added to every frame. So when t reaches 1 and the animation restarts, the tracedCurve is reset to empty, so the previous curve is erased. That's correct.

Testing the code:

- When t increases from 0 to 1, the intermediate points are computed step by step, and the tracedCurve is built, showing the Bezier curve.

Potential bugs:

- The points array in the De Casteljau steps: The code initializes points[0] as a copy of controlPoints. Then for each step, points[i] is computed based on points[i-1].

Wait, let me check:

points starts as an empty array.

points[0] = controlPoints.map(...) copies each point.

Then for i=1 to 3 (since there are 4 control points, steps 1,2,3 for 3 levels):

Level 1 (first iteration i=1): 

points[1] will have length 3 (since previous had 4, so 3 steps between them).

Next i=2: points[2] has length 2 (because previous had 3 elements, so 2 steps)

i=3: points[3] has length 1 (from two elements in previous).

So yes, that's correct.

Thus, the final point is points[3][0].

The code correctly adds this to tracedCurve.

Now, the drawing of intermediate steps:

Step 1 lines (points[0] are control points, but the lines between them are already drawn as the control polygon. The intermediate steps are the first level (after first iteration), so perhaps the first intermediate points are points[1], but in the code, the first step is drawn as lines between points[0], which is the control points themselves. So that might be redundant.

Wait, in the code above:

// Draw intermediate points and lines for each step
ctx.strokeStyle = 'blue';
// Step 1 lines (3 points)
ctx.beginPath();
ctx.moveTo(points[0][0].x, points[0][0].y);
for (var i=1; i < points[0].length; i++) {
   ctx.lineTo(points[0][i].x, points[0][i].y);
}
ctx.stroke();

But points[0] is the control points array, so this is just drawing the control polygon again. Which is already drawn previously. So that's a mistake.

Ah, right, that is redundant. The first level of De Casteljau (step 1) is the first iteration, so the points are between the control points. Wait, no: the De Casteljau steps are:

points[0] = control points

points[1] are the first level computed between points[0].

points[2] are the second level between points[1], etc.

So to draw the intermediate steps:

After computing all points, to display the intermediate steps:

- Level 1 (points[1]) connects the first computed points between control points.

- Level 2: points[2] connecting the next computed points.

- Level 3: points[3][0].

So in the code above, perhaps the drawing of intermediate steps should be for levels 1,2,3:

For step1 (points[1]):

ctx.beginPath();
for each point in points[1], draw lines between them?

Wait, points[1] is an array of length 3 (for 4 control points).

Wait, for 4 control points:

points[0] has 4 elements.

points[1] has 3 elements (each connecting the pairs of points[0]).

points[2] has 2 elements (connecting the pairs of points[1]).

points[3] has 1 element (connecting the pair of points[2]).

So to draw the intermediate lines for each step:

After level 1 (points[1]):

draw lines connecting points[1][0], points[1][1], points[1][2].

Similarly for level 2 (points[2]), lines between the two points.

Level 3 is just a point.

So in the code:

// Step1: points[1]
ctx.strokeStyle = 'blue';
ctx.beginPath();
ctx.moveTo(points[1][0].x, points[1][0].y);
for (var j=1; j < points[1].length; j++) {
   ctx.lineTo(points[1][j].x, points[1][j].y);
}
ctx.stroke();

Similarly for points[2]:

ctx.strokeStyle = 'green';
ctx.beginPath();
ctx.moveTo(points[2][0].x, points[2][0].y);
if (points[2].length >1) {
   ctx.lineTo(points[2][1].x, points[2][1].y);
}
ctx.stroke();

And points[3][0] is drawn as an orange dot.

So the original code had an error in drawing the first intermediate step. The code needs to be adjusted.

Therefore, the code for drawing the intermediate steps should be modified as follows:

After computing the points array:

// Draw intermediate points and lines for each step
// Step1: the first level (points[1])
ctx.strokeStyle = 'blue';
ctx.beginPath();
ctx.moveTo(points[1][0].x, points[1][0].y);
for (var j=1; j < points[1].length; j++) {
   ctx.lineTo(points[1][j].x, points[1][j].y);
}
ctx.stroke();

// Step2: second level (points[2])
ctx.strokeStyle = 'green';
ctx.beginPath();
ctx.moveTo(points[2][0].x, points[2][0].y);
if (points[2].length > 1) {
   ctx.lineTo(points[2][1].x, points[2][1].y);
}
ctx.stroke();

// Step3: third level (points[3][0])
ctx.fillStyle = 'orange';
ctx.beginPath();
ctx.arc(points[3][0].x, points[3][0].y, 3, 0, 2*Math.PI);
ctx.fill();

This way, the intermediate steps are drawn properly.

In the original code, the first intermediate step was drawing the control polygon again, which is a mistake. So that needs to be fixed.

Another point: The tracedCurve is being built by adding points[3][0] each frame. However, since t increments by dt each frame, the points are added in order, so the curve is drawn correctly.

Now, the problem of displaying the control points' coordinates:

The user requested to show the control-point positions, so perhaps we can display each point's coordinates near them. The code above already includes:

controlPoints.forEach( function(p,i) {
   ctx.fillText('P'+i+': ('+Math.round(p.x)+', '+Math.round(p.y)+')', p.x +5, p.y +5);
});

This will write the coordinates next to each control point. However, depending on their position, the text might be cut off or not visible, but it's an attempt.

Alternatively, perhaps print them in a box on the side, but that might require more complex handling.

Now, putting all together into the final code.

But let's also consider code efficiency. Since the animate function is called every frame, we need to make sure loops are manageable. For a small number of control points (4), it's okay.

Now, let's structure the code properly.

The full code would be:

<canvas id="myCanvas" width="800" height="600"></canvas>
<script>
var canvas = document.getElementById('myCanvas');
var ctx = canvas.getContext('2d');

var controlPoints = [];
var t = 0;
var tracedCurve = [];
var dt = 0.01;

function init() {
   controlPoints = [];
   for (var i = 0; i <4; i++) {
      controlPoints.push({
         x: Math.random() * canvas.width,
         y: Math.random() * canvas.height
      });
   }
   tracedCurve = [];
   t = 0;
}

function animate() {
   requestAnimationFrame(animate);
   ctx.clearRect(0,0, canvas.width, canvas.height);

   // Update control points (drift slowly)
   controlPoints.forEach( function(pt) {
      pt.x += (Math.random() * 0.4 - 0.2);
      pt.y += (Math.random() * 0.4 - 0.2);
      // Constrain to canvas
      pt.x = Math.max(0, Math.min(pt.x, canvas.width));
      pt.y = Math.max(0, Math.min(pt.y, canvas.height));
   });

   // Compute De Casteljau steps for current t
   var points = [];
   // Step 0: control points
   points[0] = controlPoints.map( function(p) { return {x:p.x, y:p.y}; });
   for (var i =1; i <=3; i++) {
      points[i] = [];
      for (var j=0; j < points[i-1].length -1; j++) {
         var p0 = points[i-1][j];
         var p1 = points[i-1][j+1];
         points[i].push({
            x: p0.x + t*(p1.x - p0.x),
            y: p0.y + t*(p1.y - p0.y)
         });
      }
   }

   // Draw control polygon and points
   ctx.strokeStyle = 'black';
   ctx.beginPath();
   ctx.moveTo( controlPoints[0].x, controlPoints[0].y );
   for (var p of controlPoints) {
      ctx.lineTo(p.x, p.y);
   }
   ctx.stroke();

   // Draw intermediate steps
   // Step1 (points[1])
   ctx.strokeStyle = 'blue';
   ctx.beginPath();
   ctx.moveTo(points[1][0].x, points[1][0].y);
   for (var j=1; j < points[1].length; j++) {
      ctx.lineTo( points[1][j].x, points[1][j].y );
   }
   ctx.stroke();

   // Step2 (points[2])
   ctx.strokeStyle = 'green';
   ctx.beginPath();
   ctx.moveTo( points[2][0].x, points[2][0].y );
   if (points[2].length >1 ) {
      ctx.lineTo(points[2][1].x, points[2][1].y );
   }
   ctx.stroke();

   // Step3 (points[3])
   ctx.fillStyle = 'orange';
   ctx.beginPath();
   ctx.arc( points[3][0].x, points[3][0].y, 3, 0, 2*Math.PI );
   ctx.fill();

   // Draw the traced curve
   if (tracedCurve.length >1) {
      ctx.strokeStyle = '#00FF00';
      ctx.beginPath();
      ctx.moveTo( tracedCurve[0].x, tracedCurve[0].y );
      for (var p of tracedCurve) {
         ctx.lineTo(p.x, p.y);
      }
      ctx.stroke();
   }

   // Add current point to tracedCurve
   tracedCurve.push( {x: points[3][0].x, y: points[3][0].y } );

   // Show control points coordinates
   ctx.font = '12px Arial';
   ctx.fillStyle = 'black';
   controlPoints.forEach( function(p,i) {
      ctx.fillText('P'+i+': ('+Math.round(p.x)+', '+Math.round(p.y)+')', 
         p.x +5, p.y +5 );
   });

   // Update time
   t += dt;
   if (t >= 1) {
      init(); // reset after reaching t=1
   }
}

init();
animate();

</script>

Wait, but in the above code, there is a problem: in the tracedCurve drawing, if tracedCurve has more than 1 point, it draws the entire tracedCurve every frame, which can be inefficient, but since it's a small array, it's okay.

Also, when resetting (t >=1), it calls init() which resets controlPoints, tracedCurve, and t. This will restart the animation with new control points.

Testing this code:

- The control points drift slowly around the canvas.

- The intermediate steps (blue, green, orange) show the De Casteljau algorithm steps.

- The tracedCurve is green, showing the Bezier curve.

- Coordinates are displayed next to each control point.

- When t reaches 1, the animation restarts with new random positions.

Potential improvements:

- The control points drift might cause overlapping coordinates labels.

- The tracedCurve could be cleared when resetting, but it's already handled by tracedCurve being reset in init().

- Maybe add a small delay before restarting to see the animation complete.

- The drifting mechanism could be made smoother, but it's a simple implementation.

This code should fulfill the requirements.
Outside the Brain cluster — same task, same character budget, collected through their own tooling (response times not comparable)
GPT-5.5 (Codex)OKMINIFIED
Show code
<!doctype html><html><head><meta charset="utf-8"><title>De Casteljau</title><style>html,body{margin:0;height:100%;overflow:hidden;background:#0b0d10;color:#dfe7f1;font:14px/1.35 system-ui,Segoe UI,sans-serif}canvas{display:block;width:100vw;height:100vh}#i{position:fixed;left:14px;top:12px;white-space:pre;background:#101820cc;border:1px solid #304154;padding:10px 12px;border-radius:6px;box-shadow:0 8px 28px #0008}</style></head><body><canvas id="c"></canvas><div id="i"></div><script>
const c=document.getElementById("c"),x=c.getContext("2d"),i=document.getElementById("i");let W,H,D,P,V,t=0,last=0,path=[];
function rnd(a,b){return a+Math.random()*(b-a)}
function reset(){P=[];V=[];path=[];t=0;for(let k=0;k<4;k++){P.push({x:rnd(W*.18,W*.82),y:rnd(H*.2,H*.8)});V.push({x:rnd(-.22,.22),y:rnd(-.18,.18)})}}
function size(){D=devicePixelRatio||1;W=innerWidth;H=innerHeight;c.width=W*D;c.height=H*D;x.setTransform(D,0,0,D,0,0);reset()}
function lerp(a,b,t){return{x:a.x+(b.x-a.x)*t,y:a.y+(b.y-a.y)*t}}
function line(a,b,col,w=1){x.strokeStyle=col;x.lineWidth=w;x.beginPath();x.moveTo(a.x,a.y);x.lineTo(b.x,b.y);x.stroke()}
function dot(p,r,col){x.fillStyle=col;x.beginPath();x.arc(p.x,p.y,r,0,7);x.fill()}
function bez(tt){let a=lerp(P[0],P[1],tt),b=lerp(P[1],P[2],tt),c=lerp(P[2],P[3],tt),d=lerp(a,b,tt),e=lerp(b,c,tt);return lerp(d,e,tt)}
function tick(ms){let dt=Math.min(32,ms-last||16);last=ms;if(!W)size();x.clearRect(0,0,W,H);for(let k=0;k<4;k++){let p=P[k],v=V[k];p.x+=v.x*dt;p.y+=v.y*dt;if(p.x<50||p.x>W-50)v.x*=-1;if(p.y<70||p.y>H-50)v.y*=-1}t+=dt/5200;if(t>=1){reset()}let q0=lerp(P[0],P[1],t),q1=lerp(P[1],P[2],t),q2=lerp(P[2],P[3],t),r0=lerp(q0,q1,t),r1=lerp(q1,q2,t),s=lerp(r0,r1,t);path.push(s);x.lineCap="round";line(P[0],P[1],"#52606d",2);line(P[1],P[2],"#52606d",2);line(P[2],P[3],"#52606d",2);line(q0,q1,"#d2a52b",2);line(q1,q2,"#d2a52b",2);line(r0,r1,"#55c7d9",3);x.strokeStyle="#8ee05e";x.lineWidth=3;x.beginPath();for(let k=0;k<path.length;k++){let p=path[k];k?x.lineTo(p.x,p.y):x.moveTo(p.x,p.y)}x.stroke();x.strokeStyle="#38506a";x.lineWidth=1;x.beginPath();for(let k=0;k<=80;k++){let p=bez(k/80);k?x.lineTo(p.x,p.y):x.moveTo(p.x,p.y)}x.stroke();P.forEach((p,k)=>{dot(p,6,"#f2f5f8");x.fillText("P"+k,p.x+9,p.y-9)});[q0,q1,q2].forEach(p=>dot(p,5,"#f0b72f"));[r0,r1].forEach(p=>dot(p,5,"#55c7d9"));dot(s,7,"#8ee05e");i.textContent="t = "+t.toFixed(3)+"\n"+P.map((p,k)=>"P"+k+" = ("+p.x.toFixed(1)+", "+p.y.toFixed(1)+")").join("\n");requestAnimationFrame(tick)}
addEventListener("resize",size);size();requestAnimationFrame(tick)
</script></body></html>
Show code
<!DOCTYPE html><html><head><meta charset="utf-8"><title>De Casteljau</title>
<style>html,body{margin:0;overflow:hidden;background:#0b0f1a;font-family:monospace}canvas{display:block}#hud{position:fixed;top:8px;left:8px;color:#9fd;font-size:13px;line-height:1.4;pointer-events:none;text-shadow:0 0 4px #000}</style>
</head><body>
<canvas id="c"></canvas>
<div id="hud"></div>
<script>
const cv=document.getElementById('c'),ctx=cv.getContext('2d'),hud=document.getElementById('hud');
let W,H;
function resize(){W=cv.width=innerWidth;H=cv.height=innerHeight;}
resize();addEventListener('resize',resize);
function R(a,b){return a+Math.random()*(b-a);}
function newPt(){return {x:R(W*0.15,W*0.85),y:R(H*0.15,H*0.85),vx:R(-.15,.15),vy:R(-.15,.15)};}
let pts,t,trail,speed;
function init(){
 pts=[newPt(),newPt(),newPt(),newPt()];
 t=0;trail=[];
 speed=R(0.0016,0.0026);
}
init();
function lerp(a,b,t){return {x:a.x+(b.x-a.x)*t,y:a.y+(b.y-a.y)*t};}
function drawLine(p,q,col,w){ctx.strokeStyle=col;ctx.lineWidth=w;ctx.beginPath();ctx.moveTo(p.x,p.y);ctx.lineTo(q.x,q.y);ctx.stroke();}
function drawPt(p,col,r){ctx.fillStyle=col;ctx.beginPath();ctx.arc(p.x,p.y,r,0,6.283);ctx.fill();}
function step(){
 for(const p of pts){
  p.x+=p.vx;p.y+=p.vy;
  if(p.x<40||p.x>W-40)p.vx*=-1;
  if(p.y<40||p.y>H-40)p.vy*=-1;
 }
 const L0=pts;
 const L1=[lerp(L0[0],L0[1],t),lerp(L0[1],L0[2],t),lerp(L0[2],L0[3],t)];
 const L2=[lerp(L1[0],L1[1],t),lerp(L1[1],L1[2],t)];
 const L3=lerp(L2[0],L2[1],t);
 trail.push({x:L3.x,y:L3.y});

 ctx.clearRect(0,0,W,H);
 drawLine(L0[0],L0[1],'#3a4a6b',1.5);drawLine(L0[1],L0[2],'#3a4a6b',1.5);drawLine(L0[2],L0[3],'#3a4a6b',1.5);
 if(trail.length>1){
  ctx.strokeStyle='#ff5f9e';ctx.lineWidth=2.5;ctx.beginPath();
  ctx.moveTo(trail[0].x,trail[0].y);
  for(let i=1;i<trail.length;i++)ctx.lineTo(trail[i].x,trail[i].y);
  ctx.stroke();
 }
 drawLine(L1[0],L1[1],'#5fd0ff',1.2);drawLine(L1[1],L1[2],'#5fd0ff',1.2);
 drawLine(L2[0],L2[1],'#ffd25f',1.2);
 L0.forEach((p,i)=>{drawPt(p,'#7fa',5);ctx.fillStyle='#cfe';ctx.font='11px monospace';ctx.fillText('P'+i,p.x+8,p.y-8);});
 L1.forEach(p=>drawPt(p,'#5fd0ff',4));
 L2.forEach(p=>drawPt(p,'#ffd25f',4));
 drawPt(L3,'#fff',6);

 hud.innerHTML='t = '+t.toFixed(3)+'<br>'+L0.map((p,i)=>'P'+i+': ('+p.x.toFixed(0)+', '+p.y.toFixed(0)+')').join('<br>');

 t+=speed;
 if(t>1){init();}
 requestAnimationFrame(step);
}
step();
</script></body></html>
Show code
<!DOCTYPE html><html><head><title>De Casteljau</title></head><body style="margin:0;background:#000;display:flex;justify-content:center;align-items:center;height:100vh"><canvas id="c"></canvas><div id="i" style="position:absolute;top:10px;left:10px;color:#0f0;font-family:mono;font-size:10px"></div><script>
const c=document.getElementById('c'),x=c.getContext('2d'),i=document.getElementById('i');c.width=c.height=400;
const p=[{x:50,y:200,vx:0.5,vy:0.3},{x:150,y:50,vx:-0.3,vy:0.4},{x:250,y:100,vx:0.4,vy:-0.2},{x:350,y:250,vx:-0.2,vy:-0.5}];
function d(){x.fillStyle='#000';x.fillRect(0,0,400,400);for(let j=0;j<4;j++){p[j].x+=p[j].vx;p[j].y+=p[j].vy;if(p[j].x<20||p[j].x>380){p[j].vx*=-1;}if(p[j].y<20||p[j].y>380){p[j].vy*=-1;}}let cv=[];for(let t=0;t<=1;t+=0.02){let q=[...p];for(let lev=0;lev<3;lev++){let nq=[];for(let j=0;j<q.length-1;j++){nq.push({x:q[j].x+(q[j+1].x-q[j].x)*t,y:q[j].y+(q[j+1].y-q[j].y)*t});}q=nq;}cv.push(q[0]);}x.strokeStyle='#444';x.lineWidth=1;for(let j=0;j<3;j++){x.beginPath();x.moveTo(p[j].x,p[j].y);x.lineTo(p[j+1].x,p[j+1].y);x.stroke();}x.strokeStyle='#0f0';x.lineWidth=2;x.beginPath();x.moveTo(cv[0].x,cv[0].y);for(let j=1;j<cv.length;j++)x.lineTo(cv[j].x,cv[j].y);x.stroke();x.fillStyle='#f00';for(let j=0;j<4;j++){x.fillRect(p[j].x-4,p[j].y-4,8,8);}x.fillStyle='#f0f';for(let j=0;j<cv.length;j+=5)x.fillRect(cv[j].x-2,cv[j].y-2,4,4);i.textContent=`P0:(${p[0].x.toFixed(0)},${p[0].y.toFixed(0)}) P1:(${p[1].x.toFixed(0)},${p[1].y.toFixed(0)})`;}(function a(){d();requestAnimationFrame(a);})();
</script></body></html>
Results at a glance— every model in this round with score, response time and status.

Who wrote what

ModelBlind scoreLatencyStatus
qwen3-coder:30b 38.5 sOK
qwen3.5:9b 102.8 sOK
qwen3:8b harness
mistral-small:24b 42.2 sOK
gemma4:26b 212.8 sOK
deepseek-r1:14b 27.3 sOK
llama3.1:8b 39.3 sOK
qwen3:14b 60.8 sOK
deepseek-r1:32b 62.8 sOK
command-r:35b 130.0 sOK
qwq:32b 222.0 sOK