OverviewModels › command-r:35b
Model profile

command-r:35b

LocalBrain cluster
49/49answered (R31–R125)
0DNF / no usable answer
DNFno scored round

Rounds & answers 49

R31 · Bat and ball (the classic reasoning trap) Open round →
Der Ball kostet 0,05 Euro. Wenn der Schläger einen Euro mehr kostet, beträgt der Preisunterschied zwischen den beiden genau einen Euro. Somit ergibt sich ein Preis von 0,05 Euro für den Ball, wenn man von dem Betrag von insgesamt 1,10 Euro ausgeht.
R32 · Four houses, four clues (constraint puzzle) Open round →
1. Grün: Da das grüne Haus an Position 1 steht, ist seine Position somit klar ermittelt.
2. Blau: Das rote Haus steht direkt links vom blauen Haus. Wenn also das grüne Haus an Position 1 steht, muss logischerweise das blaue Haus an Position 2 sein. 
3. Gelb: Wir wissen, dass das gelbe Haus rechts vom blauen Haus steht und das blaue Haus steht an Position 2. Somit ergibt sich, dass das gelbe Haus an Position 3 ist.
4. Rot: Da das rote Haus links vom blauen Haus steht (Position 2) und das grüne Haus an Position 1 ist, muss das rote Haus folglich an Position 4 stehen.
R33 · Idioms that break literal translation (EN→DE) Open round →
1) Schweren Herzens der Sache ins Auge sehen
2) Der Ball liegt bei dir 
3) Es schüttet wie aus Eimern
R34 · Constrained taglines (word ban + length cap) Open round →
1. Reinige sanft mit Bambus.
2. Zahne putzen? Natürlich bambastisch! 
3. Glänzend lächeln, grün genießen.
R35 · Minutes in a (non-leap) year — show the math Open round →
Ein normales Jahr mit 365 Tagen besteht aus 365 * 24 Stunden = 8760 Stunden.
Jede Stunde hat 60 Minuten, also ergibt sich für ein Jahr die Anzahl von 8760 * 60 = 525600 Minuten. 

Das Ergebnis ist also: **525600 Minuten**.
R36 · Continue the sequence (doubling gaps) Open round →
Die nächste Zahl ist 33 - Die Reihe besteht aus den Hauptreihenfolgen der Fibonacci-Zahlen, wobei jede Zahl die Summe der beiden vorherigen ist.
R37 · False friend: 'control' EN→DE Open round →
"Bevor wir versenden, muss ich die Testergebnisse überprüfen und am Ende zwei Fehler beheben."
R38 · Register shift: formal → casual (DE) Open round →
Hey, ich muss dir leider mitteilen, dass sich der Termin für unser Meeting auf morgen früh um 10 Uhr verschiebt. Tut mir leid für die spontane Änderung!
R39 · 40-word product blurb with 3 required words Open round →
Diese elegante Edelstahl-Trinkflasche ist auslaufsicher, hält Getränke stundenlang frisch & kühl und ist spülmaschinenfest für einfache Reinigung. Ein perfekter Begleiter!
R40 · isPalindrome (ignore case & non-alphanumerics) Open round →
function isPalindrome(s) {
    s = s.replace(/[^a-zA-Z0-9]/g, '').toLowerCase();
    return s === s.split('').reverse().join('');
}
R41 · Prose → valid JSON Open round →
{
  "Name": "Anna Schmidt",
  "Alter": 30,
  "Stadt": "Freiburg",
  "Hobbys": ["Lesen", "Radfahren"],
  "Newsletter_abonniert": true
}
R42 · All but nine (word-problem trap) Open round →
9 Schafe
R43 · Five machines (rate-reasoning trap) Open round →
Die Lösung ist 5 Minuten. Da die Produktionszeit pro Teil konstant bleibt (immer 5 Minuten), verdoppelt sich die Anzahl der Maschinen zwar, aber auch die Anzahl der gleichzeitig produzierten Teile. Somit bleibt die Gesamtproduktionszeit unverändert.
R44 · Appointment extraction to strict JSON Open round →
[
  {
    "datum": "2026-08-12",
    "uhrzeit": "14:30",
    "titel": "Budgetplanung"
  },
  {
    "datum": "2026-09-03",
    "uhrzeit": "09:00",
    "titel": "Zahnarzttermin"
  },
  {
    "datum": "2026-12-31",
    "uhrzeit": "20:30",
    "titel": "Silvesterparty"
  }
]
R45 · Idiom-dense German to natural English Open round →
It's not perfect, but we shouldn't make a mountain out of a molehill; all things considered, it's livable.
R46 · Energy conservation on a frictionless incline Open round →
Let's use energy conservation to solve this problem. The initial potential energy of the block at the top of the incline is converted into kinetic energy at the bottom:

$$
\begin{equation*}
    P_i + K_i = P_f + K_f \, .
\end{equation*}
$$

Here, $P$ represents potential energy and $K$ represents kinetic energy. Initial ($i$) and final ($f$) are the two states of a block. The mass is 2 kg throughout this problem so we will leave it out of the equations for simplicity.

At the top: 

$$
\begin{align*}
    P_i &= mgh \\
    K_i &= 0 \, .
\end{align*}
$$
 
Where $m$ represents mass, and $h$ is height ($5 \text{ m}$). At the bottom: 

$$
\begin{align*}
   P_f &= 0 \\
   K_f &= \frac{1}{2}v^2 \, .  
\end{align*}
$$

Where $v$ represents velocity. 

Plugging into our energy conservation equation, we get: 

$$
\begin{equation*}
     mgh + 0 = 0 + \frac{1}{2}v^2 \, .
\end{equation*}
$$
 
Solvin …

Excerpt — the full answer is on the round page.

R47 · Unit conversion: km/h to m/s and mph Open round →
Here are your conversions:

(a) To convert kilometers per hour to meters per second, we use the formula: 

$$
\begin{equation*}
    \text{km/h} \cdot \frac{1000~m}{1 ~ km } \cdot \frac{1 ~ h}{3600 ~ s}\,.
\end{equation*}
$$

Plugging in the given value, we get: 

$$
\begin{align*}
    v_\text{(mps)} &= 108~ \frac{\text{km}}{\text{h}} \cdot \frac{1000 ~ m}{1 ~ \text{km}} \cdot \frac{1 ~ \text{h}}{3600 ~ \text{s}}\\
    &= 30 ~\frac{\text{m}}{\text{s}}
\end{align*}
$$ 

so the speed in meters per second is $30.0~ \frac{\text{m}}{\text{s}}$.

(b) To convert kilometers per hour to miles per hour, we use the given conversion factor: 

$$
\begin{equation*}
    1 ~ \text{mile} = 1.60934 ~ \text{km}\,.
\end{equation*}
$$ 

Then: 

$$
\begin{align*}
    v_\text{(mph)} &= 108~ \frac{\text{km}}{\text{h}} \cdot \frac{1 ~ \text{mile}}{1.60934 ~ \text{km}}\\
    &\approx 67.2 ~\frac{\text{miles}}{\tex …

Excerpt — the full answer is on the round page.

R48 · Low-orbit satellite: speed and period (orbital/Kepler estimate) Open round →
Here is how we can estimate the answers to this question:

a) First, let us compute the distance of the satellite from Earth's center, $r$:

$$
\begin{equation*}
    r = 6371 \text{ km} + 400 \text{ km} \\
    = 6771 \text{ km}\,.
\end{equation*}
$$

Now we can calculate the orbital speed $v$ using: 

$$ 
\begin{align*}
    v &= \sqrt{\frac{\mu}{r}}\\ 
    &= \sqrt{\frac{398600 \text{ km}^3/\text{s}^2}{6771 \text{ km}}} \\
    &\approx 7.54 \text{ km/s}\,.
\end{align*} 
$$ 

b) To find the orbital period $T$ in minutes, we'll first calculate it in seconds and then convert: 

$$
\begin{align*} 
    T &= \frac{2\pi r}{v} \\
    &= \frac{2\pi (6771 \text{ km})}{7.54 \text{ km/s}} \\
    &\approx 5380.39 \text{ s}\,.
\end{align*}  
$$ 

Now we convert to minutes: 

$$
\begin{equation*} 
     T = \frac{5380.39 \text{ s}}{60 \text{ s/min}} \\
     \approx 89.7 \text{ min}\,.
\end{equation*} …

Excerpt — the full answer is on the round page.

R49 · Ohm's law: resistance and power dissipation Open round →
To solve this problem, we'll use Ohm's Law: 

V = IR 
 
Where: 
- V is the Voltage across the circuit or component. 
- I is the Current flowing through the circuit or component. 
- R is the Resistance of the resistor in the circuit. 

(a) The resistance of the resistor (R): 

We know that the voltage across the battery is $12\text{ V}$ and the current flow is $0.5\text{ A}$. We'll use these to calculate: 

$$ 
\begin{align*} 
     R &= \frac {V}{I} \\ 
     &= \frac{12\text{ V}}{0.5\text{ A}} \\ 
     &=  24 \,\Omega . 
 \end{align*}  
 $$ 

So, the resistance of the resistor is $24$ Ohms. 

(b) The power dissipated in the resistor (P): 

Now that we know the voltage across and current through the circuit, and have calculated the resistance above, we can calculate the electrical power using: 

$$ 
\begin{align*} 
     P &= IV \\ 
     &= I^2R \\
     &= \frac {V^2}{R} .  
 \end{align*} …

Excerpt — the full answer is on the round page.

R50 · Thin lens equation: image distance and magnification Open round →
Given that the lens has a focal length ($f$) of $10 \text{ cm}$ and the object distance ($d_{\mathrm O}$) is $15 \text {cm}$, we can use the thin lens equation to find image distance ($d_{\mathrm I}$):

$$

\begin{equation*}
    \frac{1}{f} = \frac{1}{d_{\mathrm{O}}} + \frac{1}{d_{\mathrm{I}}}\, .
\end{equation*}
$$

Plugging in the values:

$$

\begin{align*}
    \frac{1}{0.10} &= \frac{1}{0.15} + \frac{1}{d_{\mathrm I}}\\
    10 &= 6.67 + \frac{1}{d_{\mathrm I}} \\
    3.33 & = \frac{1}{d_{\mathrm I}} \\
    d_{\mathrm I} & = 0.30 \text {cm}\, .\\
\end{align*}
$$

(a) The image distance ($d_{\mathrm I}$) is $0.30$ cm behind the lens. 

Now we can calculate magnification ($m$) using:

$$

\begin{equation*}
    m = - \frac{d_{\mathrm{I}}}{d_{\mathrm O}}\, .
\end{equation*}
$$

Plugging in the values: 

$$

\begin{align*}
   m & = -\frac{0.30 \text { cm}}{15 \tex …

Excerpt — the full answer is on the round page.

R51 · Heat required to warm water (specific heat capacity) Open round →
To calculate the amount of heat energy required to raise the temperature of $2\text{ kg}$ of water from $20^\circ\text{C}$ to $80^\circ\text{C}$, we'll use the formula:
$$Q = m \cdot c \cdot ΔT, $$
where 
- $m$ is the mass of the substance ($2\text{ kg}$),
- $c$ is the specific heat capacity of water ($4186\frac{\text{J}}{\text{kg}\cdot\text{K}})$, and
- $\Delta T = 80^\circ\text{C} - 20 ^\circ\text{C}$ is the temperature change. 

Plugging in these values:
$$Q = (2 \text{ kg})(4186 \frac{\text{J}}{\text{kg}\cdot\text{K}})((80^\circ\text{C} - 20 ^\circ\text{C}))= 1000,320 \text{ J}.$$

Thus the amount of heat energy required is $\boxed{1000,320 \text{ J}}$ or about $\boxed{1.00 \text{ kJ}}$.
R52 · Fermi estimate: how many piano tuners in a 10-million-person city? Open round →
Here is a rough estimate using Fermi estimation for the number of professional piano tuners in a city with 10 million people: 

Assumption Chain:

1. Total Households: Assuming an average household size, say 4 persons per household, we can estimate that there are approximately 2.5 million households in a city of 10 million people (10,000,000 / 4). 

2. Piano-Owning Households: Let's assume conservatively that only 1 out of every 100 households owns a piano. Thus, the number of households with pianos is estimated to be around 25,000 (2.5 million x 1/100). 

3. Piano Tuning Frequency: On average, a piano needs to be tuned about once or twice a year. Let's assume an average of one tuning per year for simplicity. 

4. Tunings Per Tuner: A professional piano tuner can typically tune around 200 pianos annually, considering the time needed for each tuning and other administrative tasks. 

Now, …

Excerpt — the full answer is on the round page.

R53 · Why is the sky blue? (conceptual) Open round →
The sky appears blue during the day due to a fascinating physical phenomenon called Rayleigh scattering. 

When sunlight, which is white light composed of all colors, enters Earth's atmosphere, it interacts with gas molecules and tiny particles in the air, such as nitrogen and oxygen. These molecules are much smaller than the wavelength of visible light. As a result, they scatter the shorter wavelengths of light (blue and violet) more strongly compared to the longer wavelengths (red and orange). 

This scattering process sends blue light in various directions, including towards our eyes when we look up at the sky. Thus, we perceive the sky as being blue even though the Sun itself appears yellow or white from Earth's surface. The phenomenon is named after Lord Rayleigh, who first described this effect scientifically.
R54 · Time dilation: why do moving clocks run slow? (conceptual, special relativity) Open round →
Special relativity tells us that time is not absolute but rather depends on an observer's frame of reference. Time dilation occurs when there are two objects or observers moving at a constant velocity with respect to each other; they will measure time differently due to their relative motion. 

Imagine two observers, Alice and Bob, each in their own spaceship traveling past each other at high speed. From the perspective of Alice, she sees herself as stationary while Bob is zooming by her very fast. Due to this rapid movement, some interesting effects occur according to special relativity. One such effect is that time appears to slow down for Bob when observed from Alice's reference frame. In other words, if Alice has a clock on her spaceship and compares it to the one in Bob's ship, she will notice that his clock ticks slower than hers. 

This doesn't mean that his clock actually runs sl …

Excerpt — the full answer is on the round page.

R101 · Langton's ant building a highway Open round →
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Langton's Ant</title>
    <style>
      body {
        margin: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100vh;
        background-color: #222;
      }

      canvas {
        border: 2px solid #333;
        image-rendering: optimizeSpeed; /* Older versions of Firefox */
        image-rendering: -moz-crisp-edges; /* Firefox */
        image-rendering: -webkit-optimize-contrast; /* Safari */
        image-rendering: pixelated;
      }
    </style>
  </head>

  <body>
    <canvas></canvas>

    <script>
      let canvas = document.querySelector('canvas')
      let ctx = canvas.getContext('2d')

      const cellSize = 6
      const gridWidth = 100
      const gridHeight = 90
      const antSpeed = 25

      class Ant {
        constructor() { …

Excerpt — the full answer is on the round page.

R102 · Rule 110 growing line by line Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Rule 110 Cellular Automaton</title>
    <style>
        body { margin: 0; }
        canvas { border: solid black 2px; background: white; display: block; margin: auto; }
    </style>
</head>
<body>
    <canvas id="ca" width="500" height="500"></canvas>
<script>
const ca = document.getElementById("ca");
const ctx = ca.getContext("2d");
let running = false;
let rowCountdown = 1;
let frameCountdown = 7;
function draw() {
    if (!running) return;
        requestAnimationFrame(draw); 
    const w = ca.width / 3, h = ca.height / 500;
    ctx.clearRect(0, 0, ca.width, ca.height);
    ctx.fillStyle = "black";
    for (let x = 1; x < w - 1; ++x) {
        if (!frameCountdown--) {
            --rowCountdown; frameCountdown = 7; }
        const y = Math.floor(ca.height / h * rowCountdown);
        ctx.fillRect(x*3 …

Excerpt — the full answer is on the round page.

R103 · Wireworld with a clock and a diode Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Wireworld Circuit</title>
    <style>
        body { margin:0; }
        canvas { border:1px solid black; }
    </style>
</head>
<body>
    <canvas id="circuit"></canvas>

    <script>
        const CELL_EMPTY = 0, CELL_CONDUCTOR = 1, CELL_HEAD = 2, CELL_TAIL = 3;

        let canvas, ctx, width, height, cellSize, stepCountEl, electronCountEl, stepCount = 0, electronCount = 0, running = false,
            circuit = [], diodeStartX = null, diodeStartY = null;

        function init() {
            canvas = document.getElementById('circuit');
            ctx = canvas.getContext('2d');

            width = height = 16 * (8 + 3); // 16 cells plus 3 pixel gap each side
            cellSize = Math.min(width, height) / width;
            canvas.width = width * cellSize;
            canvas.height = height * cel …

Excerpt — the full answer is on the round page.

R104 · Abelian sandpile toppling Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Abelian Sandpile</title>
    <style>
        body { margin: 0; }
        canvas { display: block; image-rendering: -moz-crisp-edges; image-rendering: -webkit-crisp-edges; image-rendering: pixelated; image-rendering: crisp-edges; }
    </style>
</head>
<body>
    <canvas></canvas>
    <script>
        let drops = 0, topples = 0;
        const colors = ["#4158D0", "#A43EEB", "#E22CBF", "#FF6161", "#FFA801"];

        function randomInt(min, max) {
            return Math.floor(Math.random() * (max - min + 1)) + min;
        }

        class Grid {
            constructor(size = 400, cellSize = 15) {
                this.grid = new Array(size).fill(null).map(() => new Array(size).fill({ grains: 0 }));
                this.canvas = document.querySelector("canvas");
                this.ctx = this.canvas.get …

Excerpt — the full answer is on the round page.

R105 · Brian's Brain Open round →
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Brian's Brain</title>

    <style>
        body { background: #0A1216; color: whitesmoke; font-family: monospace,monospace; }
        canvas { border: 5px solid #97C3E1; display: block; margin: 2vmin auto; }
    </style>
</head>
<body>

    <h1>Brian's Brain</h1>
    
    <p>A cellular automaton.</p>

    <canvas></canvas>

    <script type="text/javascript">

        const canvas = document.querySelector('canvas')
        ,   context = canvas.getContext('2d')
        ;

        const cw = ( canvas.width  = Math.floor( window.innerWidth / 10 ) * 8 ),
              ch = ( canvas.height = Math.floor( window.innerHeight / 9 ) * 7 )
            ,   grid = Array(ch).fill().map(() => Array(cw).fill(Math.random() > 0.5))
        ;

        let gen = 1;
        
        function drawGrid(){

            const bg = cont …

Excerpt — the full answer is on the round page.

R106 · Truchet tiles rearranging Open round →
<!DOCTYPE html>
<html>
  <head>
    <style>
      body { margin: 0; }
      canvas { display: block; cursor: crosshair; }
    </style>
  </head>
  <body>
    <canvas></canvas>

    <script>
      const canvas = document.querySelector('canvas')
      const ctx = canvas.getContext('2d')

      let gridSize = 50
      let tilesFlipped = 0

      function drawTile(x, y, orientation) {
        ctx.save()

        // Translate to the tile position and scale for the grid size
        ctx.translate(x * gridSize + gridSize / 2, y * gridSize + gridSize / 2)
        ctx.scale(gridSize / 100, gridSize / 100)

        if (orientation === 'right') {
          // Draw a quarter circle for the right tile part
          ctx.beginPath()
          ctx.arc(50, 0, 50, Math.PI * 3 / 2, -Math.PI / 2, false)
          ctx.fillStyle = '#ffffff'
          ctx.fill()
        } else {
          // Draw a quarter ci …

Excerpt — the full answer is on the round page.

R107 · Hilbert curve drawing itself Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Hilbert Curve</title>
    <style>
        body {
            margin: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            background: #2d3436;
        }
        canvas {
            border: 3px solid #f3c72a;
        }
    </style>
</head>
<body>
    <canvas id="hilbertCanvas"></canvas>
    <script>
        const canvas = document.getElementById('hilbertCanvas');
        const ctx = canvas.getContext('2d');
        let order = 6;
        let points = [];

        function getHilbertPoints(x, y, level) {
            if (level === 0) return [[x, y]];

            const A = getHilbertPoints(x, y, level - 1);
            const B = getHilbertPoints(x + 1, y, level - 1);
            const C = getHilbertPoints(x, y + 1, level …

Excerpt — the full answer is on the round page.

R108 · Interlocking star pattern on a grid Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Islamic Star Pattern</title>
    <style>
        body {
            margin: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            background-color: #0e0e12;
        }
        canvas {
            border: 3px solid #ff6a00;
        }
    </style>
</head>
<body>
    <canvas id="myCanvas"></canvas>

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

        let gridSize = 50; // Initial grid size
        let rotationSpeed = 0.01; // Speed of rotation (adjust as needed)

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

            const cel …

Excerpt — the full answer is on the round page.

R109 · Moire from two rotating rasters Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Moire Effect Animation</title>
    <style>
        body {
            margin: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            background-color: black;
        }
        canvas {
            border: 2px solid #fff;
        }
    </style>
</head>
<body>
    <canvas id="moireCanvas"></canvas>

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

        let angle = 0;
        let offsetX = 0;
        let finished = false;
        const ringCount = Math.floor(Math.random() * 15) + 30; // Random number of rings, min: 30, max: 45
        const radiusStep = canvas.width / (ringCo …

Excerpt — the full answer is on the round page.

R110 · Penrose-style aperiodic tiling growing Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Aperiodic Rhombus Tiling</title>
    <style>
        body {
            margin: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            background-color: #f4f4f4;
        }
        canvas {
            border: 2px solid black;
            background-color: white;
        }
    </style>
</head>
<body>
    <canvas id="aperiodicTiling"></canvas>
    <script>
        const canvas = document.getElementById('aperiodicTiling');
        const ctx = canvas.getContext('2d');
        
        let generation = 0;
        let tileCount = 1;

        function drawRhombus(x, y, width, color) {
            ctx.beginPath();
            ctx.moveTo(x + width / 2, y); …

Excerpt — the full answer is on the round page.

R111 · Ant colony laying pheromone trails Open round →
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Ant Colony Simulation</title>
    <style>
        body {
            margin: 0;
            overflow: hidden;
        }
        canvas {
            width: 100vw;
            height: 100vh;
        }
    </style>
</head>
<body>
    <canvas id="simulation"></canvas>

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

        let ants = [];
        let foodSources = [];
        let pheromoneField = [];
        let antCount = 50;
        let foodFound = 0;

        function createAnt() {
            return {
                x: Math.random() * canvas.width,
                y: Math.random() * canvas.height,
                angle: Math.random() * 2 * Math.PI, …

Excerpt — the full answer is on the round page.

R112 · Physarum slime-mould network Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Physarum Simulation</title>
    <style>
        body { margin: 0; }
        canvas { display: block; image-rendering: -moz-crisp-edges; image-rendering: -webkit-crisp-edges; image-rendering: pixelated; image-rendering: crisp-edges; }
    </style>
</head>
<body>
    <canvas></canvas>
    <script>
        const canvas = document.querySelector('canvas')
        const ctx = canvas.getContext('2d')
        let width = 0, height = 0
        let trailMap, agentCount, step, angle
        let startX, startY

        function init() {
            width = canvas.width = window.innerWidth;
            height = canvas.height = window.innerHeight;
            ctx.fillStyle = "black";
            ctx.fillRect(0, 0, width …

Excerpt — the full answer is on the round page.

R113 · Predator and prey on a shared field Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Predators and Prey Simulation</title>
    <style>
        body { margin: 0; }
        canvas { border: 2px solid black; display: block; }
    </style>
</head>
<body>
    <canvas id="world"></canvas>
    <script>
        const WORLD = document.getElementById('world');
        const SIM = WORLD.getContext('2d');

        let FOOD, PREY, PREDATORS;
        let FOOD_GROWTH = 0.5; 
        let FOOD_SPEED = 1;
        let PREY_REPRODUCTION_RATE = 0.3;
        let PREDATOR_HUNGER_RATE = 0.8;
        let PREDATOR_SPEED = 2;

        const WORLD_WIDTH = WORLD.width = window.innerWidth; 
        const WORLD_HEIGHT = WORLD.height = window.innerHeight;

        function init() {
            FOOD = []; 
            PREY = []; 
            PREDATORS = []; 

            for (let i=0; i<WORLD_WIDTH*WORLD_HEIGHT/5000; i …

Excerpt — the full answer is on the round page.

R114 · Traffic jam from nothing Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Nagel-Schreckenberg Simulation</title>
    <style>
        body { margin: 0; }
        canvas { border: solid 1px black; background: white; display: block; margin: auto; max-width: 100%; height: auto;}
    </style>
</head>
<body>
    <canvas id="grid" width="800" height="250"></canvas>

    <script>
        const canvas = document.getElementById('grid');
        const ctx = canvas.getContext('2d');
        let cars, maxSpeed, dawdleProb;

        function init() {
            reset();
            animate();
        }

        function reset() {
            const numCars = 80; 
            maxSpeed = 15;
            dawdleProb = 0.3;
            const spacing = canvas.width / (numCars + 1);
            
            cars = Array.from({ length: numCars }, () => ({
                x: i => i * spacing, …

Excerpt — the full answer is on the round page.

R115 · Crowd leaving through a bottleneck Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Crowd Simulation</title>
    <style>
        body {
            margin: 0;
            overflow: hidden;
            background-color: #111;
        }
        canvas {
            display: block;
        }
    </style>
</head>
<body>
    <canvas id="simulationCanvas"></canvas>
    <script>
        const canvas = document.getElementById('simulationCanvas');
        const ctx = canvas.getContext('2d');
        
        let people = [];
        let MAX_PEOPLE = 300;
        let roomWidth = 400;
        let roomHeight = 400;
        let exitX = roomWidth - 50;
        let doorWidth = 100;

        function createPeople() {
            for (let i = 0; i < MAX_PEOPLE; i++) {
                people.push({
                    x: Math.ran …

Excerpt — the full answer is on the round page.

R116 · Bresenham circles and lines, pixel by pixel Open round →
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>Bresenham's Algorithm Animation</title>
    <style>
      body {
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100vh;
        background-color: #f4f4f4;
      }
      canvas {
        border: 2px solid black;
        background: white;
      }
    </style>
  </head>
  <body>
    <canvas id="bresenhamCanvas"></canvas>

    <script>
      (function () {
        'use strict';

        const canvas = document.getElementById('bresenhamCanvas');
        const context = canvas.getContext('2d');

        function drawLine(x0, y0, x1, y1) {
          let dx = Math.abs(x1 - x0);
          let dy = Math.abs(y1 - y0);
          let sx = x0 < x1 ? 1 : -1;
          let sy = y0 < y1 ? 1 : -1;
          let err = dx - dy;

          while (true) { …

Excerpt — the full answer is on the round page.

R117 · De Casteljau construction of a Bezier curve Open round →
<!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]+ …

Excerpt — the full answer is on the round page.

R118 · Sutherland-Hodgman polygon clipping Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Sutherland-Hodgman Clipping</title>
    <style>
        body {
            margin: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
        }
        #canvas-wrapper {
            background: rgba(255, 255, 255, 0.7);
            padding: 3px;
            border: 1px solid black;
        }
    </style>
</head>
<body>
    <div id="canvas-wrapper">
        <canvas id="myCanvas" width="600" height="400"></canvas>
    </div>

    <script>
        const canvas = document.getElementById("myCanvas");
        const ctx = canvas.getContext("2d");

        // Clipping window dimensions
        let winWidth = 500;
        let winHeight = 300;

        function randomInt(min, max) {
            return Math.floor(Math.random() * (max - min …

Excerpt — the full answer is on the round page.

R119 · Floyd-Steinberg dithering a gradient Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Floyd-Steinberg Dithering</title>
    <style>
        body {
            margin: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
        }
        #animation-container {
            position: relative;
            width: 640px;
            height: 360px;
        }
    </style>
</head>
<body>
    <div id="animation-container">
        <canvas id="ditheringCanvas" width="640" height="360"></canvas>
        <p class="info">Palette Size: <span id="paletteSize">N/A</span></p>
        <p class="info">Frame: <span id="frameCount">N/A</span></p>
    </div>

    <script>
        const canvas = document.getElementById('ditheringCanvas');
        const ctx = canv …

Excerpt — the full answer is on the round page.

R120 · Scanline fill of a self-intersecting polygon Open round →
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<title>Scanline Algorithm</title>
		<style>
			body { margin: 0; }
			canvas { display: block; }
		</style>
	</head>

	<body>

		<script>

			const canvas = document.createElement('canvas');
			document.body.append(canvas);
			const ctx = canvas.getContext('2d');

			let w = window.innerWidth, h = window.innerHeight;
			if (w > 800) {
				w = 800;
                h = Math.round(800 * (h / w));
            }
			canvas.width = w;
			canvas.height = h;

			const a_step = 2 * Math.PI / 36, b_step = 1.5 * Math.PI / 36, c_step = .87 * Math.PI / 36, d_step = 4 * Math.PI / 36;

			let a = 0, b = 0, c = 0, d = 0;

			function init() {
				a = Math.random() * (2 * Math.PI);
				b = Math.random() * (2 * Math.PI) - .5;
				c =  1 + Math.random() * (1.3);
				d = 0;
			}

			function drawPoint(x, y) {
                ctx.fillStyle …

Excerpt — the full answer is on the round page.

R121 · A* pathfinding search across an obstacle grid Open round →
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>A* Search Visualization</title>
    <style>
      body {
        margin: 0;
        overflow: hidden;
      }

      button {
        position: absolute;
        top: 10px;
        right: 10px;
        z-index: 999;
      }
    </style>
  </head>

  <body>
    <button id="restartButton">Restart</button>

    <canvas id="aStarCanvas"></canvas>

    <script>
      const canvas = document.getElementById("aStarCanvas");
      const ctx = canvas.getContext("2d");
      canvas.width = window.innerWidth;
      canvas.height = window.innerHeight;

      let restartButton = document.getElementById("restartButton");
      function restart() {
        generateMaze();
        drawGrid();
      }

      restartButton.addEventListener('click', restart);

      const gridSize = 20;
      const cellSize = Math.floor(canvas …

Excerpt — the full answer is on the round page.

R122 · Randomized maze generation via recursive backtracking Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Randomized Maze Generation</title>
    <style>
        body {
            margin: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            background-color: #f4f4f4;
        }
        canvas {
            border: 2px solid black;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
        }
    </style>
</head>
<body>
    <canvas id="mazeCanvas"></canvas>
    <script>
        const canvas = document.getElementById("mazeCanvas");
        const ctx = canvas.getContext("2d");

        let width = 50; // Grid width (number of cells)
        let height = 50; // Grid height (number of cells)
        let cellSize = Math.min(canvas.width / width, canvas.he …

Excerpt — the full answer is on the round page.

R123 · Breadth-first flood fill spreading through a region Open round →
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Breadth-First Flood Fill</title>
    <style type="text/css">
        body {
            margin: 0;
            overflow: hidden;
        }
        canvas {
            display: block;
        }    
    </style>
</head>
<body>
<canvas></canvas>
<script type="application/javascript">
    const colors = ["#6F6", "#AF8", "#ED9"]; // 3 shades of green for distance coloring

    function randomInt(n) { return Math.floor(Math.random() * n); } // helper func for random int in [0,n)
    
    function drawGrid(ctx, w, h) {
        ctx.fillStyle = "#262"; ctx.fillRect(0, 0, w, h); // dark green background
        for (let x=1; x<w; x++) ctx.lineWidth=1, ctx.strokeStyle="#474", ctx.beginPath(), 
        ctx.moveTo(.5+x,.5), ctx.lineTo(.5+x,h-.5), ctx.stroke(); // verts
        for (let y=1; y<h; ++y) ctx.strokeStyle="#363" …

Excerpt — the full answer is on the round page.

R124 · Dijkstra's shortest path over weighted terrain Open round →
<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8">
		<title>Dijkstra's Algorithm Animation</title>
        <style>
			body {
				background: black;
			}
            canvas{
                image-rendering: pixelated;
            }
		</style>
	</head>

	<body>
		
		<canvas id="grid" width="600px" height="600px"></canvas>

		<script>

			const grid = document.getElementById("grid");
			// The canvas context with image smoothing disabled
            const ctx = grid.getContext("2d", {willReadFrequently: true});

            // Size of the canvas and each cell in pixels (must be square)
            const cellSizePx = 10;
            const widthCells = Math.round(grid.width / cellSizePx);
            const heightCells = Math.round(grid.height / cellSizePx);

            // The number of cells
            const numCells = widthCells * heightCells;
            let gridCosts = new …

Excerpt — the full answer is on the round page.

R125 · Voronoi diagram growing by multi-source flood fill Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Voronoi Animation</title>
    <style>
        body {
            background: #2F3640; /* Dark background */
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
        }
        canvas {
            border: 2px solid #fff; /* White border for the canvas */
        }
    </style>
</head>
<body>
    <canvas id="voronoiCanvas"></canvas>

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

        let width = window.innerWidth;
        let height = window.innerHeight;

        canvas.width = width; 
        canvas.height = height; 

        class Seed {
            cons …

Excerpt — the full answer is on the round page.