qwen3:14b
Low participation: this average comes from only 19 of 179 rounds (11%). Not directly comparable to models with fuller participation.
Rounds & answers 179
▶ R1 · Constrained product copy under a strict word count★ 6.5/10 Open round →
Keep whiskers twitching with our durable stainless-steel pet fountain. Its pumping system ensures constant circulation, providing fresh, inviting water for even the pickiest cat. The tough construction resists rust and is non-toxic, making it a healthy choice for your companion. Easy to clean and built to last years of fun drinking sessions. Help maintain optimal hydration easily. Treat your kitty to better wellness today.
▶ R2 · Photorealistic hero-image prompt engineering★ 7/10 Open round →
▶ R3 · Bouncing-ball physics: gravity, friction, elastic collisionsDNF★ 0/10 Open round →
▶ R4 · Sorting race: bubble vs insertion vs quicksort★ 2/10 Open round →
▶ R5 · Creative coding: an animated solar system★ 6/10 Open round →
▶ R6 · Extraction → JSON10.8 s Open round →
{"name": "AquaPur X2 Trinkbrunnen", "brand": "PetFlow", "price_eur": 29.99, "weight_g": 800, "features": ["Dreifach-Filter", "extrem leisem 2-Watt-Pumpsystem", "spuelmaschinenfestem Edelstahlaufsatz"], "in_stock": false}▶ R7 · Sentiment classification2.5 s Open round →
[{"id":1,"sentiment":"positive"},{"id":2,"sentiment":"negative"},{"id":3,"sentiment":"neutral"},{"id":4,"sentiment":"negative"},{"id":5,"sentiment":"positive"},{"id":6,"sentiment":"neutral"},{"id":7,"sentiment":"neutral"},{"id":8,"sentiment":"negative"},{"id":9,"sentiment":"positive"},{"id":10,"sentiment":"neutral"}]▶ R8 · Translation DE↔EN14.6 s Open round →
That's an old chestnut—life punishes those who come too late. We dragged this car out of the mud, but we can't leap ahead or count our chickens before they hatch. --- Man muss es ausprobieren: Unser knapper Etat zwang uns, Kompromisse einzugehen/Ecken abzuschneiden, doch der Start verlief trotzdem reibungslos.
▶ R9 · One-liner code2.9 s Open round →
1. `^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[01])$`
2. `SELECT customer_id, SUM(amount) FROM orders GROUP BY customer_id ORDER BY 2 DESC LIMIT 5;`
3. `.items[].id`
4. `nav a[href^="http"]`
5. `awk '{print $1}' access.log | sort -u | wc -l`▶ R10 · Facts quiz11.5 s Open round →
1. Canberra 2. 1989 3. W 4. Teapot 5. Franz Kafka 6. Jupiter 7. 101010 8. 443 9. Linus Torvalds 10. 97
▶ R11 · Micro-copy & slogans9.8 s Open round →
1. Hydrate your cat the smart way. 2. Small batch charm. Big taste. 3. Cut through the AI noise. Know which one works. 4. Enter a pocket of perfect silence. 5. Stop remembering passwords. Start living.
▶ R13 · Image prompts8.1 s Open round →
1. Hyperrealistic photo of an ergonomic gaming chair center frame. Surrounding it is a high-tech streaming desk bathed in vivid cyan and magenta neon lighting. Cinematic composition. 2. Close-up shot of an artisanal gin bottle placed on a dark wooden bar top. Moody, late evening ambient light with striking reflections and deep depth of field focus. 3. Photorealistic image of an e-scooter parked against a richly textured, colorful graffiti wall. Bright yet diffused urban morning sunlight capturing grit and shine.
▶ R14 · Product names2.2 s Open round →
1. H2O Reminder—Sip smarter, live healthier. 2. QuenchFlow—Your personalized hydration coach. 3. AquaGuide—Never forget a glass of water. 4. HydroMate—Making healthy habits effortless. 5. ThirstSync—Stay refreshed, day and night.
▶ R15 · CSS spinner4.6 s Open round →
```html
<div class="spinner"></div>
<style>
.spinner {
border: 4px solid rgba(0, 0, 0, .1);
border-top-color: #3498db;
width: 50px;
height: 50px;
border-radius: 50%;
animation: spin 1s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
</style>
```▶ R16 · Explain it to a child (German)9 s Open round →
Ein Akku ist wie ein kleiner, chemischer Wassertank, der Energie für dein Spielzeug speichert. Im Inneren reagieren spezielle Chemikalien miteinander und bauen so eine enorme „Stromkraft“ auf, die fließt. Diese Kraft drückt winzige Teilchen namens Elektronen aus dem Akku heraus, sodass sie durch Kabel strömen können. Diese wandernden Elektronen liefern dann genau den nötigen Energie-Stoß, damit Motoren starten oder Lichter funkeln.
▶ R17 · Logic riddle14.7 s★ 8/10 Open round →
Sie müssen aus der Kiste ziehen, die mit „Gemischt“ beschriftet ist. Da alle Etiketten falsch sind, muss diese Box entweder nur Äpfel oder nur Birnen enthalten (sie kann nicht gemischt sein). Nehmen Sie beispielsweise einen Apfel, dann enthält die Kiste „Gemischt“ tatsächlich nur Äpfel. Die ursprüngliche "Äpfel"-Kiste darf also keine Äpfel mehr enthalten und muss mit Birnen oder Gemischt gefüllt sein; ebenso ist die "Birnen"-Kiste nicht korrekt benannt. Das bedeutet, dass die Kiste „Birnen“ zwangsläufig „Gemischt“ sein muss (da ansonsten der Kreislauf nicht geschlossen werden kann). Dann folgt: Die Kiste „Äpfel“ enthält Birnen.
▶ R18 · German registers & tone8.9 s★ 8/10 Open round →
1. Aufgrund unvorhergesehener Umstände ist es uns leider nicht möglich, den ursprünglich vereinbarten Liefertermin einzuhalten. 2. Update: Der geplante Liefertermin lässt sich terminlich nicht halten; wir melden umgehend einen neuen Zeitplan. 3. Sorry, aber der Termin mit der Lieferung wird heute definitiv nichts, müssen das verschieben.
▶ R19 · Table QA10.8 s★ 10/10 Open round →
1. VitaSip 2. 830 3. PureFlow 4. 19,51 EUR 5. 3
▶ R20 · JSON repair8 s★ 10/10 Open round →
{"name": "Trinkflasche Pro", "price": 29.90, "tags": ["outdoor", "sport"], "stock": {"berlin": 12, "muenchen": 7, "hamburg": null}, "active": true}▶ R21 · Sorting race bubble/insertion/selection36.2 s★ 1.5/10 Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Sort Racer</title>
<style>
body { font-family: sans-serif; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; background: #f0f0f0; }
#container { display: flex; gap: 20px; max-width: 90vw; }
canvas { border: 1px solid #ccc; background: white; }
h3 { margin-bottom: 5px; text-align: center; font-size: 1.1em; }
</style>
</head>
<body>
<div id="container">
<div><h3>Bubble Sort</h3><canvas id="bubbleCanvas" width="600" height="200"></canvas></div>
<div><h3>Insertion Sort</h3><canvas id="insertionCanvas" width="600" height="200"></canvas></div>
<div><h3>Selection Sort</h3><canvas id="selectionCanvas" width="600" height="200"></canvas></div>
</div>
<script>
const N = 40;
const CANVAS_W = 600;
const CANVAS_H = 200;
let shu …Excerpt — the full answer is on the round page.
▶ R22 · Hexagon balls47.3 s★ 0.5/10 Open round →
```html
<!DOCTYPE html>
<html>
<head>
<title>Hexagon Physics Sim</title>
<style>body{margin:0;overflow:hidden;background:#111}canvas{display:block}</style>
</head>
<body>
<canvas id="c"></canvas>
<script>
const c = document.getElementById('c');
const ctx = c.getContext('2d');
ctx.lineWidth = 2;
let W = window.innerWidth;
let H = window.innerHeight;
c.width = W;
c.height = H;
const NUM_BALLS = 8;
const CONTAINER_R = Math.min(W, H) * 0.45;
const BALL_RADIUS = 10;
const G = 0.2;
let angleOffset = 0;
let balls = [];
for (let i = 0; i < NUM_BALLS; i++) {
balls.push({
x: W * (i + 1) / (NUM_BALLS + 1),
y: H * (i + 1) / (NUM_BALLS + 1),
vx: Math.random() * 2 - 1,
vy: Math.random() * 2 - 1,
r: BALL_RADIUS * (0.9 + i * 0.05)
});
}
function getHexVertices(angle) {
const R = CONTAINER_R;
let V = [];
for (let i = …Excerpt — the full answer is on the round page.
▶ R23 · Pendulum wave15.3 s★ 8.5/10 Open round →
```html
<!DOCTYPE html>
<html>
<head><title>Pendulum Wave Simulation</title></head>
<body><canvas id="c"></canvas><script>
let c = document.getElementById('c');
let ctx = c.getContext('2d', {alpha: false});
const N = 15;
const LANGLEN = 300;
const GRAVITY = 9.8;
const K = 0.02; // Coupling Constant
const h = 1; // Distance between bobs
c.width = 700; c.height = 450;
let l = [];
let x_angle = Array(N).fill(Math.PI / 6);
let y_angle = Array(N).fill(Math.PI / 6); // Slopes
let mass = Array(N).fill(1);
let len = Array(N).fill(LANGLEN * (0.9 + Math.random() * 0.2));
for(let i=0; i<N; i++){
l[i] = len[i];
}
function updatePhysics() {
for(let i=0; i<N; i++){
if (i > 0) x_angle[i] -= K * Math.sin(y_angle[i - 1]) / l[i];
}
x_angle[0] += K * Math.sin(Math.PI/2);
for(let i=0; i<N; i++){
y_angle[i] = x_angle[i] + ((GRAVITY / (l[i] * l …Excerpt — the full answer is on the round page.
▶ R24 · Maze race BFS/DFS/A*39.4 s★ 1.5/10 Open round →
```html
<!DOCTYPE html>
<html>
<head>
<title>Pathfinding Race</title>
<style>
body {display: flex; justify-content: space-around; font-family: sans-serif;}
canvas {border: 2px solid black; background-color: #eee; margin: 10px;}
h3 {align-self: center; width: 100%;}
</style>
</head>
<body onload="init()">
<div id="container">
<h3>BFS</h3>
<canvas id="bfsCanvas" width="625" height="625"></canvas>
</div>
<div id="container">
<h3>DFS</h3>
<canvas id="dfsCanvas" width="625" height="625"></canvas>
</div>
<div id="container">
<h3>A*</h3>
<canvas id="aStarCanvas" width="625" height="625"></canvas>
</div>
<script>
const SIZE = 25;
const W = 625;
const CELL_SIZE = 25;
let mazeGrid = [];
function init() {
mazeGrid = generateMaze();
drawInitialState('bfsCanvas');
drawInitialState('dfsCanvas');
drawInitialState('aStarCanvas') …Excerpt — the full answer is on the round page.
▶ R25 · Sorting race quick/merge/heap40.5 s★ 1/10 Open round →
```html
<!DOCTYPE html>
<html><head><title>Triple Sort Race</title></head><style>body{display:flex;align-items:center;justify-content:center;background:#1e1e2f}canvas{border:1px solid #444;margin:5px}</style><body><canvas id="c" width="800" height="300"></canvas><script>const c=document.getElementById("c");let ctx=c.getContext("2d");const N=60,W=250,H=280;let A=(Array(N)).fill(0).map(()=>Math.floor(Math.random()*100)+1);let D={q:[],m:[],h:[]};function draw(){ctx.clearRect(0,0,W*3,c.height);}function renderStep(panelId, steps){if(!steps.length)return;const panel=parseInt(panelId)/N;const maxVal=100;const xOffset=panel*W+5+20;ctx.fillStyle='#222';ctx.fillRect(xOffset-10,0,W,c.height);let dataPoint={A: [...A], s=[]};steps.forEach(s=>{dataPoint.s.push(s)});drawBars(panelId, {...dataPoint.A}, dataPoint.s[dataPoint.s.length-1]);}(d,arr,s)=>{ctx.fillStyle='#222';ctx.fillRect …Excerpt — the full answer is on the round page.
▶ R26 · Projectile ballistics22 s★ 1/10 Open round →
<!DOCTYPE html>
<html><head><title>Projectile Motion</title></head><body><canvas id="c"></canvas><script>const c=document.getElementById("c");let ctx=c.getContext("2d");ctx.lineWidth=4;c.width=800;c.height=400;const G=9.8;const V0=15;let balls=[];let time_elapsed=0;const A=[20, 35, 50, 65, 75];function init(){balls=[];time_elapsed=0;$A.forEach((angle,i)=>{balls.push({angle:angle*Math.PI/180,vx:V0*Math.cos(angle*Math.PI/180),vy:V0*Math.sin(angle*Math.PI/180),x:20,y:c.height-50,isActive:true,trail:[{x:20,y:c.height-50}],color:#FF0000,(i+1)*30+(i===4?0:1));});}init();let lastTime=0;function update(time){if(!balls[0]?.isActive && time_elapsed>0){setTimeout(()=>{(balls=[],lastTime=0,update()),500)};return;}const delta=time-lastTime;lastTime=time;for(let i=0;i<balls.length;i++){const b=balls[i];if(!b.isActive)continue;t+=delta/1000;b.x+=b.vx*delta/1000;b.y+=b.vy*delta/1000-(0.5*G*(delta/1000)* …Excerpt — the full answer is on the round page.
▶ R27 · Double-pendulum chaos25.8 s★ 1/10 Open round →
```html
<!DOCTYPE html>
<html>
<head><title>Double Pendulum Chaos</title></head>
<body><canvas id="c"></canvas><script>
const c = document.getElementById('c');
const ctx = c.getContext('2d');
c.width = 800;c.height = 600;
let T = { L: 150, M: 6, G: 9.8 };
let angleA = [Math.PI/2, Math.PI/2]; // Theta_1 (left), Theta_2 (right)
let omega = [[0, 0], [0, 0]]; // Angular velocities
let trail = [{ x: [], y: [] }, { x: [], y: [] }];
const init = () => {
angleA[0] = Math.PI / 2;
angleA[1] = Math.PI / 2 + 0.001; // Initial difference
omega[0] = [0, 0][0]; omega[1] = [0, 0][0];
};
const updatePhysics = () => {
let a1 = angleA[0], o1 = omega[0][0];
let a2 = angleA[1], o2 = omega[1][0];
// Constants scaled by L^2/G for stability and size management
const d = T.L * Math.cos(a1 - a2);
const num1 = -gravity*(T.M + T.M)/T.L - (T.M*Math.sin …Excerpt — the full answer is on the round page.
▶ R28 · Particle fountain17.2 s★ 8.5/10 Open round →
<!DOCTYPE html>
<html>
<body><canvas id="c"></canvas><input type="range" id="w" min="-0.5" max="0.5" step="0.01" value="0.0">
<script>
const canvas = document.getElementById('c');
const ctx = canvas.getContext('2d');
let width, height;
function resize() {
width = window.innerWidth * 0.8;
height = window.innerHeight * 0.6;
canvas.width = width;
canvas.height = height;
}
window.addEventListener('resize', resize);
resize();
const particles = [];
const numParticles = 200;
const emitCount = 5; // Particles emitted per frame refresh cycle (for continuous feel)
let emitterX, emitterY;
// Physics constants
const GRAVITY = 0.1;
const DAMPING = 0.6;
function Particle(x, y, vx, vy) {
this.x = x;
this.y = y;
this.vx = vx;
this.vy = vy;
}
Particle.prototype.update = function(wind) {
this.vy += GRAVITY;
this.vx = (this.vx * 0.9 …Excerpt — the full answer is on the round page.
▶ R29 · Orbital mechanics22.2 s★ 1/10 Open round →
```html
<!DOCTYPE html>
<html>
<head>
<title>N-Body Orbit Simulation</title>
<style>body {margin:0;overflow:hidden;background-color:#000;}</style>
</head>
<body>
<canvas id="c"></canvas><script>
const canvas = document.getElementById('c');
const ctx = canvas.getContext('2d');
let width = window.innerWidth;
let height = window.innerHeight;
canvas.width = width;
canvas.height = height;
function Body(x, y, vx, vy, r, m, color) {
this.x = x; this.y = y;
this.vx = vx; this.vy = vy;
this.r = r; this.m = m;
this.color = color;
this.trail = [];
}
const G = 100; // Gravitational constant scale factor, adjusted for visualization speed
let planets = [
new Body(width/2 - 150, height/2, 0 - Math.sqrt((G * 1e10) / 150), 0, 8, 1e9, 'cyan'), // Planet 1 (Semi-circular, faster velocity)
new Body(width/2 + 100, height/2, 0, Math.sqrt((G …Excerpt — the full answer is on the round page.
▶ R30 · Spring-mass chain28.7 s★ 1/10 Open round →
<!DOCTYPE html>
<html lang="en">
<head><title>Spring-Mass Chain</title></head>
<body><canvas id="c"></canvas><script>const canvas = document.getElementById('c');const ctx = canvas.getContext('2d');let N=12;let L=600,H=50;canvas.width=L;canvas.height=H*2;let pos={x:[],y:[]};let vel={vx:[],vy:[]};let isDragging=false;let draggedIndex=-1;$={length:N,map:()=>({x:Math.random()*L, y:H+(Math.random()-0.5)*H*2}),initializeSimulation();function initializeSimulation(){pos[0]={x:50,y:H},pos[N-1]={x:L-50,y:H];for(let i=1;i<N-1;i++){pos[i]={x:Math.random()*L, y:H+(Math.random()-0.5)*H*2}}});const k_spring=0.05;const damping=0.98;const dt=0.1;function updatePhysics(){for(let i=1;i<N-1;i++){if(!isDragging || draggedIndex !== i){pos[i].x+=vel.vx[i]*dt;pos[i].y+=vel.vy[i]*dt;}else{pos[i]={{x:lastMouseX, y:lastMouseY}}}}}let forces={vx:new Array(N).fill(0),vy:new Array(N).fill(0)};for( …Excerpt — the full answer is on the round page.
▶ R31 · Bat and ball (the classic reasoning trap) Open round →
Der Ball kostet **0,05 Euro**. **Begründung:** Man setzt den Kostenunterschied in die Gesamtrechnung ein: $S + B = 1,10$ und $S = B + 1,00$. Durch Substitution ergibt sich also $(B + 1,00) + B = 1,10$, was vereinfacht zu $2 \cdot B = 0,10$ führt. Somit beträgt der Preis des Balls $0,05 Euro.
▶ R32 · Four houses, four clues (constraint puzzle) Open round →
Die Reihenfolge der Häuser von Position 1 bis 4 ist wie folgt:
| Position | Farbe |
| :---: | :---: |
| **1** | Grün |
| **2** | Rot |
| **3** | Blau |
| **4** | Gelb |
***
### Begründung
1. **Grünes Haus (Position 1):** Laut Fakt (2) steht das grüne Haus an Position 1.
*(Reihe: [Grün, ?, ?, ?])*
2. **Blaues Haus und die Abfolge Rot-Blau-Gelb:**
* Fakt (1) sagt, dass Rot direkt links von Blau steht ($\text{R} \rightarrow \text{B}$).
* Fakt (3) sagt, dass Gelb direkt rechts von Blau steht ($\text{B} \rightarrow \text{Y}$).
* Daraus ergibt sich eine feste Abfolge von drei Häusern: **Rot - Blau - Gelb** ($\text{R} \rightarrow \text{B} \rightarrow \text{Y}$).
3. **Platzierung:** Da das grüne Haus bereits an Position 1 steht, muss die Gruppe Rot-Blau-Gelb die verbleibenden drei Plätze (Position 2 bis 4) einnehmen.
* Position 2 = Rot
* Position 3 = Blau
* Posit …Excerpt — the full answer is on the round page.
▶ R33 · Idioms that break literal translation (EN→DE) Open round →
1) **to bite the bullet** – Die bittere Pille schlucken 2) **the ball is in your court** – Es liegt an dir / Jetzt bist du dran 3) **it's raining cats and dogs** – Es gießt wie aus Eimern
▶ R34 · Constrained taglines (word ban + length cap) Open round →
1. Bambus reinigt sanft. Gut für dich. 2. Plastikfreie Pflege für dein strahlendes Lächeln. 3. Dein Mund, der Planet: Jetzt wechseln.
▶ R35 · Minutes in a (non-leap) year — show the math Open round →
**Weg nachvollziehbar:**
1. **Tage in Stunden umrechnen:**
Ein Jahr hat 365 Tage und jeder Tag hat 24 Stunden.
$$365 \text{ Tage} \times 24 \frac{\text{Stunden}}{\text{Tag}} = 8760 \text{ Stunden}$$
2. **Stunden in Minuten umrechnen:**
Es gibt 8760 Stunden und jede Stunde hat 60 Minuten.
$$8760 \text{ Stunden} \times 60 \frac{\text{Minuten}}{\text{Stunde}} = 525.600 \text{ Minuten}$$
**Endergebnis:**
525600▶ R36 · Continue the sequence (doubling gaps) Open round →
Die nächste Zahl ist **33**. **Regel:** Die Differenz zwischen aufeinanderfolgenden Zahlen verdoppelt sich bei jedem Schritt ($+1, +2, +4, +8, \dots$).
▶ R37 · False friend: 'control' EN→DE Open round →
Bevor wir es veröffentlichen/ausliefern, muss ich die Testergebnisse überprüfen und schließlich noch zwei Bugs beheben.
▶ R38 · Register shift: formal → casual (DE) Open round →
Hey! Kurze Info: Das Meeting muss leider auf morgen um 10 Uhr verschoben werden. Bis dann! 😊
▶ R39 · 40-word product blurb with 3 required words Open round →
Entdecken Sie unsere Premium-Edelstahlflasche für Ihren Alltag. Das auslaufsichere Design garantiert Sicherheit unterwegs. Halten Sie Ihr Getränk stundenlang perfekt temperiert – egal ob im Büro oder beim Sport. Robust und spülmaschinenfest ist sie der ideale, nachhaltige Begleiter.
▶ R40 · isPalindrome (ignore case & non-alphanumerics) Open round →
function isPalindrome(s) {
const cleanedS = s.toLowerCase().replace(/[^a-z0-9]/g, '');
let left = 0;
let right = cleanedS.length - 1;
while (left < right) {
if (cleanedS[left] !== cleanedS[right]) {
return false;
}
left++;
right--;
}
return true;
}▶ R41 · Prose → valid JSON Open round →
```json
{
"name": "Anna Schmidt",
"alter": 30,
"stadt": "Freiburg",
"hobbys": [
"Lesen",
"Radfahren"
],
"newsletter_abonniert": true
}
```▶ R42 · All but nine (word-problem trap) Open round →
9. Es sind noch neun Schafe am Leben.
▶ R43 · Five machines (rate-reasoning trap) Open round →
5 Minuten Die Zeit hängt nicht von der Anzahl der Maschinen ab, solange die Maschine schnell genug ist und es keine Engpässe gibt. Da Sie die Anzahl der Maschinen und die benötigte Teilemenge im Verhältnis 1:20 erhöhen (von 5 auf 100), bleibt das Verhältnisse des optimalen Arbeitsflusses erhalten. Die ursprüngliche Bedingung definiert, dass dieser Prozess konstant in 5 Minuten abgeschlossen wird.
▶ R44 · Appointment extraction to strict JSON Open round →
```json
[
{
"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 overreact to it—all in all, we can live with it. *(Alternative idiomatic options depending on context: "It's nothing special, but let's keep our cool; ultimately, we can manage.")*
▶ R46 · Energy conservation on a frictionless incline Open round →
This problem requires using the principle of conservation of mechanical energy, which states that since the incline is frictionless, the total initial energy ($\text{E}_i$) equals the total final energy ($\text{E}_f$).
$$ \text{E}_i = \text{E}_f $$
$$ \text{KE}_i + \text{PE}_i = \text{KE}_f + \text{PE}_f $$
### Given Values:
* Mass ($m$): $2 \text{ kg}$
* Initial speed ($v_i$): $0 \text{ m/s}$ (starts from rest)
* Drop height ($\Delta h = H$): $5 \text{ m}$
* Gravity ($g$): $9.8 \text{ m/s}^2$
### 1. Initial Energy Calculation:
* Initial Kinetic Energy ($\text{KE}_i$): $\frac{1}{2} m v_i^2 = \frac{1}{2} (2 \text{ kg}) (0)^2 = 0 \text{ J}$
* Initial Potential Energy ($\text{PE}_i$): $m g H = (2 \text{ kg})(9.8 \text{ m/s}^2)(5 \text{ m}) = 98 \text{ J}$
* **Total Initial Energy $\text{E}_i$**: $0 \text{ J} + 98 \text{ J} = 98 \text{ J}$
### 2. Final Energy Calculation:
* …Excerpt — the full answer is on the round page.
▶ R47 · Unit conversion: km/h to m/s and mph Open round →
This problem requires two separate unit conversions for the speed of 108 km/h.
---
### (a) Conversion to meters per second ($\text{m/s}$)
To convert kilometers per hour ($\text{km/h}$) to meters per second ($\text{m/s}$), we use the following conversion factors:
* $1 \text{ km} = 1000 \text{ m}$
* $1 \text{ h} = 3600 \text{ s}$
**Conversion Steps:**
$$\text{Speed} = 108 \frac{\text{km}}{\text{h}} \times \left(\frac{1000 \text{ m}}{1 \text{ km}}\right) \times \left(\frac{1 \text{ h}}{3600 \text{ s}}\right)$$
$$\text{Speed} = \frac{108 \times 1000}{3600} \frac{\text{m}}{\text{s}}$$
$$\text{Speed} = \frac{108000}{3600} \frac{\text{m}}{\text{s}}$$
$$\text{Speed} = 30 \text{ m/s}$$
**Final Answer (a):** $30.0 \text{ m/s}$
---
### (b) Conversion to miles per hour ($\text{mph}$)
We are given the conversion factor: $1 \text{ mile} = 1.60934 \text{ km}$.
To convert $\text{km/h}$ to …Excerpt — the full answer is on the round page.
▶ R48 · Low-orbit satellite: speed and period (orbital/Kepler estimate) Open round →
This problem requires calculating the orbital radius first, then using that value to find the speed and finally the period.
### Given Values:
* Earth's Radius ($R_E$): $6371 \text{ km}$
* Altitude ($h$): $400 \text{ km}$
* Standard Gravitational Parameter ($\mu$): $398600 \text{ km}^3/\text{s}^2$
***
### Step 1: Calculate the Orbital Radius ($r$)
The orbital radius is the sum of Earth's radius and the altitude.
$$r = R_E + h$$
$$r = 6371 \text{ km} + 400 \text{ km}$$
$$\mathbf{r = 6771 \text{ km}}$$
***
### (a) Estimate the Orbital Speed ($v$)
We use the formula for orbital speed in▶ R49 · Ohm's law: resistance and power dissipation Open round →
Here is the step-by-step calculation using Ohm's Law and the power formulas.
### Given Information:
* Voltage ($\text{V}$) = $12\ \text{V}$
* Current ($I$) = $0.5\ \text{A}$
---
### (a) Resistance of the Resistor ($R$)
Ohm's Law states that $V = I \times R$. To find the resistance, we rearrange the formula:
$$R = \frac{V}{I}$$
**Calculation:**
$$R = \frac{12\ \text{V}}{0.5\ \text{A}}$$
$$R = 24\ \Omega$$
The resistance of the resistor is **$24\ \Omega$**.
---
### (b) Electrical Power Dissipated ($P$)
The electrical power dissipated can be calculated using the formula:
$$P = V \times I$$
(Alternatively, $P = I^2R$ or $P = \frac{V^2}{R}$)
Using the voltage and current values (the most direct method):
**Calculation:**
$$P = 12\ \text{V} \times 0.5\ \text{A}$$
$$P = 6\ \text{W}$$
The electrical power dissipated is **$6\ \text{W}$**.
---
### Summary of Results:
(a) Resistance ($ …Excerpt — the full answer is on the round page.
▶ R50 · Thin lens equation: image distance and magnification Open round →
This problem uses the thin lens equation to determine the location and characteristics of an image formed by a convex lens.
### Given Values:
* Focal length ($f$): $+10 \text{ cm}$ (Positive for a converging lens)
* Object distance ($d_o$): $+15 \text{ cm}$
* Thin Lens Equation: $\frac{1}{f} = \frac{1}{d_o} + \frac{1}{d_i}$
***
### (a) Calculate the image distance $d_i$
We rearrange the thin lens equation to solve for $\frac{1}{d_i}$:
$$\frac{1}{d_i} = \frac{1}{f} - \frac{1}{d_o}$$
Substitute the given values:
$$\frac{1}{d_i} = \frac{1}{10 \text{ cm}} - \frac{1}{15 \text{ cm}}$$
To subtract the fractions, find a common denominator (which is 30):
$$\frac{1}{d_i} = \left(\frac{3}{30}\right) - \left(\frac{2}{30}\right)$$
$$\frac{1}{d_i} = \frac{3 - 2}{30}$$
$$\frac{1}{d_i} = \frac{1}{30 \text{ cm}}$$
Invert the expression to find $d_i$:
$$d_i = +30 \text{ cm}$$
**The image dis …Excerpt — the full answer is on the round page.
▶ R51 · Heat required to warm water (specific heat capacity) Open round →
This problem requires using the formula for heat energy transfer:
$$Q = m \cdot c \cdot \Delta T$$
Where:
* $Q$ is the heat energy required (in Joules, J)
* $m$ is the mass (in kg)
* $c$ is the specific heat capacity (in $\text{J}/(\text{kg}\cdot\text{K})$)
* $\Delta T$ is the change in temperature ($\text{T}_{\text{final}} - \text{T}_{\text{initial}}$) (in K or $^\circ\text{C}$)
---
### 1. Identify Given Values and Calculate $\Delta T$
* Mass ($m$) = $2 \text{ kg}$
* Specific Heat Capacity ($c$) = $4186 \text{ J}/(\text{kg}\cdot\text{K})$
* Initial Temperature ($\text{T}_{\text{initial}}$) = $20^\circ\text{C}$
* Final Temperature ($\text{T}_{\text{final}}$) = $80^\circ\text{C}$
**Calculate the change in temperature ($\Delta T$):**
$$\Delta T = 80^\circ\text{C} - 20^\circ\text{C}$$
$$\Delta T = 60^\circ\text{C}$$
*(Note: Since we are calculating a temperature differ …Excerpt — the full answer is on the round page.
▶ R52 · Fermi estimate: how many piano tuners in a 10-million-person city? Open round →
This estimation requires building an assumption chain from population size down to annual demand and finally to professional capacity.
***
### 🎹 Fermi Estimation: Piano Tuners in a City of 10 Million People
#### **Step 1: Estimate Total Households**
* **Assumption:** We need the number of households, not just people. In a large modern city, let's assume an average household size of roughly 2.5 people.
* **Calculation:** $10,000,000 \text{ people} / 2.5 \text{ people/household} = 4,000,000$ households.
#### **Step 2: Estimate Piano Ownership (The Base Inventory)**
* **Assumption:** Pianos are expensive and large items; they are not common household goods like TVs or refrigerators. They tend to be associated with specific socioeconomic groups or dedicated music families. We will assume that, on average, one piano exists for every $75$ households in the city (a generous estimate) …Excerpt — the full answer is on the round page.
▶ R53 · Why is the sky blue? (conceptual) Open round →
Think of sunlight not as one single color, but as a mix of all the colors in a rainbow—red, orange, yellow, green, blue, and violet. Here is the simple explanation for why our sky looks blue: ### The Simple Explanation When the sun’s light reaches Earth, it has to travel through our atmosphere, which is made up of tiny gas molecules (mostly nitrogen and oxygen). These molecules act like billions of microscopic speed bumps or mirrors. When the sunlight hits these air particles, the colors are scattered differently. * **Longer waves** of light (like red and orange) tend to pass straight through the atmosphere without much trouble. * **Shorter waves** of light (like blue and violet) are much more easily bumped, deflected, and bounced all over the place by those tiny air molecules. Because the blue light is scattered everywhere—bounced from every molecule in the sky—it seems to com …
Excerpt — the full answer is on the round page.
▶ R54 · Time dilation: why do moving clocks run slow? (conceptual, special relativity) Open round →
This explanation relies entirely on the fundamental premise of Special Relativity: **the speed of light in a vacuum is constant for everyone, no matter how fast they are moving.** This single rule dictates how space and time must stretch and contract to maintain consistency across all viewpoints. --- ## Part 1: Why the Clock Appears Slow (Time Dilation) To understand why a moving clock runs slow, we have to ignore our everyday intuition about time and focus only on that unbreakable rule: *the speed of light is always $c$.* ### The Thought Experiment (The Light Clock) Imagine a special type of clock—a "light clock." This clock doesn't use gears; it measures time by sending a pulse of light up to a mirror and having it bounce back down. One full "tick" is the time it takes for one round trip of light. **1. The Observer at Rest (You):** If you are standing next to the clock, the light …
Excerpt — the full answer is on the round page.
▶ R55 · The double-slit experiment and wave-particle duality (conceptual, quantum mechanics) Open round →
This explanation relies on conceptual understanding, so think of "wave" and "particle" not as separate things, but as two descriptions that apply to a single object depending on how we look at it. --- ## 🔬 The Double-Slit Experiment Explained ### Part 1: What is Observed (The Wave Behavior) Imagine you are firing tiny particles—like electrons or photons of light—at a screen placed behind an array of two narrow slits. Crucially, these particles are sent through **one at a time**, giving them time to hit the detector and be recorded individually. **Observation 1: No Detector Present (Unobserved)** When we observe the pattern on the final screen, it is not simply two piles of dots (which would happen if they acted like simple bullets). Instead, the pattern is an **interference pattern**. * **What this means:** The pattern consists of alternating bands of high intensity and low inte …
Excerpt — the full answer is on the round page.
▶ R56 · Double-slit interference, particle by particle Open round →
```html
<!DOCTYPE html>
<html>
<head>
<title>Double Slit Interference</title>
<style>body { background: #000; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; }</style>
</head>
<body>
<canvas id="slitCanvas" width="800" height="400" style="border: 2px solid #333;"></canvas>
<script>
const canvas = document.getElementById('slitCanvas');
const ctx = canvas.getContext('2d');
const W = canvas.width;
const H = canvas.height;
let particleCount = 0;
let animationFrameId = null;
// Simulation Parameters (Visual representation)
const SLIT_WIDTH = 15;
const SLIT_GAP = 60;
const DETECTOR_START_X = W * 0.75;
const DETECTION_RANGE = W - DETECTOR_START_X;
/**
* Calculates the probability density function for interference at a given position (x).
* Uses a simplified sinusoidal model to simulate constructive/destructive interference fringes.
*/
funct …Excerpt — the full answer is on the round page.
▶ R57 · Hanging rope with Verlet integration Open round →
```html
<!DOCTYPE html>
<html>
<head>
<title>Verlet Rope Simulation</title>
<style>body { margin: 0; overflow: hidden; background-color: #111; }</style>
</head>
<body>
<canvas id="c"></canvas>
<script>
const canvas = document.getElementById('c');
const ctx = canvas.getContext('2d');
let W, H;
function resizeCanvas() {
W = window.innerWidth;
H = window.innerHeight * 0.8;
canvas.width = W;
canvas.height = H;
}
window.addEventListener('resize', resizeCanvas);
resizeCanvas();
const N_MASSES = 40;
const ITERATIONS = 10;
const GRAVITY = 9.8 / 60; // Adjusted for frame rate
const SPRING_STRENGTH = 0.8;
let px = new Array(N_MASSES);
let pv = new Array(N_MASSES);
for (let i = 0; i < N_MASSES; i++) {
px[i] = [W * 0.2 + (i - N_MASSES / 2) * 4, H * 0.1];
pv[i] = [...px[i]];
}
function simulate() {
for (let i = 0; i < N_MASSES; i++) {
const p = px[i];
c …Excerpt — the full answer is on the round page.
▶ R58 · 2D wave propagation with reflection Open round →
```html
<!DOCTYPE html>
<html>
<head>
<title>2D Wave Simulation</title>
<style>body { margin: 0; background: #000; }</style>
</head>
<body>
<canvas id="waveCanvas"></canvas>
<script>
const canvas = document.getElementById('waveCanvas');
let ctx = canvas.getContext('2d');
// Grid dimensions (must be at least 120x90)
const W = 120; // Width cells
const H = 90; // Height cells
const PIXEL_SCALE = 4; // Scale factor for visualization size
canvas.width = W * PIXEL_SCALE;
canvas.height = H * PIXEL_SCALE;
// Simulation arrays (U[y][x])
let uCurrent = Array(H).fill(0).map(() => new Float32Array(W));
let uPrev = Array(H).fill(0).map(() => new Float32Array(W));
let uNext = Array(H).fill(0).map(() => new Float32Array(W));
const damping = 0.99; // Damping coefficient
const dt = 0.1; // Time step / simulation constant
let pulseTimer = 0;
function initialize() {
for (let y = 0; y < H; y+ …Excerpt — the full answer is on the round page.
▶ R59 · Billiard break with spin and friction Open round →
```html
<!DOCTYPE html>
<html>
<head><title>Billiard Break</title></head>
<body style="margin: 0; background-color: #2c3e50;"><canvas id="billiardsCanvas" width="800" height="450" style="background-color: #1abc9c; border: 10px solid #2ecc71;"></canvas><script>
const canvas = document.getElementById('billiardsCanvas');
const ctx = canvas.getContext('2d');
let balls = [];
let isBreaking = false;
let frameCount = 0;
const R = 8; // Ball radius
const FRICTION = 0.995;
const STOP_THRESHOLD = 0.1;
const TABLE_WIDTH = canvas.width - 20;
const TABLE_HEIGHT = canvas.height - 20;
function initRack() {
balls = [];
// Cue Ball (Ball 0)
balls.push({ x: 50, y: 225, vx: 10, vy: 0, radius: R, id: 0, color: 'white', isCue: true });
// Rack of 10 balls (Numbered 1 to 10)
for (let i = 0; i < 3; i++) { // Rows (i=0 is top)
for (let j = 0; j < 4 - Math.min(i, 2); j++) { // Col …Excerpt — the full answer is on the round page.
▶ R60 · Dijkstra vs A* on a weighted grid Open round →
```html
<!DOCTYPE html>
<html>
<head><meta charset="UTF-8"><title>Dijkstra vs A*</title></head>
<style>body{display:flex;align-items:center;height:100vh;margin:0;background:#222}canvas{border:1px solid #444;}</style>
<body><canvas id="canvas" width="600" height="400"></canvas><script>
const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d');
let GRID_W = 30, GRID_H = 20;
let START = {x: 0, y: 0};
let END = {x: GRID_W - 1, y: GRID_H - 1};
let grid = [];
function generateGrid() {
grid = [];
for (let i = 0; i < GRID_H; i++) {
let row = [];
for (let j = 0; j < GRID_W; j++) {
row.push({x: j, y: i, cost: Math.floor(Math.random() * 3) + 1});
}
grid.push(row);
}
}
function getNeighbors(r, c) {
const n = [];
[[0, 1], [0, -1], [1, 0], [-1, 0]].forEach(([dr, dc]) => {
const nr = r + dr;
c …Excerpt — the full answer is on the round page.
▶ R61 · Convex hull built step by step Open round →
```html
<!DOCTYPE html>
<html>
<head>
<title>Graham Scan Animation</title>
<style>body {margin:0;overflow:hidden;}#canvas {display:block;background-color:#111;}</style>
</head>
<body>
<canvas id="canvas"></canvas>
<script>
const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d');
let W, H;
function resize() {W=window.innerWidth;H=window.innerHeight;canvas.width=W;canvas.height=H;}
resize();window.addEventListener('resize', resize);
let points = [];
let P0 = null;
let sortedPoints = [];
let hullStack = [];
let step = 0;
let running = false;
const N_POINTS = 40;
function generatePoints() {
points = [];
for (let i = 0; i < N_POINTS; i++) {
points.push({x: Math.random() * W, y: Math.random() * H});
}
}
// Cross product / Orientation check
function orientation(p, q, r) {
const val = (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y); …Excerpt — the full answer is on the round page.
▶ R62 · Huffman tree from letter frequencies Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Huffman Coding Visualization</title>
<style>
body { font-family: monospace; background: #111; color: #eee; display: flex; flex-direction: column; align-items: center; margin: 0; padding-top: 20px; }
#canvasContainer { border: 1px solid #333; margin-bottom: 20px; background: #000; }
h2 { color: #4CAF50; }
</style>
</head>
<body>
<h2>Huffman Tree Construction</h2>
<div id="canvasContainer">
<canvas id="huffmanCanvas" width="900" height="600"></canvas>
</div>
<h3>Results</h3>
<pre id="results"></pre>
<script>
const canvas = document.getElementById('huffmanCanvas');
const ctx = canvas.getContext('2d');
let animationFrameId;
function setup(sentence) {
const freq = {};
for (const char of …Excerpt — the full answer is on the round page.
▶ R63 · Kruskal's MST with union-find Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Kruskal's MST</title>
<style>body {margin:0;overflow:hidden;background:#111;}canvas {display:block;background:#222;}</style>
</head>
<body>
<canvas id="mstCanvas"></canvas>
<script>
const canvas = document.getElementById('mstCanvas');
const ctx = canvas.getContext('2d');
let N = 25;
let nodes, edges, parent, rank;
let acceptedCount = 0;
let totalWeight = 0;
let activeEdges = [];
let animationFrameId = null;
canvas.width = window.innerWidth;
canvas.height = window.innerHeight - 30;
function generateGraph() {
nodes = Array(N).fill(0).map((_, i) => ({ x: Math.random() * canvas.width, y: Math.random() * canvas.height }));
let edgeSet = new Set();
for (let i = 0; i < N; i++) {
for (let j = i + 1; j < N; j++) {
if (Math.random() < 0.7) { // Adjust density …Excerpt — the full answer is on the round page.
▶ R64 · N-Queens solved by backtracking Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>Animated 8 Queens</title></head>
<body>
<canvas id="board"></canvas><div id="stats"></div>
<script>
const canvas = document.getElementById('board');
const ctx = canvas.getContext('2d');
let N = 8;
let queens = [];
let placementCount = 0;
let backtrackCount = 0;
let animationFrameId = null;
const STATS_DIV = document.getElementById('stats');
function setBoardSize(size) {
N = size;
canvas.width = 500 + N * 20;
canvas.height = 500 + N * 20;
}
function drawBoard() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
const cellSize = 40;
for (let i = 0; i < N; i++) {
for (let j = 0; j < N; j++) {
ctx.fillStyle = (i + j) % 2 === 0 ? '#f0d9b5' : '#b58863';
ctx.fillRect(j * cellSize, i * cellSize, cellSize, cellSize);
}
}
}
function drawQueen(row, col …Excerpt — the full answer is on the round page.
▶ R65 · Delaunay triangulation, triangle by triangle Open round →
<!DOCTYPE html>
<html>
<head><title>Delaunay Incremental</title></head>
<body><canvas id="d"></canvas><script>const c=document.getElementById('d');c.width=800;c.height=600;const ctx=c.getContext('2d');let points=[];let triangles=[];let currentPointIndex=0;let maxPoints=30;let isRunning=true;</script><script>function generatePoints(){points=[];for(let i=0;i<maxPoints;i++){points.push({x:Math.random()*c.width,y:Math.random()*c.height})}}generatePoints();</script><script>const getCircumCenterAndRadius=(p1,p2,p3)=>{const D=((p2.x-p1.x)*((p3.y-p1.y)-(p2.y-p1.y)))-(p2.y-p1.y)*((p3.x-p1.x)-(p2.x-p1.x));if(D===0)return null;const p1sq=p1.x**2+p1.y**2;const p2sq=p2.x**2+p2.y**2;const p3sq=p3.x**2+p3.y**2;const center_x=((p1sq*(p2.y-p3.y)+p2sq*(p3.y-p1.y)+p3sq*(p1.y-p2.y))/(D*2));const center_y=((p1sq*(p3.x-p2.x)+p2sq*(p1.x-p3.x)+p3sq*(p2.x-p1.x))/(D*2));return({x:center_x,y:center_y,r:Math.sqrt(( …Excerpt — the full answer is on the round page.
▶ R66 · AVL tree rebalancing with rotations Open round →
```html
<!DOCTYPE html>
<html>
<head><title>Animated AVL Tree</title></head>
<body id="body">
<canvas id="avlCanvas" style="border: 1px solid #ccc;"></canvas>
<div id="info">Height: 0 | Rotations: 0</div>
<script>
let canvas, ctx, infoDiv;
const CANVAS_W = 800;
const CANVAS_H = 500;
class Node {
constructor(key) {
this.key = key;
this.height = 1;
this.left = null;
this.right = null;
this.bf = 0;
this.x = 0;
this.y = 0;
}
}
let currentRoot = null;
let rotationCount = 0;
let animationActive = false;
const MAX_KEYS = 20;
let keysToInsert = [];
function setup() {
canvas = document.getElementById('avlCanvas');
ctx = canvas.getContext('2d');
infoDiv = document.getElementById('info');
canvas.width = CANVAS_W;
canvas.height = CANVAS_H;
}
// --- AVL Helper Functions ---
function height(node) { return node ? n …Excerpt — the full answer is on the round page.
▶ R67 · Sieve of Eratosthenes on a number grid Open round →
```html
<!DOCTYPE html>
<html>
<head>
<title>Sieve of Eratosthenes</title>
<style>body{display:flex;justify-content:center;align-items:center;height:100vh;margin:0;background:#222;color:#eee}#container{padding:20px;border-radius:10px;background:#333;box-shadow:0 0 15px rgba(0,0,0,0.5)}canvas{border:1px solid #444;display:block}#stats{margin-top:15px;font-family:monospace;color:#ccc}
</style>
</head>
<body>
<div id="container">
<canvas id="sieveCanvas" width="800" height="320"></canvas>
<div id="stats">Primes Found: <span id="primesCount">0</span> | Eliminated: <span id="eliminatedCount">0</span></div>
</div>
<script>
const canvas = document.getElementById('sieveCanvas');
const ctx = canvas.getContext('2d');
const N = 400;
const COLS = Math.ceil(Math.sqrt(N));
const CELL_SIZE = (canvas.width / COLS);
let isRunning = true;
let state = {
isSieve: false,
primeIndex: 0,
primesF …Excerpt — the full answer is on the round page.
▶ R68 · Edit-distance DP matrix with backtrace Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Levenshtein Animation</title>
<style>
body { display: flex; flex-direction: column; align-items: center; font-family: monospace; background: #111; color: #eee; }
canvas { border: 2px solid #ccc; margin-top: 10px; background: #222; }
#output { margin-top: 20px; padding: 10px; min-height: 50px; border: 1px dashed #444; width: 90%; max-width: 600px; }
</style>
</head>
<body>
<canvas id="matrixCanvas" width="800" height="600"></canvas>
<div id="output">Initializing...</div>
<script>
const canvas = document.getElementById('matrixCanvas');
const ctx = canvas.getContext('2d');
let W1 = "JAVASCRIPT";
let W2 = "PYTHONCODE";
let M = []; // The DP matrix
let animating = true;
let currentCellX = 0;
let currentCellY = 0;
const N_ROWS = W2.length;
const N_COLS = W1.length;
ctx.fon …Excerpt — the full answer is on the round page.
▶ R69 · Replanning when the map changes Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Dynamic Grid Navigation</title>
<style>body { background: #111; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } canvas { border: 2px solid #333; }</style>
</head>
<body>
<canvas id="gameCanvas"></canvas>
<script>
const canvas = document.getElementById('gameCanvas');
const ctx = canvas.getContext('2d');
let COLS = 30, ROWS = 20;
let CELL_SIZE = 20;
canvas.width = COLS * CELL_SIZE;
canvas.height = ROWS * CELL_SIZE;
let map = Array(ROWS).fill(0).map(() => Array(COLS).fill(false)); // false=open, true=wall
let robotPos = { x: 1, y: 1 };
let goalPos = { x: COLS - 2, y: ROWS - 2 };
let currentPath = [];
let stepCount = 0;
let replanCounter = 0;
let game …Excerpt — the full answer is on the round page.
▶ R70 · Binary search, step by step Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Animated Binary Search</title>
<style>
body { background: #1e1e2e; color: white; font-family: monospace; display: flex; flex-direction: column; align-items: center; padding: 20px; }
#canvas { border: 1px solid #444; background: #27293d; }
.info { margin-top: 15px; font-size: 1.1em; }
</style>
</head>
<body>
<h1>Binary Search Simulation (N=40)</h1>
<canvas id="canvas" width="800" height="300"></canvas>
<div class="info">
Target Value: <span id="target-val"></span> | Comparisons: <span id="comp-count">0</span>
<p>(Greyed area is discarded)</p>
</div>
<script>
const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d');
const N = 40;
let array = [];
let target = 0; …Excerpt — the full answer is on the round page.
▶ R71 · Flood fill on a pixel grid Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Flood Fill Animation</title>
<style>body { background: #111; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; flex-direction: column;} canvas { border: 2px solid #444; }</style>
</head>
<body>
<canvas id="grid"></canvas>
<div id="stats">Filled Cells: 0 | Frontier Size: 0</div>
<script>
const canvas = document.getElementById('grid');
const ctx = canvas.getContext('2d');
const GRID_W = 60;
const GRID_H = 40;
canvas.width = GRID_W * 8;
canvas.height = GRID_H * 8;
let grid = [];
let startX, startY;
let queue = [];
let isAnimating = false;
function initializeGrid() {
grid = Array(GRID_H).fill(0).map(() => Array(GRID_W).fill(null));
for (let y …Excerpt — the full answer is on the round page.
▶ R72 · Maze generation by recursive backtracking Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Dynamic Maze Generator</title>
<style>
body { background: #1e1e1e; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; font-family: monospace; color: #ccc; }
canvas { border: 2px solid #444; background: #fff; }
</style>
</head>
<body>
<canvas id="mazeCanvas" width="600" height="400"></canvas>
<script>
const canvas = document.getElementById('mazeCanvas');
const ctx = canvas.getContext('2d');
// Dimensions (Maze grid size, scaled for drawing)
const COLS = 15; // Effective columns (30 cells / 2)
const ROWS = 10; // Effective rows (20 cells / 2)
const CELL_SIZE = 30; // Size of a single cell block
let visited = [];
let mazeState = [];
let stack = [];
let carve …Excerpt — the full answer is on the round page.
▶ R73 · KMP string search with prefix table Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>KMP Algorithm Visualization</title>
<style>body {background: #1a1a2e; color: white; font-family: monospace;} canvas {border: 1px solid #4c3b79; display: block; margin: 20px auto; background: #2a2a4a;}</style>
</head>
<body>
<canvas id="kmpCanvas"></canvas>
<script>
const canvas = document.getElementById('kmpCanvas');
const ctx = canvas.getContext('2d');
let T, P; // Text and Pattern
let lT, lP;
let pi; // Failure function (prefix table)
let k = 0; // Current text index
let j = 0; // Current pattern index
let comparisons = 0;
let matches = 0;
let animationRunning = true;
const CANVAS_WIDTH = 900;
const CANVAS_HEIGHT = 150;
canvas.width = CANVAS_WIDTH;
canvas.height = CANVAS_HEIGHT;
function generateRandom(min, max) { return Math.floor …Excerpt — the full answer is on the round page.
▶ R74 · Quadtree collision detection Open round →
<!DOCTYPE html>
<html>
<head>
<title>Quadtree Collision Demo</title>
<style>body {margin:0;overflow:hidden;}canvas{display:block;}</style>
</head>
<body>
<canvas id="c"></canvas>
<div id="metrics" style="position:absolute;top:10px;left:10px;color:#fff;font-family:monospace;"></div>
<script>
const canvas = document.getElementById('c');
const ctx = canvas.getContext('2d');
let W, H;
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
W = canvas.width;
H = canvas.height;
document.getElementById('metrics').style.fontSize = '14px';
const NUM_BALLS = 120;
let balls = [];
let quadroot;
class Ball {
constructor(r, x, y) {
this.r = r;
this.x = x;
this.y = y;
this.vx = (Math.random() - 0.5) * 2;
this.vy = (Math.random() - 0.5) * 2;
}
}
function init() {
balls = [];
for(let i=0; i<NUM_BALLS; i++) {
balls.push(new …Excerpt — the full answer is on the round page.
▶ R75 · Falling sand on a cell grid Open round →
```html
<!DOCTYPE html>
<html>
<head>
<title>Falling Sand Simulation</title>
<style>body { background: #000; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; }</style>
</head>
<body>
<canvas id="sandCanvas" width="300" height="600"></canvas>
<script>
const canvas = document.getElementById('sandCanvas');
const ctx = canvas.getContext('2d');
// Grid dimensions (150 columns, 100 rows) - Note: Canvas size is fixed at 300x600 for visual scaling
const COLS = 150;
const ROWS = 100;
const CELL_SIZE = 2; // Drawing scale factor
const GRAVITY = 1;
// State representation: 0 = Empty, 1 = Sand
let grid = [];
let stepCount = 0;
function initializeGrid() {
grid = Array(ROWS).fill(0).map(() => new Uint8Array(COLS));
stepCount = 0;
// Fill with some initial random sand for demonstration …Excerpt — the full answer is on the round page.
▶ R76 · Falling sand as free particles Open round →
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Continuous Sand Simulation</title>
<style>body {margin:0;overflow:hidden;background:#111;}canvas {display:block;border:1px solid #333;}</style>
</head>
<body>
<canvas id="sandCanvas"></canvas>
<script>
const canvas = document.getElementById('sandCanvas');
const ctx = canvas.getContext('2d');
let W, H;
let particles = [];
let restingParticles = [];
let frameCount = 0;
function setup() {
W = window.innerWidth * 0.95;
H = window.innerHeight * 0.8;
canvas.width = W;
canvas.height = H;
particles = [];
restingParticles = [];
}
function init() {
setup();
for (let i = 0; i < 1500; i++) {
particles.push({ x: Math.random() * W, y: -Math.random() * H, vx: 0, vy: 0 });
}
frameCount++;
}
function updatePhysics(p) {
const G = 9.8 / 60; // Gravity scaled for frame rat …Excerpt — the full answer is on the round page.
▶ R77 · Crowd leaving a room, cell by cell Open round →
```html
<!DOCTYPE html>
<html>
<head>
<title>Cell Grid Simulation</title>
<style>body {background:#222;display:flex;justify-content:center;align-items:center;height:100vh;margin:0;}canvas {border:1px solid #444;}</style>
</head>
<body>
<canvas id="gridCanvas" width="600" height="300"></canvas>
<script>
const canvas = document.getElementById('gridCanvas');
const ctx = canvas.getContext('2d');
const W = 40; // Grid width (cells)
const H = 30; // Grid height (cells)
const CELL_SIZE = 15;
const NUM_PEOPLE = 60;
const EXIT_X = 39;
const EXIT_Y = Math.floor(H / 2);
let people = [];
let running = true;
let stepCount = 0;
function initPeople() {
people = [];
for (let i = 0; i < NUM_PEOPLE; i++) {
let x, y;
do {
x = Math.floor(Math.random() * W);
y = Math.floor(Math.random() * H);
} while (x === EXIT_X && y === EXIT_Y);
people.pus …Excerpt — the full answer is on the round page.
▶ R78 · Crowd leaving a room by steering Open round →
```html
<!DOCTYPE html>
<html>
<head>
<title>Crowd Simulation</title>
<style>body {margin:0;overflow:hidden;}canvas {display:block;}</style>
</head>
<body>
<canvas id="c"></canvas>
<script>
const canvas = document.getElementById('c');
const ctx = canvas.getContext('2d');
let width, height;
function resize() {
width = window.innerWidth;
height = window.innerHeight;
canvas.width = width;
canvas.height = height;
}
window.addEventListener('resize', resize);
resize();
class Agent {
constructor(x, y) {
this.pos = { x: Math.random() * width, y: 0 };
this.vel = { x: (Math.random() - 0.5) * 0.5, y: 0 };
this.maxSpeed = 1.2;
this.separationDistanceSq = 400;
}
applyForce(force) {
this.vel.x += force.x * 0.1;
this.vel.y += force.y * 0.1;
}
separate(agents) {
let totalSeparation = { x: 0, y: 0 };
l …Excerpt — the full answer is on the round page.
▶ R79 · Aggregation on a lattice Open round →
<!DOCTYPE html>
<html><head><title>DLA</title></head><style>body{background:#111;display:flex;justify-content:center;align-items:center;height:100vh;margin:0;font-family:monospace;}canvas{border:1px solid #333;}</style><body><canvas id="dlaCanvas" width="400" height="300"></canvas><script>
const canvas = document.getElementById('dlaCanvas');
const ctx = canvas.getContext('2d');
let GRID_W = 200;
let GRID_H = 150;
let CELL_SIZE = 2; // Adjusted for visible detail on a smaller canvas
let grid;
let clusterSize = 0;
let walkerSteps = 0;
let animationFrameId = null;
function initialize() {
grid = Array(GRID_H).fill(0).map(() => Array(GRID_W).fill(false));
clusterSize = 0;
walkerSteps = 0;
ctx.clearRect(0, 0, canvas.width, canvas.height);
// Seed the starting cell (center)
const startX = Math.floor((GRID_W - 1) / 2);
const startY = Math.floor((GRID_H - 1) / 2); …Excerpt — the full answer is on the round page.
▶ R80 · Aggregation by continuous drift Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Particle Cluster Simulation</title>
<style>body {margin: 0; overflow: hidden;} canvas {display: block; background: #111;}</style>
</head>
<body>
<canvas id="c"></canvas>
<script>
const canvas = document.getElementById('c');
const ctx = canvas.getContext('2d');
let W, H;
function init() {
W = H = window.innerWidth < 800 ? window.innerWidth : 800;
canvas.width = W;
canvas.height = H;
particles = [];
stuckParticles = [];
seed = {x: W / 2, y: H / 2};
const N_PARTICLES = 800;
const STICK_RADIUS = 15;
const DRAG = 0.985;
for (let i = 0; i < N_PARTICLES; i++) {
particles.push({
x: Math.random() * W,
y: Math.random() * H,
vx: (Math.random() - 0.5) * 2,
vy: (Math.random() - 0.5) * 2,
stuck: false …Excerpt — the full answer is on the round page.
▶ R81 · Flocking birds with three rules Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Boid Simulation</title>
<style>
body { margin: 0; overflow: hidden; background-color: #111; }
canvas { display: block; }
#stats { position: absolute; top: 10px; left: 10px; color: white; font-family: monospace; z-index: 10; background: rgba(0, 0, 0, 0.5); padding: 10px; border-radius: 5px; }
</style>
</head>
<body>
<canvas id="boidCanvas"></canvas>
<div id="stats">Flocks: 0 | Avg Speed: 0.0</div>
<script>
const canvas = document.getElementById('boidCanvas');
const ctx = canvas.getContext('2d');
let WIDTH, HEIGHT;
// Simulation Parameters
const N_BIRDS = 200;
const MAX_SPEED = 5.0;
const MAX_FORCE = 0.1;
const SEPARATION_DISTANCE = 30;
const COHESION_RADIUS = 80;
let birds = []; …Excerpt — the full answer is on the round page.
▶ R82 · Conway's Game of Life with seeded patterns Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Game of Life</title>
<style>body { background: #111; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; flex-direction: column; } canvas { border: 2px solid #555; image-rendering: pixelated; } #stats { color: white; font-family: monospace; margin-top: 10px; }</style>
</head>
<body>
<canvas id="gameCanvas" width="600" height="480"></canvas>
<div id="stats">Generation: 0 | Population: 0</div>
<script>
const canvas = document.getElementById('gameCanvas');
const ctx = canvas.getContext('2d');
const W = 120;
const H = 80;
const CELL_SIZE = Math.min(canvas.width, canvas.height) / Math.max(W, H);
let grid = [];
let generation = 0;
let previousGrid = null;
let running = true;
// …Excerpt — the full answer is on the round page.
▶ R83 · Fourier epicycles tracing a shape Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Fourier Epicycles</title>
<style>body { margin: 0; overflow: hidden; background: #111; }</style>
</head>
<body>
<canvas id="c"></canvas>
<script>
const canvas = document.getElementById('c');
const ctx = canvas.getContext('2d');
let W, H;
let animationId;
function resize() {
W = window.innerWidth;
H = window.innerHeight;
canvas.width = W;
canvas.height = H * 0.8;
}
window.addEventListener('resize', resize);
resize();
let phase = 0;
const MAX_EPICYCLES = Math.min(12, Math.ceil(Math.log2(W)/50)); // Adaptive count based on canvas size
let epicycles = [];
let trailPoints = [];
let isRunning = true;
function initializeEpicycles() { …Excerpt — the full answer is on the round page.
▶ R84 · Voronoi cells with moving seeds Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Animated Voronoi Diagram</title>
<style>
body { margin: 0; display: flex; justify-content: center; align-items: center; height: 100vh; background: #111; }
canvas { border: 1px solid #444; }
</style>
</head>
<body>
<canvas id="voronoiCanvas"></canvas>
<script>
const canvas = document.getElementById('voronoiCanvas');
const ctx = canvas.getContext('2d');
let W, H;
const NUM_SEEDS = 25;
const GRID_SIZE = 30; // Samples per dimension (e.g., 30x30 grid)
const SPEED = 1.5;
const BUMP_ENERGY = 0.8;
let seeds = [];
let animationFrameId;
function init() {
W = H = window.innerWidth * 0.9 / 2; // Set canvas size dynamically, respecting aspect ratio
if (W > 800) W = 800; …Excerpt — the full answer is on the round page.
▶ R85 · Travelling salesman improved by 2-opt Open round →
```html
<!DOCTYPE html>
<html>
<head>
<title>2-Opt TSP Optimization</title>
<style>body {margin:0;overflow:hidden;}canvas {display:block;background:#111;}</style>
</head>
<body>
<canvas id="tspCanvas"></canvas>
<script>
const canvas = document.getElementById('tspCanvas');
const ctx = canvas.getContext('2d');
// Set canvas size based on screen dimensions for better viewing experience
let W, H;
function resize() {
W = window.innerWidth;
H = window.innerHeight;
canvas.width = W * 0.95;
canvas.height = H * 0.85;
}
window.addEventListener('resize', resize);
resize();
const NUM_CITIES = 60;
let cities = [];
let tour = [];
let currentLength = 0;
let improvements = 0;
// Helper function for distance squared (avoids Math.sqrt until necessary)
function distSq(p1, p2) {
return (p1[0] - p2[0])**2 + (p1[1] - p2[1])**2;
}
// Calculate Euclidean distance
function dist(p1, p2) { …Excerpt — the full answer is on the round page.
▶ R86 · Scrolling terrain from value noise Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Endless Noise World</title>
<style>
body { margin: 0; overflow: hidden; background: #000; }
canvas { display: block; cursor: default; }
</style>
</head>
<body>
<canvas id="c"></canvas>
<script>
const c = document.getElementById('c');
const ctx = c.getContext('2d');
let W, H;
let offset = 0;
const MAX_OCTAVES = 6;
const FREQ_BASE = 0.015;
const AMPLITUDE_BASE = 0.8;
function init() {
W = c.width = window.innerWidth;
H = c.height = window.innerHeight;
}
window.addEventListener('resize', () => {
c.width = c.height = W = H = Math.min(window.innerWidth, window.innerHeight); // Keep it square for simplicity if needed, or just use full size
W = c.width = window.innerWidth;
H = c.height = window.innerHeight;
});
// Pseudo-noise function using trig functions for s …Excerpt — the full answer is on the round page.
▶ R87 · Gray-Scott reaction-diffusion Open round →
```html
<!DOCTYPE html>
<html><head><title>Gray-Scott Simulation</title></head><body style="background:#000;margin:0;"><canvas id="c"></canvas><script>
const c = document.getElementById('c');
const ctx = c.getContext('2d');
let S, G, A, B;
let r, s, d_a, d_b, k;
let bufferA, bufferB, nextA, nextB;
let step = 0;
function init(size) {
S = size;
G = size;
c.width = c.height = S * 2; // Higher resolution for visual quality
const scaleFactor = Math.floor(c.width / (S * 1.5)); // Scale down slightly to fit step counter
c.style.width = `${Math.min(800, S*2)}px`;
c.style.height = `${Math.min(600, S*2)}px`;
bufferA = new Float32Array(S * S);
bufferB = new Float32Array(S * S);
nextA = new Float32Array(S * S);
nextB = new Float32Array(S * S);
// Parameters (Standard values for pat …Excerpt — the full answer is on the round page.
▶ R88 · L-system tree growing in wind Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>L-System Fractal Tree</title>
<style>body {margin:0;overflow:hidden;background:#111;}canvas {display:block;}</style>
</head>
<body>
<canvas id="treeCanvas"></canvas>
<script>
(function() {
const canvas = document.getElementById('treeCanvas');
const ctx = canvas.getContext('2d');
let W, H;
// System State Variables
let currentGeneration = 0;
let maxGenerations = 6;
let lSystemRules = {};
let axiom = "";
let sequence = "";
let branchCount = 0;
let isDrawingPhase = true;
let drawingStep = 0;
let currentBranch = []; // Stores segment information for the next draw step
// Wind Simulation Variables (for stabilization after growth)
let windStrength = 0.1;
let timeOffset = Math.random() * 2 * Math.PI;
const WIND_SPEED = 0.03;
functio …Excerpt — the full answer is on the round page.
▶ R89 · Marching squares on a moving field Open round →
<!DOCTYPE html>
<html><head><title>Metaball Contour Flow</title><style>body{margin:0;overflow:hidden}canvas{display:block}</style></head><body id="b"><canvas id="c"></canvas><script>
const b = document.getElementById('b');
const c = document.getElementById('c');
let ctx = c.getContext('2d');
// Configuration constants
const W = 800;
const H = 600;
const GRID_S = 15; // Grid step size
const NUM_BALLS = 4;
const ISOLEVELS = [0.2, 0.4, 0.6];
const ALPHA = 30; // Metaball influence radius (squared)
c.width = W;
c.height = H;
// State variables
let balls = [];
let timeOffset = 0;
function setup() {
balls = [];
for (let i = 0; i < NUM_BALLS; i++) {
balls.push({
x: Math.random() * W,
y: Math.random() * H,
vx: (Math.random() - 0.5) * 0.3, …Excerpt — the full answer is on the round page.
▶ R90 · Poisson-disk sampling, Bridson's algorithm Open round →
```html
<!DOCTYPE html>
<html>
<head>
<title>Poisson Disk Sampling</title>
<style>body{margin:0;overflow:hidden;background-color:#111}canvas{display:block}</style>
</head>
<body>
<canvas id="c"></canvas>
<script>
const c = document.getElementById('c');
const ctx = c.getContext('2d');
let W, H;
let grid, active, samples, minD;
let pointCount = 0;
function init() {
W = window.innerWidth;
H = window.innerHeight;
c.width = W;
c.height = H;
grid = new Array(Math.ceil(W / (minD * 1.5))).fill(null).map(() => new Array(Math.ceil(H / (minD * 1.5))).fill(0));
active = [];
samples = [];
pointCount = 0;
}
function reset() {
init();
for(let y=0; y<H; y+=2) { for(let x=0; x<W; x+=2) { grid[Math.floor(x/(minD*1.5))][Math.floor(y/(minD*1.5))] = 0; } }
}
function check(x, y, rSq) {
let k = Math.floor(x/(minD*1.5));
let j = Math.floor(y/(minD*1.5)); …Excerpt — the full answer is on the round page.
▶ R91 · Starfield tunnel in perspective Open round →
```html
<!DOCTYPE html>
<html><head><title>Starfield</title></head><body style="margin:0;overflow:hidden;"><canvas id="c"></canvas><script>const c=document.getElementById('c');const ctx=c.getContext('2d');let stars=[],speed=1.5,starCount=300;let W=window.innerWidth;let H=window.innerHeight;c.width=W;c.height=H;
function Star{constructor(x){this.x=x*2-W;this.y=Math.random()*H;this.z=Math.random()*100+50;}reset(){this.x=Math.random()*W;this.y=Math.random()*H;this.z=Math.random()*100+50;}update(s){this.z-=s;if(this.z<0)this.reset();}draw(c,s){let p=s/(100-this.z);let rx=this.x*p/W;let ry=this.y*p/H;let sZ=Math.max(0.5,this.z/100);let size=Math.min(20,1+Math.sqrt(sZ));let alpha=Math.min(1,sZ/30)*size/20;c.fillStyle=`rgba(255,255,255,${alpha})`;c.beginPath();c.arc(rx*W+(W-rx)/2,ry*H+(H-ry)/2,size*p/10+0.5,0,Math.PI*2);c.fill();}
function init(){stars=[];for(let i=0;i<starCount;i++){stars.push …Excerpt — the full answer is on the round page.
▶ R92 · Rotating wireframe solids with depth sorting Open round →
```html
<!DOCTYPE html><html><canvas id="c"></canvas><script>const c=document.getElementById('c');const ctx=c.getContext('2d');c.width=600;c.height=400;let a={v:[[1,1,1],[1,-1,1],[-1,-1,1],[-1,1,1],[1,1,-1],[1,-1,-1],[-1,-1,-1],[-1,1,-1]],e:[[0,1],[0,3],[0,4],[1,2],[1,5],[2,6],[2,3],[3,7],[4,7],[5,7],[0,7],[6,7]],name:"Cube"};let b={v:[[1.5,0,0],[0,1.5,0],[0,0,1.5],[-1.5,0,0],[0,-1.5,0],[0,0,-1.5]],e:[[0,1],[1,2],[2,0],[3,4],[4,3],[2,3]]};let s={a:a,b:b,thetaX:Math.random()*Math.PI*2,thetaY:Math.random()*Math.PI*2};function p(p,q,r){return Math.sqrt(p*p+q*q+r*r)}function r(v,t,s){let x=v[0],y=v[1],z=v[2];let nx=x*Math.cos(t)+y*Math.sin(t)*z;let ny=x*Math.sin(t)-y*Math.cos(t)*z;let nz=z;return [nx,ny,nz]}function t(v,t,s){let x=v[0],y=v[1],z=v[2];let nx=x*Math.cos(s)+z*Math.sin(s);let ny=y;let nz=-x*Math.sin(s)+z*Math.cos(s);return [nx,ny,nz]}function transform(solid){for(let i=0;i<solid. …Excerpt — the full answer is on the round page.
▶ R93 · Rotating wireframe height field Open round →
```html
<!DOCTYPE html>
<html><head><title>Rotating 3D Height Field</title></head><body style="background: #000; margin: 0; display: flex; justify-content: center; align-items: center; min-height: 100vh;"><canvas id="c" width="800" height="600" style="border: 1px solid #333;"></canvas><script>const c=document.getElementById('c');const ctx=c.getContext('2d');let W=c.width,H=c.height;let N=40;let s=Math.random()*2*Math.PI;let a=0;function h(x,y){return Math.sin(x*0.1)*Math.cos(y*0.1)+Math.sin((x+y)/5)};function draw(){ctx.clearRect(0,0,W,H);ctx.fillStyle='#333';ctx.fillRect(0,0,W,H);const scale=W/(N-1);let points=[];for(let i=0;i<N;i++){for(let j=0;j<N;j++){let x=(i-N/2)*scale*0.5,y=(j-N/2)*scale*0.5,z=h(x,y);points.push({x:x,y:y,z:z});}}ctx.strokeStyle='#666';ctx.lineWidth=1;let p=[];const angle_a = a*0.01;for(let i=0;i<N;i++){for(let j=0;j<N;j++){let x=(i-N/2)*scale*0.5,y=(j-N/2)*scale*0 …Excerpt — the full answer is on the round page.
▶ R94 · Raycast maze walkthrough Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Autonomous Raycasting Maze</title>
<style>
body { margin: 0; background: #111; display: flex; justify-content: center; align-items: center; height: 100vh; }
canvas { border: 2px solid #333; image-rendering: pixelated; }
</style>
</head>
<body>
<canvas id="mazeCanvas"></canvas>
<script>
const canvas = document.getElementById('mazeCanvas');
const ctx = canvas.getContext('2d');
let W, H;
W = 800;
H = 600;
canvas.width = W;
canvas.height = H;
// Maze constants
const GRID_SIZE = 10; // Grid is N*N of cells (e.g., 20x20)
const CELL_SIZE = 64;
const MAZE_MAP = [];
const TILE_SCALE = 1;
// Player state
let player = { x: 3.5 * CELL_SIZE, y: 3.5 * CELL_SIZE, dir: Math. …Excerpt — the full answer is on the round page.
▶ R95 · Shaded sphere by painter's algorithm Open round →
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Canvas Sphere Renderer</title>
<style>body { background: #111; margin: 0; display: flex; justify-content: center; align-items: center; height: 100vh; }</style>
</head>
<body>
<canvas id="sphereCanvas"></canvas>
<script>
const canvas = document.getElementById('sphereCanvas');
const ctx = canvas.getContext('2d');
let POINT_COUNT = 3500; // Target point count
const R = 150; // Sphere radius (projection scale)
const PADDING = 4; // Padding for display text
canvas.width = window.innerWidth * 0.8;
canvas.height = window.innerHeight * 0.9;
let points = [];
let angleA = Math.PI / 6; // Rotation around Y axis
let angleB = Math.PI / 12; // Rotation around X axis
function generatePoints() {
points = [];
for (let i = 0; i < POINT_COUNT; i++) {
const phi = Math.acos(Math.random() * 2 - 1 …Excerpt — the full answer is on the round page.
▶ R96 · Force-directed graph settling Open round →
```html
<!DOCTYPE html>
<html><head><meta charset="UTF-8"><title>Force Graph Simulation</title></head><body style="background:#111;color:#fff;"><canvas id="graphCanvas" width="800" height="600" style="display:block;border:1px solid #333;"></canvas><div id="info" style="padding:10px;font-family:monospace;">Nodes: 0 | Energy: 0.0</div><script>
const canvas = document.getElementById('graphCanvas');
const ctx = canvas.getContext('2d');
const infoDiv = document.getElementById('info');
let nodes = [];
let edges = [];
let running = true;
let simulationRunning = false;
// --- Physics Constants ---
const K_SPRING = 0.015; // Spring constant (attraction)
const C_REPULSION = 500; // Repulsion constant (inverse square law influence)
const DAMPING = 0.95; // Drag/damping factor
const TARGET_GRAVITY = 0;
function createNode(x, y) {
return { x: x, y: y, vx: Math.random() * 2 - 1, vy: Math.ra …Excerpt — the full answer is on the round page.
▶ R97 · Circle packing without overlap Open round →
```html
<!DOCTYPE html>
<html>
<body>
<canvas id="c"></canvas>
<script>
const c = document.getElementById('c');
const ctx = c.getContext('2d');
let circles = [];
let currentCircle = null;
let animationFrameId = null;
c.width = 800;
c.height = 600;
function init() {
circles = [];
currentCircle = null;
draw();
gameLoop();
}
function calculateMaxRadius(x, y) {
let r = Math.min(x, c.width - x, y, c.height - y);
for (const circ of circles) {
const dx = x - circ.x;
const dy = y - circ.y;
const dist = Math.sqrt(dx * dx + dy * dy);
r = Math.min(r, dist - circ.radius);
}
return r > 0 ? r : 1;
}
function placeCircle() {
if (circles.length >= 50) { // Stop condition
init();
return false;
}
const x = Math.random() * c.width;
const y = Math.random() * c.height;
const maxR = calculateMaxRadius(x, y …Excerpt — the full answer is on the round page.
▶ R98 · Squarified treemap of changing data Open round →
<!DOCTYPE html>
<html>
<head><title>Animated Treemap</title></head>
<style>body{margin:0;background:#222;display:flex;justify-content:center;align-items:center;height:100vh}canvas{border:1px solid #444}</style>
<script>
const canvas = document.createElement('canvas');
document.body.appendChild(canvas);
const ctx = canvas.getContext('2d');
let items = Array(20).fill(0).map(() => Math.random() * 10 + 5);
let targetLayout = [];
let currentRects = [];
let animationProgress = {};
// Initialize canvas size
canvas.width = window.innerWidth * 0.9;
canvas.height = window.innerHeight * 0.8;
function initializeState() {
items = Array(20).fill(0).map(() => Math.random() * 10 + 5);
targetLayout = [];
currentRects = [];
animationProgress = {};
}
// Core Treemap Algorithm (Simplified Best-Fit Tiling)
function calculateTreemap(weights, parentX, parentY, parentW, parentH, index = null …Excerpt — the full answer is on the round page.
▶ R99 · Three sorting algorithms racing Open round →
```html
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><title>Sort Race</title><style>body{background:#111;display:flex;justify-content:center;align-items:center;height:100vh;margin:0}canvas{border:1px solid #333;}</style></head><body><canvas id="c"></canvas><script>
const c=document.getElementById('c');
const ctx=c.getContext('2d');
let DATA=[],N=60,H=400,W=800,STEP_SIZE=1;
function shuffle(arr){for(let i=arr.length-1;i>0;i--){const j=Math.floor(Math.random()*i);[arr[i],arr[j]]=[arr[j],arr[i]];}}
function drawBars(arr, highlight=[]){ctx.clearRect(0,0,W,H);for(let i=0;i<N;i++){const h=(arr[i]/100)*H*0.8+20;ctx.fillStyle='#3498db';ctx.fillRect(i*W/N-1,H-h,W/N-1,h);if(highlight[0]&&i===highlight[0]){ctx.fillStyle='#e74c3c';ctx.fillRect(i*W/N-1,H-h,W/N-1,h);}else if(highlight[1]&&i===highlight[1]){ctx.fillStyle='yellow';ctx.fillRect(i*W/N-1,H-h,W/N-1,h);}}
let A_bubble=[],A_in …Excerpt — the full answer is on the round page.
▶ R100 · Sankey flow with travelling particles Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Dynamic Sankey Flow Simulation</title>
<style>
body { margin: 0; overflow: hidden; background-color: #111; }
canvas { display: block; }
</style>
</head>
<body>
<canvas id="sankeyCanvas"></canvas>
<script>
const canvas = document.getElementById('sankeyCanvas');
const ctx = canvas.getContext('2d');
let W, H;
let nodesS = [100, 300, 500]; // Source X coordinates
let nodesT = [700, 600, 400, 200]; // Target X coordinates
const numSources = nodesS.length;
const numTargets = nodesT.length;
// Initialize flow matrix: flows[s][t]
let flows = [];
for (let s = 0; s < numSources; s++) {
flows[s] = new Array(numTargets).fill(Math.random() * 5 + 1); // Initial random flow
}
/ …Excerpt — the full answer is on the round page.
▶ R101 · Langton's ant building a highway Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Langton's Ant</title>
<style>body {background: #111; display: flex; justify-content: center; align-items: center; min-height: 100vh; margin: 0; font-family: monospace;} canvas {border: 2px solid #333;}</style>
</head>
<body>
<canvas id="langtonCanvas"></canvas>
<script>
const canvas = document.getElementById('langtonCanvas');
const ctx = canvas.getContext('2d');
let GRID_SIZE = 600;
canvas.width = canvas.height = GRID_SIZE;
// State variables
let grid = [];
let x, y, d; // Position (x, y), Direction (0=N, 1=E, 2=S, 3=W)
let steps = 0;
const CELL_SIZE = 8;
function initializeGrid() {
grid = [];
for (let i = 0; i < GRID_SIZE / CELL_SIZE + 1; i++) {
grid[i] = new Array(GRID …Excerpt — the full answer is on the round page.
▶ R102 · Rule 110 growing line by line Open round →
```html
<!DOCTYPE html>
<html>
<head>
<title>Rule 110 Cellular Automaton</title>
<style>body { background: #000; margin: 0; overflow: hidden; display: flex; justify-content: center; align-items: center; height: 100vh; }</style>
</head>
<body>
<canvas id="c"></canvas>
<script>
const canvas = document.getElementById('c');
const ctx = canvas.getContext('2d');
let W = 800, H = 600;
canvas.width = W;
canvas.height = H;
// Simulation parameters
const ROW_COUNT = 50; // Number of rows to display at once
const CELL_WIDTH = 10;
const CELL_HEIGHT = 10;
const INITIAL_LENGTH = 120;
let rows = [];
let rowNumber = 0;
let scrollOffset = 0;
function initialize() {
rows = Array(ROW_COUNT).fill(null).map(() => new Array(INITIAL_LENGTH).fill(0));
// Start with a single black cell in the top visible row (index ROW_COUNT - 1)
const startRowIndex = ROW_COUNT - 1;
rows[startRowIndex][Math.f …Excerpt — the full answer is on the round page.
▶ R103 · Wireworld with a clock and a diode Open round →
```html
<!DOCTYPE html>
<html>
<head><title>Wireworld Circuit</title></head>
<body><canvas id="cw"></canvas><script>
const canvas = document.getElementById('cw');
const ctx = canvas.getContext('2d');
// Constants: 0=Empty, 1=Conductor, 2=Head, 3=Tail
const E = 0;
const C = 1;
const H = 2;
const T = 3;
let COLS = 60;
let ROWS = 45;
let grid, newGrid;
// Circuit Configuration (W x H)
const CELL_SIZE = 8;
canvas.width = COLS * CELL_SIZE;
canvas.height = ROWS * CELL_SIZE;
function initialize() {
grid = Array(ROWS).fill(0).map(() => Array(COLS).fill(E));
newGrid = Array(ROWS).fill(0).map(() => Array(COLS).fill(E));
}
// Function to safely get cell state, handling boundaries
function getCell(x, y) {
if (x < 0 || x >= COLS || y < 0 || y >= ROWS) return E;
return grid[y][x];
}
// Counts how many neighbors are Heads
function countHeads(x, y) {
let count = 0;
for (let …Excerpt — the full answer is on the round page.
▶ R104 · Abelian sandpile toppling Open round →
<!DOCTYPE html>
<html><head><title>Abelian Sandpile Simulation</title><style>body{background:#111;display:flex;justify-content:center;align-items:center;margin:0;height:100vh}canvas{border:2px solid #333;}</style></head><body><canvas id="sandpileCanvas"></canvas><script>let C, G, W = 60, H = 60;let grid=Array(W).fill(0).map(()=>Array(H).fill(0));let droppedCount=0;let topplingCount=0;const canvas=document.getElementById('sandpileCanvas');canvas.width=480;canvas.height=480;Cgonstructor=function(){this.ctx=canvas.getContext('2d')};new Cgonstructor();
c=()=>{let x=Math.floor(W/2);let y=Math.floor(H/2);grid[x][y]++}
p=(x,y)=>{if(x<0||x>=W||y<0||y>=H)return false;return true}
r=(x,y)=>Math.max(0, Math.min(4, grid[x][y]))
d=()=>{let x=Math.floor(W/2);let y=Math.floor(H/2);droppedCount++;grid[x][y]++;}
t=()=>{let q=[];for(let i=0;i<W;++i)for(let j=0;j<H;++j){if(grid[i][j]>=4){q.push({x:i,y:j})} …Excerpt — the full answer is on the round page.
▶ R105 · Brian's Brain Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Brian's Brain CA</title>
<style>body {background: #000; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0;}</style>
</head>
<body>
<canvas id="caCanvas"></canvas>
<script>
const canvas = document.getElementById('caCanvas');
const ctx = canvas.getContext('2d');
let W, H, CELL_SIZE, GRID_W, GRID_H;
let bufferA, bufferB;
let currentBuffer, nextBuffer;
let generation = 0;
let liveCells = 0;
// States: 1=On (High), 2=Dying (Decay), 0=Off (Low)
const STATE_ON = 1;
const STATE_DYING = 2;
const STATE_OFF = 0;
// Colors corresponding to states
const COLORS = {
[STATE_ON]: '#FFFFFF', // White/Bright
[STATE_DYING]: '#CC6600', // Orange/De …Excerpt — the full answer is on the round page.
▶ R106 · Truchet tiles rearranging Open round →
<!DOCTYPE html><html><head><title>Truchet Tiling</title><style>body{margin:0;overflow:hidden;background:#111}canvas{display:block}</style></head><body><canvas id="c"></canvas><script>
const c = document.getElementById('c');
const ctx = c.getContext('2d');
let SIZE = 30; // Grid size N x N
let TILE_SIZE = 50; // Size of one tile cell (pixels)
c.width = SIZE * TILE_SIZE;
c.height = SIZE * TILE_SIZE;
// State: grid[r][c] is an object { top, right } indicating which connections exist.
let grid = [];
let flipCount = 0;
function initializeGrid() {
grid = Array.from({ length: SIZE }, () => Array(SIZE).fill(null));
for (let r = 0; r < SIZE; r++) {
for (let c = 0; c < SIZE; c++) {
// Randomly decide connections for a continuous flow
grid[r][c] = { top: Math.random() > 0.5, right: Math.random() > 0.5 };
}
}
flipCount = 0;
}
function draw …Excerpt — the full answer is on the round page.
▶ R107 · Hilbert curve drawing itself Open round →
```html
<!DOCTYPE html>
<canvas id="hcurve"></canvas><script>
const canvas = document.getElementById('hcurve');
const ctx = canvas.getContext('2d');
let currentOrder = 5;
let points = [];
let drawingIndex = 0;
const MAX_ORDER = 7;
function setupCanvas(order) {
canvas.width = Math.pow(2, order);
canvas.height = Math.pow(2, order);
}
// Hilbert curve function: maps (i, j) coordinates for order 'n' to a point on the grid.
// This is highly optimized and compact.
function hilbertIndex(x, y, n) {
let s = 1;
for (let i = 0; i < n; i++) {
s = Math.floor((x / s));
x = x % s * s + ((y / s) - (Math.floor(xi / s)) + (xi > y ? 1 : 0)) * (s * s);
}
return [x, y]; // Simplified placeholder for complexity management; we need the recursive function structure instead.
}
// Recursive generation of Hilbert coordinates
function h(n, x, y) {
if (n === 0) return …Excerpt — the full answer is on the round page.
▶ R108 · Interlocking star pattern on a grid Open round →
```html
<!DOCTYPE html>
<html><head><title>Islamic Star Pattern</title><style>body{margin:0;overflow:hidden;background:#111}canvas{display:block}</style></head><body onload="init()"> <canvas id="starCanvas"></canvas><script>var canvas,ctx,S=50;let W,H;var angle=0;function init(){canvas=document.getElementById('starCanvas');ctx=canvas.getContext('2d');W=H=window.innerWidth<1200?window.innerWidth:800;canvas.width=W;canvas.height=H;requestAnimationFrame(animate)}function polyPoints(x,y,r){var p=[],a=Math.PI/3;for(leti=0;i<6;i++){p.push({x:(x+r*Math.cos(i*a)),y:(y+r*Math.sin(i*a))});}return p;}function drawStar(){ctx.clearRect(0,0,W,H);ctx.save();ctx.translate(W/2,H/2);ctx.rotate(angle);ctx.strokeStyle="#FFD700";ctx.lineWidth=1;var gridStrokes=[];for(lety=0;ly<Math.floor(H/S)+1;ly++){for(letx=0;x<Math.floor(W/S)+1;x++){letcx=(x-0.5)*S;letcy=(y-0.5)*S;//Center point of the cell (relative to o …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">
<title>Moiré Effect</title>
<style>
body { background: #111; display: flex; justify-content: center; align-items: center; min-height: 100vh; margin: 0; }
canvas { border: 1px solid #333; background: #000; }
#info { color: #aaa; font-family: monospace; position: absolute; bottom: 10px; left: 10px; }
</style>
</head>
<body>
<canvas id="moireCanvas"></canvas>
<div id="info">Angle: 0.00 | Offset: 0.00</div>
<script>
const canvas = document.getElementById('moireCanvas');
const ctx = canvas.getContext('2d');
const infoDiv = document.getElementById('info');
let width, height;
let angle = Math.random() * 2 * Math.PI;
let offset = Math.random() * 100;
let lastTime = 0;
function resizeCanvas() {
wid …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"><title>Aperiodic Tiling</title></head>
<body><canvas id="c"></canvas><script>const c=document.getElementById('c');const ctx=c.getContext('2d');let g=0;let tiles=[];let running=true;function init(){g=0;tiles=[{p:[0,0],t:1},{p:[1,0],t:1},{p:[0.5, 0.866],t:1}];}init();const W=700,H=700;c.width=W;c.height=H;function draw(){ctx.clearRect(0,0,W,H);for(let t of tiles){ctx.fillStyle='#3a3a3a';ctx.beginPath();ctx.moveTo(t.p[0],t.p[1]);ctx.lineTo(t.p[0]+2*Math.cos(0),t.p[1]+2*Math.sin(0));ctx.lineTo(t.p[0]+Math.cos(Math.PI/3)*2, t.p[1]+Math.sin(Math.PI/3)*2);ctx.closePath();ctx.fill();}}function nextGeneration(){g++;let newTiles=[];let oldTiles=tiles.map(t=>({...t}));tiles=[];for(const tile of oldTiles){newTiles.push(...substitute(tile));}tiles=newTiles;document.getElementById('gen').innerText=`Gen: ${g}`;document.getElementById( …Excerpt — the full answer is on the round page.
▶ R111 · Ant colony laying pheromone trails Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Ant Colony Simulation</title>
<style>
body { margin: 0; overflow: hidden; background-color: #111; }
canvas { display: block; }
#stats { position: absolute; top: 10px; left: 10px; color: white; font-family: monospace; z-index: 10; background: rgba(0,0,0,0.5); padding: 5px; border-radius: 5px;}
</style>
</head>
<body>
<canvas id="antCanvas"></canvas>
<div id="stats">Ants: 0 | Food Carried: 0</div>
<script>
const canvas = document.getElementById('antCanvas');
const ctx = canvas.getContext('2d');
let width, height;
// Global State Variables
let pheromoneField;
let ants = [];
let foodSource = { x: 0, y: 0, active: false };
let nest = { x: 0, y: 0 };
let statsEl = document.getElementById('stats');
// Constants (Tuning parameters) …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">
<title>Physarum Simulation</title>
<style>body { margin: 0; overflow: hidden; background: #222; }</style>
</head>
<body>
<canvas id="c"></canvas>
<script>
const canvas = document.getElementById('c');
const ctx = canvas.getContext('2d');
let WIDTH, HEIGHT;
let GRID_SIZE, MAP_DIMS;
let particles = [];
let mapData;
let stepCount = 0;
const NUM_PARTICLES = 1500;
const TRAIL_DECAY = 0.98; // Decay factor for the map
const SENSE_DISTANCE = 20; // How far ahead particles sense
const MAX_TRAIL_STRENGTH = 255;
function init() {
WIDTH = window.innerWidth;
HEIGHT = window.innerHeight;
canvas.width = WIDTH;
canvas.height = HEIGHT;
GRID_SIZE = Math.max(4 …Excerpt — the full answer is on the round page.
▶ R113 · Predator and prey on a shared field Open round →
```html
<!DOCTYPE html>
<html><head><title>Predator-Prey Simulation</title></head><body style="display:flex;justify-content:center;align-items:center;background:#333;"><canvas id="gameCanvas" width="800" height="500" style="border:1px solid #ccc;"></canvas><script>
const canvas = document.getElementById('gameCanvas');
const ctx = canvas.getContext('2d');
let food = [];
let prey = [];
let predators = [];
let score = { P: 0, R: 0 };
let animationId;
const CANVAS_W = 800;
const CANVAS_H = 500;
// --- Object Definitions ---
class Food { constructor(x, y) { this.x = x; this.y = y; this.r = 3; } draw() { ctx.fillStyle='#4CAF50'; ctx.beginPath(); ctx.arc(this.x, this.y, this.r, 0, Math.PI * 2); ctx.fill(); } }
class Prey { constructor(x, y) { this.x = x; this.y = y; this.r = 5; this.energy = 100; this.maxEnergy = 100; this.moveSpeed = Math.random() * 1 + 0.8; } update() { this.energy -= 0.2; …Excerpt — the full answer is on the round page.
▶ R114 · Traffic jam from nothing Open round →
```html
<!DOCTYPE html>
<html><head><title>NS Traffic Simulation</title></head><body style="margin:0;display:flex;justify-content:center;align-items:center;min-height:100vh;background:#333"><canvas id="c"></canvas><script>
const canvas = document.getElementById('c');
const ctx = canvas.getContext('2d');
let W, H;
let CAR_WIDTH = 15;
let CAR_HEIGHT = 8;
let MAX_SPEED = 4; // v_max
let LANES = 1; // Single lane
let ROAD_RADIUS = 100;
let NUM_CAR_SPACING = 20;
let N_CARS = 30;
function resizeCanvas() {
W = window.innerWidth * 0.8;
H = window.innerHeight * 0.8;
canvas.width = W;
canvas.height = H;
}
window.addEventListener('resize', resizeCanvas);
// Global state variables
let cars = [];
let simulationRunning = true;
function initializeCars() {
cars = [];
const circumference = 2 * Math.PI * ROAD_RADIUS;
for (let i = 0; i < N_CARS; i++) {
// Initial …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">
<title>Crowd Flow Simulation</title>
<style>
body { margin: 0; background: #111; display: flex; justify-content: center; align-items: center; height: 100vh; }
canvas { border: 2px solid #333; background: #222; }
</style>
</head>
<body>
<canvas id="crowdCanvas"></canvas>
<script>
const canvas = document.getElementById('crowdCanvas');
const ctx = canvas.getContext('2d');
let W, H;
let particles = [];
let exitCenter = { x: 0, y: 0 };
let particleCount = 300;
let flowRate = 0;
let simulationRunning = true;
function resize() {
W = canvas.width = window.innerWidth * 0.8;
H = canvas.height = window.innerHeight * 0.8;
exitCenter.x = W / 2;
exitCenter.y = H / 2; …Excerpt — the full answer is on the round page.
▶ R116 · Bresenham circles and lines, pixel by pixel Open round →
<!DOCTYPE html>
<html><head><title>Bresenham Visualization</title></head><body><canvas id="c" width="600" height="600"></canvas><script>const c=document.getElementById('c');const ctx=c.getContext('2d');let data=ctx.getImageData(0,0,600,600).data;let p_count=0;let angle=0;function drawPixel(x,y,r,g,b){if(x<0||x>599||y<0||y>599)return;const i=(y*600+x)*4;data[i+0]=r;data[i+1]=g;data[i+2]=b;p_count++;}function line(x0,y0,x1,y1){let xdiff=Math.abs(x1-x0);let ydiff=Math.abs(y1-y0);let sx=(x0<x1)?1:-1;let sy=(y0<y1)?1:-1;let err=((ydiff>0?xdiff:ydiff));for(let i=0;i<Math.max(Math.abs(x1-x0),Math.abs(y1-y0)) * 2;i++){let x=Math.round(x0+(i/60)*sx);let y=Math.round(y0+(i/60)*sy);if(!isNaN(x)&&!isNaN(y)){drawPixel(x,y,150,150,255)}}}(function(){// Initialize background (black)const r=1;ctx.fillStyle='#000';ctx.fillRect(0,0,600,600);})(p_count=0);function circle(cx,cy,r){let x=Math.round(r);let y= …Excerpt — the full answer is on the round page.
▶ R117 · De Casteljau construction of a Bezier curve Open round →
```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 = …Excerpt — the full answer is on the round page.
▶ R118 · Sutherland-Hodgman polygon clipping Open round →
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><title>Sutherland-Hodgman Clipping</title><style>body{margin:0;overflow:hidden}canvas{display:block}</style></head><body><canvas id="clipCanvas"></canvas><script>const canvas = document.getElementById('clipCanvas');const ctx = canvas.getContext('2d');let W, H;function resize() {W = window.innerWidth * 0.95;H = window.innerHeight * 0.7;canvas.width = W;canvas.height = H;}resize();window.addEventListener('resize', resize);
let state = {rotation:0,x:0,y:0,stage:0,running:true};
const WINDOW_SIZE = 400;
const WIN_X = (W - WINDOW_SIZE) / 2;
const WIN_Y = (H - WINDOW_SIZE) / 2;
// Base concave polygon vertices (local space centered at origin (0,0))
let originalVertices = [[-150,-100],[0,-200],[-100,-50],[-150,-150],[0,-80]];
function transformPolygon(vertices, centerX, centerY) {
return vertices.map(p => [
p[0] * Math.co …Excerpt — the full answer is on the round page.
▶ R119 · Floyd-Steinberg dithering a gradient Open round →
```html
<!DOCTYPE html>
<html><head><title>Floyd-Steinberg Dithering</title><style>body{background:#000;margin:0;overflow:hidden}canvas{display:block}</style></head><body><canvas id="c"></canvas><script>const c=document.getElementById('c');const ctx=c.getContext('2d');c.width=512;c.height=512;let t=0;let p=[0, 128, 255];function loop(){t+=1;let imageData=ctx.getImageData(0,0,512,512);let data=imageData.data;let w=512;let h=512;for(let y=0;y<h;y++){for(let x=0;x<w;x++){let i=(y*w+x)*4;let v=Math.sin((x/w+t/50)%1) * 127 + Math.cos((y/h+t/30)%1) * 127;v=Math.abs(v);if(!data[i]){// First pass calculation (initial value) data[i]=v;data[i+1]=v;data[i+2]=v;data[i+3]=255;}else{let original=data[i]/255;let q=p[Math.round(original/127*2)]*255;let err=original-q/255;for(let dy=0;dy<=1;dy++){for(let dx=0;dx<2;dx++){let nx=x+dx*(dx>0?1:0);let ny=y+dy*(dy>0?1:0);if(nx<w&&ny<h){let ni=(ny*w+nx)*4;let w …Excerpt — the full answer is on the round page.
▶ R120 · Scanline fill of a self-intersecting polygon Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Scanline Fill</title>
<style>body{margin:0;overflow:hidden;background:#111}canvas{display:block}</style>
</head>
<body>
<canvas id="c"></canvas>
<script>
const c = document.getElementById('c');
const ctx = c.getContext('2d');
let W, H;
function resize() {W=H=window.innerWidth;c.width=c.height=W;}
resize();window.addEventListener('resize',resize);
let P = []; // Polygon vertices
let time = 0;
let frameCount = 0;
// Initialize a complex, self-intersecting polygon shape
function initPolygon() {
P = [
{x: W*0.1, y: H/2}, {x: W*0.4, y: H*0.7},
{x: W*0.6, y: H*0.3}, {x: W*0.9, y: H/2},
{x: W*0.8, y: H*0.1}, {x: W*0.45, y: H*0.5}
];
}
// Update polygon vertices with rotation and deformation
function updatePolygon() {
const s = time * 0.0005;
const d = Math.sin( …Excerpt — the full answer is on the round page.
▶ R121 · A* pathfinding search across an obstacle grid Open round →
<!DOCTYPE html>
<html>
<head>
<title>A* Search Visualization</title>
<style>body { background: #111; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } canvas { border: 2px solid #777; }</style>
</head>
<body>
<canvas id="aStarCanvas"></canvas>
<script>
const CANVAS = document.getElementById('aStarCanvas');
const CTX = CANVAS.getContext('2d');
let GRID_SIZE = 30; // N x N grid
let CELL_SIZE = 20;
CANVAS.width = GRID_SIZE * CELL_SIZE;
CANVAS.height = GRID_SIZE * CELL_SIZE;
// Global state variables
let grid = [];
let startNode, goalNode;
let openList = []; // Priority Queue simulation
let closedList = new Set();
let currentPath = [];
let expandedNodes = 0;
let animationFrameId = null;
let isRunning = true;
// --- Utility Functions ---
function generateGrid() {
grid = [];
for (let y = 0; y < GRID_SIZE; y++) {
grid[y] = []; …Excerpt — the full answer is on the round page.
▶ R122 · Randomized maze generation via recursive backtracking Open round →
```html
<!DOCTYPE html><html><head><title>Maze Generator</title></head><body style="background:#111;display:flex;justify-content:center;align-items:center;height:100vh;margin:0;"><canvas id="mazeCanvas" width="600" height="600" style="border:2px solid #333;"></canvas><script>
const canvas = document.getElementById('mazeCanvas');
const ctx = canvas.getContext('2d');
const COLS = 21; // Odd number of cells + walls (2*N+1)
const ROWS = 21;
const CELL_SIZE = 30;
const GRID_COLS = Math.floor(COLS / 2);
const GRID_ROWS = Math.floor(ROWS / 2);
let mazeGrid; // Stores visited/visited status (boolean array)
let currentPath = []; // The DFS stack path
let startCell = {x: 1, y: 1};
function initMaze() {
mazeGrid = Array.from({ length: GRID_ROWS }, () => Array(GRID_COLS).fill(false));
currentPath = [];
startCell = {x: Math.floor( …Excerpt — the full answer is on the round page.
▶ R123 · Breadth-first flood fill spreading through a region Open round →
```html
<!DOCTYPE html>
<html>
<head>
<title>BFS Flood Fill Animation</title>
<style>
body {margin:0;overflow:hidden;background:#111;}#canvas {display:block;border:1px solid #333;}#info {position:absolute;color:#fff;font-family:monospace;padding:10px;background:rgba(0,0,0,0.6);z-index:10;}
</style>
</head>
<body>
<canvas id="canvas"></canvas>
<div id="info">Step: 0 | Filled: 0 / 0</div>
<script>
const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d');
let WIDTH, HEIGHT, GRID_SIZE;
// Configuration constants
const CELL_SIZE = 10;
const MAX_FILLS = 500; // Max number of cells to fill before restart chance
const INITIAL_REGION_DENSITY = 0.4;
// State variables
let grid = [];
let distances = [];
let queue = [];
let filledCount = 0;
let totalReachableCells = 0;
let isRunning = true;
function setupCanvas() {
WIDTH = Math.floor(window.innerWidth);
HEI …Excerpt — the full answer is on the round page.
▶ R124 · Dijkstra's shortest path over weighted terrain Open round →
```html
<!DOCTYPE html>
<html>
<head>
<title>Dijkstra Visualization</title>
<style>body {background-color: #111; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; font-family: sans-serif; color: white;}#container {display: flex; gap: 20px;};canvas {border: 2px solid #444; background-color: #222;}#stats {padding: 10px; background-color: #333; border-radius: 5px;}h2 {margin: 0 0 10px 0; font-size: 1.2em;}p {margin: 5px 0;}
</style>
</head>
<body>
<div id="container">
<canvas id="dijkstraCanvas"></canvas>
<div id="stats">
<h2>Status</h2>
<p>Settled Cells: <span id="settledCount">0</span> / <span id="totalCells">0</span></p>
<p>Path Cost: <span id="pathCost">N/A</span></p>
</div>
</div>
<script>
const canvas = document.getElementById('dijkstraCanvas');
const ctx = canvas.getContext('2d');
let GRID_SIZE = 30;
let CELL_ …Excerpt — the full answer is on the round page.
▶ R125 · Voronoi diagram growing by multi-source flood fill Open round →
```html
<!DOCTYPE html>
<html>
<head><title>Voronoi Flood Fill</title></head>
<body>
<canvas id="voronoiCanvas" style="display:block;background:#111;"></canvas><script>
const canvas = document.getElementById('voronoiCanvas');
const ctx = canvas.getContext('2d');
let CW = 300; // Canvas Width
let CH = 300; // Canvas Height
canvas.width = CW;
canvas.height = CH;
// Configuration
const GRID_SIZE = 15; // Grid resolution (e.g., 15x15 cells)
const SEED_COUNT = 5;
let grid, seeds, frameCount = 0;
let claimedCells = 0;
function init() {
// Initialize grid state: -1 means unclaimed
grid = Array(GRID_SIZE).fill(0).map(() => Array(GRID_SIZE).fill(-1));
seeds = [];
claimedCells = 0;
// Scatter seeds
for (let i = 0; i < SEED_COUNT; i++) {
const x = Math.floor(Math.random() * GRID_SIZE);
const y = Math.floor(Math.random() * GRID_SIZE);
seeds.push({ …Excerpt — the full answer is on the round page.
▶ R126 · Bubble sort sweeping bars into order Open round →
```html
<!DOCTYPE html>
<canvas id="c"></canvas><script>const c=document.getElementById('c');const ctx=c.getContext('2d');c.width=800;c.height=400;let arr=[];let n=80;let pass=1;let i=0;let j=0;let compCount=0;let isSorting=true;const COLOR_DEFAULT='#336';const COLOR_COMPARE='#ff9900';const COLOR_SWAP='#cc3300';const COLOR_SORTED='#33cc33';function init() {arr=[];for(let k=0;k<n;k++) arr.push(Math.random()*250+10);pass=1;i=0;j=1;compCount=0;isSorting=true;}function draw() {ctx.clearRect(0,0,c.width,c.height);const barWidth=(c.width-10*n)/n;for(let k=0;k<n;k++) {let h=arr[k];let x=10+k*barWidth;let color=COLOR_DEFAULT;if (j===k||j-1===k) color=COLOR_COMPARE;else if ((i>0 && i<=j) || (i-1>=0 && i-1<=j)) {color=COLOR_SWAP;}else if(k >= n-(pass-1)){color=COLOR_SORTED;}}ctx.fillStyle=color;ctx.fillRect(x,c.height-h,'${barWidth}px',h);let text=`Comparisons: ${compCount}<br>Pass: ${pass}`;ctx.f …Excerpt — the full answer is on the round page.
▶ R127 · Quicksort partitioning around glowing pivots Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Quicksort Visualization</title>
<style>
body { background: #111; display: flex; justify-content: center; align-items: center; min-height: 100vh; margin: 0; font-family: sans-serif; color: white; }
#controls { position: absolute; top: 20px; left: 50%; transform: translateX(-50%); z-index: 10; padding: 10px; background: rgba(0, 0, 0, 0.7); border-radius: 8px;}
#canvas { background: #222; border: 1px solid #444; }
</style>
</head>
<body>
<canvas id="canvas" width="960" height="500"></canvas>
<script>
const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d');
let arr = [];
let swaps = 0;
let isRunning = true;
// State machine for animation control
let state = {
low: 0,
high: 0,
pivotIndex: -1, // Index of the pivot element in the cu …Excerpt — the full answer is on the round page.
▶ R128 · Merge sort weaving runs together Open round →
```html
<!DOCTYPE html>
<html>
<body><canvas id="c"></canvas><script>let c, ctx;const N=80;let HIZ=250, HIS=400;let bars, colors, L=1, P=0;let active = true;function init() {c=document.getElementById('c');ctx=c.getContext('2d');c.width=N*3;c.height=HIS;bars=Array(N).fill(0).map(()=>Math.floor(Math.random()*40)+5);colors=Array(N).fill(null).map((_,i)=>`hsl(${i*7 % 360}, 80%, 60%)`);P=0;L=1;active=true;}function draw() {ctx.clearRect(0, 0, c.width, HIS);for(let i=0;i<N;i++) {const x=i*3;const h=bars[i];ctx.fillStyle=`${colors[i]}`;ctx.fillRect(x,HIS-h,3,h);}drawStats();}function drawStats() {ctx.fillStyle='#333';ctx.font='18px Arial';let text=`Pass: ${P}, Run Length (L): ${L}.`;if(!active)text="Merge Sort Finished! Restarting...";ctx.fillText(text, 10, 25);}(()=>{init();const W=3;function sort() {if (!active) {bars = Array(N).fill(0).map(()=>Math.floor(Math.random()*40)+5);colors = Array(N …Excerpt — the full answer is on the round page.
▶ R129 · Heap sort sifting the maximum to the back Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Heap Sort Animation</title>
<style>
body { background: #111; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; }
canvas { border: 1px solid #333; background: #222; }
</style>
</head>
<body>
<canvas id="heapCanvas" width="800" height="400"></canvas>
<script>
const canvas = document.getElementById('heapCanvas');
const ctx = canvas.getContext('2d');
let arr;
let N = 80;
let max_val = 400;
let swapCount = 0;
let state = 'INIT'; // INIT, BUILDING_HEAP, SORTING, FINISHED
let stepDelay = 50; // Milliseconds per frame update
// State tracking for animation
let initialArray = [];
let heapState = {
isBuilding: false,
currentSwap: null, // [i, j]
siftPath: [], // Indices involved in current sift-down
heapStart: N - 1 // Index up …Excerpt — the full answer is on the round page.
▶ R130 · Radix sort ordering by one digit at a time Open round →
```html
<!DOCTYPE html>
<html>
<head><title>Radix Sort Visualization</title></head>
<body><canvas id="c"></canvas><script>const canvas = document.getElementById('c');const ctx = canvas.getContext('2d');let width, height;const NUM_BARS = 80;let bars = [];let maxVal = 1000;let numDigits = 3;let passCount = 0;let currentDigitPass = 1;let animationFrameId = null;let isSorting = false;let startTime = 0;const BUCKET_COUNT = 10;
function initializeBars() {
width = canvas.width = width || window.innerWidth * 0.95;
height = canvas.height = Math.max(400, window.innerHeight * 0.6);
ctx.fillStyle = '#222';
ctx.fillRect(0, 0, width, height);
bars = [];
for (let i = 0; i < NUM_BARS; i++) {
// Generate random heights (numbers) up to maxVal
const value = Math.floor(Math.random() * (maxVal - 1)) + 1;
bars.push({
value: value, // The number rep …Excerpt — the full answer is on the round page.
▶ R131 · Weekday riddle from two clues Open round →
Today is **Sunday**. The phrase "two days before Thursday" is Tuesday (Thursday minus two days). Since this day corresponds to "the day after tomorrow," that means tomorrow must be Monday, making today Sunday.
▶ R132 · Fermi estimate: a lifetime of drinking water Open round →
Assumptions: Average daily intake $\approx 2.5$ L; Lifespan $\approx 80$ years.
Calculation: $2.5 \text{ L/day} \times 365 \text{ days/year} \times 80 \text{ years}$
Total liters $= 73,900 \text{ liters}$.
74,000▶ R133 · Three friends, three pets Open round →
Ana owns the parrot because her allergy makes owning a furry animal impossible. Since Ben’s pet cannot fly and he doesn't own the dog, Ben must own the cat. This leaves Cleo to own the dog, which is consistent with the clue that the dog owner is older than Ben. Therefore, Ana has the parrot, Ben has the cat, and Cleo has the dog.
▶ R134 · Smallest number from three remainders Open round →
Let $N$ be the positive integer. We are given the system of congruences:
$$\begin{cases} N \equiv 1 \pmod{3} \\ N \equiv 2 \pmod{5} \\ N \equiv 3 \pmod{7} \end{cases}$$
**Step 1: Solve the first two congruences.**
From $N \equiv 1 \pmod{3}$, we have $N = 3k + 1$ for some integer $k$.
Substitute this into the second congruence:
$$3k + 1 \equiv 2 \pmod{5}$$
$$3k \equiv 1 \pmod{5}$$
To solve for $k$, we find the multiplicative inverse of 3 modulo 5. Since $3 \times 2 = 6 \equiv 1 \pmod{5}$, the inverse is 2.
Multiply both sides by 2:
$$2(3k) \equiv 2(1) \pmod{5}$$
$$6k \equiv 2 \pmod{5}$$
$$k \equiv 2 \pmod{5}$$
Therefore, $k = 5j + 2$ for some integer $j$. Substitute this back into the expression for $N$:
$$N = 3(5j + 2) + 1$$
$$N = 15j + 7$$
**Step 2: Incorporate the third congruence.**
Substitute $N = 15j + 7$ into the third congruence ($N \equiv 3 \pmod{7}$):
$$15j + 7 \equiv 3 \p …Excerpt — the full answer is on the round page.
▶ R135 · Conditional dice probability Open round →
The probability that the two dice sum to 9, given that at least one die shows a 4, is $\frac{2}{11}$.
**Justification:**
Let $A$ be the event that at least one die shows a 4. The outcomes for $A$ are $(4, x)$ or $(x, 4)$, excluding duplicates; there are 11 such outcomes (e.g., (4, 1), (1, 4), ..., (4, 6), (6, 4)). Let $B$ be the event that the sum is 9. The outcomes for $A \cap B$ must satisfy both conditions: they must sum to 9 and contain at least one 4. These outcomes are $(4, 5)$ and $(5, 4)$. Since there are 2 favorable outcomes out of a total of 11 possible outcomes in the reduced sample space $A$, the conditional probability is $\frac{2}{11}$.▶ R136 · Double pendulum tracing a chaotic path Open round →
```html
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>Double Pendulum</title></head><style>body{margin:0;overflow:hidden;background:#111}canvas{display:block}</style><script>
const canvas = document.createElement('canvas');
document.body.appendChild(canvas);
const ctx = canvas.getContext('2d');
let L1 = 120, L2 = 120, M1 = 3, M2 = 3;
let x = [Math.PI/4, Math.PI/2]; // Initial angles (radians)
let v = [0, 0]; // Angular velocities
let timeElapsed = 0;
// Trail storage: [{x, y, alpha}]
let trail = [];
const MAX_TRAIL = 1500;
function resize() {
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
}
window.addEventListener('resize', resize);
resize();
// Simple Euler integration for the double pendulum system
function updatePhysics(dt) {
let c1 = Math.cos(x[0]);
let s1 = Math.sin(x[0]);
let c2 = Math.cos(x[1]);
let s2 = Math.s …Excerpt — the full answer is on the round page.
▶ R137 · Cloth mesh hanging and rippling in the wind Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Simulated Fabric</title>
<style>
body { margin: 0; background: #111; display: flex; justify-content: center; align-items: center; height: 100vh; overflow: hidden; }
canvas { border: 1px solid #333; background: #222; }
</style>
</head>
<body>
<canvas id="clothCanvas"></canvas>
<script>
const canvas = document.getElementById('clothCanvas');
const ctx = canvas.getContext('2d');
let W = 700, H = 500;
canvas.width = W;
canvas.height = H;
// Physics Parameters
const COLS = 15;
const ROWS = 10;
const REST_LENGTH = 50; // Target distance between connected points
const GRAVITY = 0.2;
const WIND_STRENGTH_BASE = 0.3;
const DAMPING = 0.98;
const ITERATIONS = 6; // Constraint pass …Excerpt — the full answer is on the round page.
▶ R138 · Two-source wave interference pattern Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Wave Interference</title>
<style>body {margin:0;background:#111;display:flex;justify-content:center;align-items:center;height:100vh;}canvas {border:1px solid #333;}</style>
</head>
<body>
<canvas id="c"></canvas>
<script>
const c = document.getElementById('c');
const ctx = c.getContext('2d');
let W, H;
let imageData;
// Parameters
const SOURCE_RADIUS = 10; // For drawing sources
const WAVE_SPEED = 5; // Speed of phase change (k*v)
const AMPLITUDE_SCALE = 255;
// State variables
let t = 0;
let dx, dy; // Source separation vector components
let D_current = 150; // Initial distance between sources
function setup() {
W = H = 800;
c.width = W; …Excerpt — the full answer is on the round page.
▶ R139 · Small n-body system orbiting a central star Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>N-Body Gravity Simulator</title>
<style>
body { margin: 0; overflow: hidden; background-color: #000; }
canvas { display: block; }
#info { position: absolute; top: 10px; left: 10px; color: #fff; font-family: monospace; font-size: 14px; opacity: 0.7; z-index: 10; }
</style>
</head>
<body>
<canvas id="c"></canvas>
<div id="info">Bodies: </div>
<script>
const canvas = document.getElementById('c');
const ctx = canvas.getContext('2d');
let width, height;
let bodies = [];
let animationFrameId;
// --- Configuration Constants ---
const G = 0.1; // Gravitational Constant (scaled)
const SOFTENING = 5; // Softening factor for r^2 to prevent division by zero
const DT = 0.03; // Time step
const TRAIL_LENGTH = 80;
class Body {
constructor(x, y, m, vx, vy, color) {
this.po …Excerpt — the full answer is on the round page.
▶ R140 · Water sloshing in a tilting container Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Sloshing Water Simulation</title>
<style>
body { margin: 0; background: #111; display: flex; justify-content: center; align-items: center; min-height: 100vh; }
canvas { border: 2px solid #333; background: #0a0e15; }
</style>
</head>
<body>
<canvas id="waterCanvas"></canvas>
<script>
const canvas = document.getElementById('waterCanvas');
const ctx = canvas.getContext('2d');
let W = 800;
let H = 500;
canvas.width = W;
canvas.height = H;
const N_PARTICLES = 200;
const container = { width: W * 0.9, height: H * 0.8, x: (W - W * 0.9) / 2, y: (H - H * 0.8) / 2 };
let particles = [];
let gravityAngle = 0; // Radians
let targetGravityAngle = Math.PI / 4; // Start tilting phase
let ro …Excerpt — the full answer is on the round page.
▶ R141 · Idiom-dense German into natural English Open round →
That was a shot in the dark—now we're left with nothing to show for it, but giving up is not an option.
▶ R142 · Register shift: casual complaint into formal Open round →
Subject: Urgent Complaint Regarding Defective Blender - Order [Insert Order Number] Dear Customer Service Team, I am writing to report a significant defect concerning the blender recently received. After only two days of light use, the unit ceased functioning entirely, accompanied by noticeable sparking. Given that this malfunction suggests a potential safety hazard and product failure, I require immediate action. Please provide either a full refund for the defective item or dispatch a brand-new replacement unit as quickly as possible. I look forward to your prompt resolution of this matter. Sincerely, [Your Name]
▶ R143 · Bureaucratic German into plain English Open round →
To receive the benefit, you must submit a fully completed application by the deadline. Failure to do so will result in the forfeiture of your claim.
▶ R144 · English apology into idiomatic Sie-German Open round →
Wir sind in diesem Fall leider gescheitert – das sagen wir ganz offen. Aber wir werden dies wiedergutmachen, und es wird Ihnen keinen Cent kosten.
▶ R145 · False-friend minefield German into English Open round →
We may have to reschedule the current appointment; it's a sensitive topic, and I don't want to cause any conflict/trouble.
▶ R146 · Repair broken JSON (4 precise errors) Open round →
{
"name": "Alex Weber",
"age": 34,
"email": "alex@example.com",
"active": true,
"tags": ["admin", "beta"],
"signupYear": 2024,
"address": {
"street": "Hauptstr. 5",
"city": "Berlin",
"zip": "10115",
"country": "Germany"
}
}▶ R147 · CSV with embedded comma to JSON array Open round →
```json
[
{
"id": 1,
"name": "Anna Berg",
"notes": "Prefers email, not phone",
"amount": 120.50
},
{
"id": 2,
"name": "Tom Klein",
"notes": "Standard customer",
"amount": 75.00
},
{
"id": 3,
"name": "Lena Fuchs",
"notes": "Called twice, resolved",
"amount": 200.00
},
{
"id": 4,
"name": "Max Otto",
"notes": "VIP customer",
"amount": 50.00
}
]
```▶ R148 · Table QA: sum, filter, max over order data Open round →
1. 241.47 2. 1001, 1003, 1006 3. 1005, 268.50
▶ R149 · Extract meeting invite into a fixed JSON schema Open round →
```json
{
"title": "Q3 Roadmap Kickoff",
"date": "2026-08-18",
"time": "10:30",
"location": "Conference Room B, Berlin office (3rd floor)",
"attendees": [
"Sarah",
"Tom",
"Priya"
]
}
```▶ R150 · Diff two near-identical config blocks Open round →
timeout: 30 -> 45 debug: false -> true max_connections: 100 -> 150
▶ R151 · Binary search tree growing node by node Open round →
```html
<!DOCTYPE html>
<html><head><title>BST Animation</title><style>body{display:flex;justify-content:center;align-items:center;margin:0;}canvas{border:1px solid #ccc;background:#f9f9f9;}</style></head><script>const canvas = document.createElement('canvas');
canvas.width = 800;
canvas.height = 600;
document.body.appendChild(canvas);
const ctx = canvas.getContext('2d');
let tree = null;
let insertionQueue = [];
let state = 'INIT'; // INIT, INSERTING, SEARCHING, PAUSED
let animationFrameId = null;
let nodeCountDisplay = document.createElement('div');
nodeCountDisplay.style.position = 'absolute';
nodeCountDisplay.style.top = '10px';
nodeCountDisplay.style.left = '10px';
document.body.appendChild(nodeCountDisplay);
const MAX_NODES = 25;
let randomValues = [];
function Node(val, parent) {
this.val = val;
this.parent = parent;
this.left = null;
this.right = null;
}
funct …Excerpt — the full answer is on the round page.
▶ R152 · Hash table with visible collision chains Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Hash Table Animation</title>
<style>
body { background: #111; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; }
canvas { border: 1px solid #333; background: #222; }
</style>
</head>
<body>
<canvas id="hashCanvas" width="800" height="450"></canvas>
<script>
const canvas = document.getElementById('hashCanvas');
const ctx = canvas.getContext('2d');
let buckets = [];
let keysCount = 0;
let animationRunning = true;
const NUM_BUCKETS = 12;
const BUCKET_W = (canvas.width - 40) / NUM_BUCKETS;
const Y_START = 30;
// State management and initial setup
function init() {
buckets = Array(NUM_BUCKETS).fill(null).map(() => []);
keysCou …Excerpt — the full answer is on the round page.
▶ R153 · Binary min-heap with bubble-up and sink-down Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"><title>Min-Heap Animation</title>
<style>body{margin:0;background:#111;overflow:hidden}canvas{display:block}</style>
</head>
<body><canvas id="heapCanvas"></canvas><script>
const canvas = document.getElementById('heapCanvas');
const ctx = canvas.getContext('2d');
let W, H;
// Heap state variables
let heapArr = [];
let operationCount = { inserts: 0, extracts: 0 };
let isAnimating = false;
let animationFrameId = null;
// Animation State tracking
let currentOperation = ''; // 'insert' or 'extract'
let pathHistory = []; // Stores [index1, index2] for swaps
let swapIndexA = -1; // Source index A of the current swap
let swapIndexB = -1; // Target index B of the current swap
let stepDelay = 0; // Time delay counter
const DELAY_FRAMES = 15; // Duration of pause/highlight
function resizeCa …Excerpt — the full answer is on the round page.
▶ R154 · Ring buffer with producer and consumer at different rates Open round →
```html
<!DOCTYPE html>
<html><head><title>Ring Buffer Animation</title></head><body style="background-color:#111;display:flex;justify-content:center;align-items:center;height:100vh;margin:0;font-family:monospace;color:white;"><canvas id="canvas" width="600" height="300" style="border:2px solid #444;"></canvas><div id="status" style="margin-top: 10px;"></div><script>
const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d');
const statusDiv = document.getElementById('status');
const SLOTS = 18;
const RADIUS = 200;
const CENTER_X = canvas.width / 2;
const CENTER_Y = canvas.height / 2;
const SLOT_ANGLE_STEP = (Math.PI * 2) / SLOTS;
let slots = Array(SLOTS).fill(false); // false = empty, true = filled
let pIndex = 0; // Producer index
let cIndex = 0; // Consumer index
let pAngle = Math.random() * Math.PI * 2;
let cAngle = Math.random() * Math.PI * 2;
// Moveme …Excerpt — the full answer is on the round page.
▶ R155 · Linked list with animated pointer relinking Open round →
```html
<!DOCTYPE html>
<html><head><title>Linked List Animation</title><style>body{margin:0;background:#111;display:flex;justify-content:center;align-items:center;height:100vh}canvas{border:1px solid #333;}</style></head><body onload="init()"><canvas id="canvas" width="960" height="400"></canvas><script>
const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d');
let list = null;
let animationCycleRunning = false;
let currentOperation = null; // {type: 'insert'/'delete', pos: N, old_next: ..., new_target: ...}
let step = 0;
const NODE_W = 150;
const NODE_H = 60;
const SPACING = 30;
const MAX_NODES = 8;
const MIN_NODES = 2;
class Node {
constructor(data, next=null) {
this.data = data;
this.next = next;
this.x = 0; // Calculated position
this.y = 0;
this.highlight = false;
this.is_deleted = false;
}
}
c …Excerpt — the full answer is on the round page.
▶ R156 · Invent 3 product names + taglines for a fictional object (no superlatives) Open round →
1. SnapSeal Clip — Keeps snacks fresh, standing upright every time. 2. Pantry Grip — Easy closure for lasting crunch enjoyment. 3. Silicone Keeper — Seals your bag with a simple hand motion.
▶ R157 · Rewrite the same product text for two different audiences, facts unchanged Open round →
(a) Teenagers: Slay all day long with the AquaGlow bottle, which holds 750 ml and keeps your drinks icy cold for a full 12 hours. It’s totally safe because it’s made from BPA-free plastic, plus the built-in straw makes sipping super easy on the go. You can rock any look since it’s dishwasher-safe and comes in 4 sick colors! (b) Seniors: This helpful AquaGlow bottle holds 750 ml of liquid and is designed to keep your beverages refreshingly cold for up to 12 hours. Constructed from safe, BPA-free plastic, it also features a convenient built-in straw for simple use. Finding the perfect match is easy because this dishwasher-safe bottle comes in 4 lovely colors.
▶ R158 · 5 email subject lines under 50 chars, no clickbait, no ALL-CAPS Open round →
1. Winter jackets sale + new return policy details 2. Your feedback matters: App survey and more 3. Save on coats and enjoy easy returns for 60 days 4. Updates inside: Jacket deals, app survey, & returns 5. Don't miss our winter jacket sale (Nov 1-15)
▶ R159 · Micro-story: exactly 50 words (±5) with 3 mandatory elements Open round →
The sudden downpour forced her under the awning, sheltering beneath a bright red umbrella. Watching the departing train shrink was agony—she’d missed it entirely. Standing at the station's edge, she felt adrift, like a ship far from any lighthouse. The journey home would be long, tracing only the coastline of regret and new beginnings.
▶ R160 · Critique a generic slogan in 2 sentences + give 2 better alternatives Open round →
The slogan is overly generic and makes no verifiable claim about its unique benefit—it could apply equally well to any electronics brand, including those that do not sell outdoor gear. It fails to connect the core product value (portable solar power) with the target audience's specific need for reliable off-grid energy. 1. Power Up, Miles Ahead: Solar Charging for Off-Grid Expeditions. 2. Stay Connected Anywhere: Reliable Solar Charge for Hikers and Campers.
▶ R161 · Selection sort vs shell sort racing side by side Open round →
```html
<!DOCTYPE html>
<html>
<head>
<title>Sort Race</title>
<style>
body { display: flex; justify-content: space-around; padding: 20px; background-color: #111; color: white; font-family: sans-serif; }
canvas { border: 1px solid #333; background-color: #222; margin: 10px; }
#info { width: 300px; padding-top: 40px; }
.panel { text-align: center; }
h3 { color: #ccc; }
</style>
</head>
<body>
<canvas id="selectionCanvas" width="600" height="400"></canvas>
<div id="info">
<h3>Selection Sort</h3>
<p>Comparisons: <span id="compSelect">0</span></p>
</div>
<canvas id="shellCanvas" width="600" height="400"></canvas>
<div id="info2">
<h3>Shell Sort</h3>
<p>Comparisons: <span id="compShell">0</span></p>
</div>
<script>
const C = { N_BARS: 30, CANVAS_W: 600, CANVAS_H: 400 };
let canvasSelect = document.getElementById('selectionCanvas');
let ctxSelect = canvasSelect.getContext('2d' …Excerpt — the full answer is on the round page.
▶ R162 · Breadth-first search flooding a random grid maze Open round →
```html
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><title>BFS Animation</title></head><style>body{margin:0;overflow:hidden}canvas{display:block}</style><script>const canvas = document.createElement('canvas');document.body.appendChild(canvas);const ctx = canvas.getContext('2d');let GRID_W=20,GRID_H=15,CELL_SIZE=30,WALL_DENSITY=0.25;let grid=[[]];let start={x:0,y:0},goal={x:GRID_W-1,y:GRID_H-1};let visited=[];let queue=[],pathFound=false;const MAX_CHARS=7000;
canvas.width=GRID_W*CELL_SIZE;canvas.height=GRID_H*CELL_SIZE;
function initGrid() {
grid=[[]];
for(let y=0;y<GRID_H;y++) {
let row=[];
for(let x=0;x<GRID_W;x++) {
row.push({isWall:false, visited:false, distance:-1});
}
grid.push(row);
}
// Place walls and ensure start/goal are open
for(let y=0;y<GRID_H;y++) {
for(let x=0;x<GRID_W;x++) { …Excerpt — the full answer is on the round page.
▶ R163 · Prim's algorithm growing a minimum spanning tree Open round →
```html
<!DOCTYPE html>
<html>
<head>
<title>Prim's Algorithm MST</title>
<style>body{margin:0;overflow:hidden;background:#111}canvas{display:block}#info{color:#ccc;font-family:monospace;padding:5px;background:#222;border-radius:5px}
</style>
</head><body><canvas id="graphCanvas" width="900" height="600"></canvas><div id="info">Nodes: 0/0 | Edges Added: 0</div><script>
const canvas = document.getElementById('graphCanvas');
const ctx = canvas.getContext('2d');
const infoDiv = document.getElementById('info');
let nodes = [];
let adjMatrix;
let numNodes;
let visited = [];
let mstEdges = new Set();
let currentGraphState = { edges: 0, totalWeight: 0 };
// --- Setup Functions ---
function setupGraph() {
numNodes = Math.floor(Math.random() * (25 - 20 + 1) + 20); // 20 to 25 nodes
nodes = [];
for (let i = 0; i < numNodes; i++) {
nodes.push({ x: Math.random() * canvas.width …Excerpt — the full answer is on the round page.
▶ R164 · Boids flocking with separation, alignment, cohesion and a predator Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Boid Simulation</title>
<style>body {margin:0;overflow:hidden;background:#111;}canvas {display:block;}</style>
</head>
<body>
<canvas id="c"></canvas>
<script>
const canvas = document.getElementById('c');
const ctx = canvas.getContext('2d');
let WIDTH = window.innerWidth * 0.95;
let HEIGHT = window.innerHeight * 0.85;
ctx.canvas.width = WIDTH;
ctx.canvas.height = HEIGHT;
const NUM_BOIDS = 60;
const MAX_FORCE = 1.0;
const NEIGHBOR_RADIUS = 75;
const SEPARATION_DISTANCE = 20;
let boids = [];
let predator = { x: WIDTH * 0.3, y: HEIGHT * 0.3, vx: 0, vy: 0 };
function Boid(x, y) {
this.x = x;
this.y = y;
this.vx = (Math.random() - 0.5) * 2; …Excerpt — the full answer is on the round page.
▶ R165 · Recursive backtracker carving a maze, then solving it Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Autonomous Maze Solver</title>
<style>
body { background: #111; display: flex; justify-content: center; align-items: center; margin: 0; height: 100vh; font-family: sans-serif; color: white; }
canvas { border: 2px solid #444; background: #000; }
</style>
</head>
<body>
<canvas id="mazeCanvas"></canvas>
<div style="position: absolute; top: 10px; left: 30px; color: white;">Carved Cells: <span id="carveCount">0</span></div>
<div style="position: absolute; top: 10px; right: 30px; color: white;">Steps: <span id="stepCount">0</span></div>
<script>
const canvas = document.getElementById('mazeCanvas');
const ctx = canvas.getContext('2d');
// Grid dimensions (odd numbers for proper wall separation)
const COLS = 25;
const ROWS = 18;
const CELL_SIZE = 20; // Size u …Excerpt — the full answer is on the round page.
▶ R166 · Faithful 3-sentence summary of a chaotic meeting transcript Open round →
The weekly status update is settled and will move from Friday afternoon to Monday mornings starting next week, requiring Tom to send an updated calendar invite reflecting this change by end of day Friday. The team also adopted Priya’s new five-label system, and she committed to updating the shared labeling guide document by Wednesday. Lastly, the discussion concerning the office plant budget was postponed until the following meeting.
▶ R167 · One-sentence TL;DR under 25 words Open round →
Migrate from the deprecated /v1/reports API to /v3/reports by September 30, 2026, or your integrations will fail due to the shutdown.
▶ R168 · Extract action items as a checklist Open round →
1. Maria -- finalize and send new homepage copy -- by this Thursday 2. Ben -- review homepage copy and give feedback -- by Friday 3. Chen -- push fix for broken contact form -- by Monday 4. Maria -- chase client for logo color confirmation -- today 5. Ben -- send updated privacy policy draft to legal -- by next Wednesday
▶ R169 · Neutral summary of a biased product rant Open round →
When operating the blender, liquid leaks from around the base seal of the jug when filled past the halfway mark. Additionally, speeds 4 through 7 on the dial operate identically, limiting the effective number of speed settings. Finally, the motor overheats and automatically shuts down after approximately 90 seconds of continuous blending.
▶ R170 · Compress a how-to into exactly 5 numbered steps Open round →
1. Mix 100g whole wheat flour with 100g water (~21°C); wait loosely covered for 24 hours. 2. Discard half; feed remaining starter with 100g flour and 100g water. Wait 24 hours. 3. Repeat the discard-and-feed process daily for five more days. 4. Monitor until Day 7, looking for bubbles and a pleasant tangy smell. 5. Starter is ready when it reliably doubles in size within 4–6 hours of feeding.
▶ R171 · Fireworks bursting into fading sparks Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Fireworks Display</title>
<style>body {margin:0;overflow:hidden;}#canvas {display:block;background:#000;}</style>
</head>
<body>
<canvas id="canvas"></canvas>
<script>
const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d');
let width, height;
function resize() {
width = window.innerWidth;
height = window.innerHeight;
canvas.width = width;
canvas.height = height;
}
window.addEventListener('resize', resize);
resize();
const GRAVITY = 0.02;
let particles = [];
let rockets = [];
class Particle {
constructor(x, y, vx, vy, color, lifespan, size) {
this.x = x;
this.y = y;
this.vx = vx || (Math.random() - 0.5) * 2;
this.vy = vy || 0;
this.color = color;
this.opacity = 1;
this.lifespan = lifespan;
this.m …Excerpt — the full answer is on the round page.
▶ R172 · Raindrops sliding down a window pane Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Rain Simulation</title>
<style>
body { margin: 0; overflow: hidden; background-color: #1a2c3d; display: flex; justify-content: center; align-items: center; height: 100vh; }
canvas { border: 1px solid rgba(255, 255, 255, 0.1); background-color: #3c6b8d; box-shadow: 0 0 20px rgba(0, 0, 0, 0.5); }
#counter { position: absolute; top: 10px; left: 10px; color: white; font-family: Arial, sans-serif; font-size: 16px; opacity: 0.8; }
</style>
</head>
<body>
<canvas id="rainCanvas"></canvas>
<div id="counter">Drops: 0</div>
<script>
const canvas = document.getElementById('rainCanvas');
const ctx = canvas.getContext('2d');
const counterEl = document.getElementById('counter');
let W, H;
canvas.width = window.innerWidth * 0.95; …Excerpt — the full answer is on the round page.
▶ R173 · Metaball lava lamp with heating and cooling blobs Open round →
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Metaball Lava Lamp</title>
<style>body { background: #12121c; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; }</style>
</head>
<body>
<canvas id="lavaCanvas"></canvas>
<script>
const canvas = document.getElementById('lavaCanvas');
const ctx = canvas.getContext('2d');
let blobs = [];
let animationFrameId;
// Constants
const N_BLOBS = 6;
const LAMP_W = 150;
const LAMP_H = 450;
const GRID_SIZE = 8; // Coarse grid resolution
const MAX_FIELD = 1.0;
canvas.width = LAMP_W * 1.2;
canvas.height = LAMP_H + 50;
function initializeBlobs() {
blobs = [];
for (let i = 0; i < N_BLOBS; i++) {
blobs.push({ …Excerpt — the full answer is on the round page.
▶ R174 · Recursive fractal tree growing branch by branch Open round →
<!DOCTYPE html>
<html><head><title></title><style>body{margin:0;overflow:hidden}canvas{display:block}</style></head><body onload="init()"><canvas id="c"></canvas><script>
const C = document.getElementById('c');
const ctx = C.getContext('2d');
let W, H;
let treeSegments = [];
let animationState = 'growing'; // growing, stable, resting
let segmentCounter = 0;
let lastTime = 0;
function resize() {
W = window.innerWidth;
H = window.innerHeight;
C.width = W;
C.height = H;
}
window.addEventListener('resize', resize);
resize();
// Branch structure: [start_x, start_y, initial_length, current_progress, max_depth]
function generateTree(x, y, length, depth) {
if (depth <= 0 || length < 5) return [];
let segments = [{ x1: x, y1: y, x2: x + length * Math.cos(0), y2: y - length * Math.sin(0), maxLen: length, progress: 0, depth: depth }];
if (depth > 1) { …Excerpt — the full answer is on the round page.
▶ R175 · Noise flowfield painting additive particle trails Open round →
<!DOCTYPE html>
<html><head><title>Noise Flowfield</title></head><body><canvas id="c"></canvas><script>const c=document.getElementById('c');const ctx=c.getContext('2d');let width=window.innerWidth;let height=window.innerHeight;c.width=width;c.height=height;const N_PARTICLES=450;let particles=[];let timeOffset=Math.random()*10;let lastTime=0;function init() {particles=[];for(let i=0;i<N_PARTICLES;i++){particles.push({x: Math.random()*width,y: Math.random()*height,vx: 0,vy: 0,life: 1});}}function getFlowVector(x,y,t){const scale=0.005;const freq=1.0+Math.sin(t*0.0002)*0.5;let angleX=( Math.cos((x+t)*scale*freq) * 2 + Math.sin((y-t)*scale*freq) * 2 );let angleY=( Math.sin((x-t)*scale*freq) * 2 + Math.cos((y+t)*scale*freq) * 2 );return {dx: angleX, dy: angleY};}function updateParticles(dt){for(let i=0;i<particles.length;i++){const p=particles[i];const flow={dx: getFlowVector(p.x,p.y,timeOffs …Excerpt — the full answer is on the round page.
▶ R176 · Fix exactly the errors, change nothing else Open round →
On Monday morning, the small archive opened its new reading room to local students. The room has six desks, two lamps, and a shelf for returned notebooks. Before the first group arrived, Mara checked the sign-in sheet and placed pencils beside each chair. She noticed that one window was stuck, but the hallway was quiet and the heater worked well. At nine o'clock, twelve students entered the archive, greeted the staff, and began comparing old town maps. Their teacher asked them to write short notes about every map they handled. One student found a drawing of the river bridge, and another matched it to a photograph from 1912. By noon, the class had labeled the boxes, cleaned the tables, and thanked Mara for her help. The visit ended on time, and the archive stayed open for regular visitors after lunch.
▶ R177 · Make the numbers consistent Open round →
Workshop attendance report: The registration desk recorded 18 participants: 7 from North Hall, 6 from East Studio, and 5 from River Annex. The header currently says 18 participants attended. The event ran on Wednesday, March 4, 2026, and the room booking confirmation and the posted schedule both list Wednesday, March 4, 2026. For the feedback survey, 15 of the 18 participants submitted forms. The draft summary says this equals 72%, but 15 out of 18 is 83% when rounded to the nearest whole percent.
▶ R178 · Remove redundancy without losing facts Open round →
The neighborhood mobile clinic launches on April 8th at the Maple Community Center, which is located on Maple Street. The clinic will operate weekly from Wednesday, 10 a.m. to 4 p.m. Services provided are free and include blood pressure checks, vaccinations, and short medical consultations. Residents may schedule appointments either by calling or booking in person at the center. Importantly, Spanish and Vietnamese interpreters will be available for assistance throughout all clinic hours.
▶ R179 · Unify tense and perspective Open round →
At dawn, I stepped onto the station platform and checked the timetable. I noticed the last train number blinking on the board before the screen went dark. I waited beside the vending machine, but my eyes kept looking toward the empty tracks. The loudspeaker crackled, and I heard a short apology for the delay. Then I walked to the ticket office, where the clerk handed me a paper voucher. I folded the voucher into my notebook and thought about the missed connection. Finally, I boarded the replacement bus, and I sat near the back window. As the bus left town, I watched the station lights disappear behind the rain.
▶ R180 · Fix the broken references Open round →
Maintenance note for the demo room: The tablet is stored in the blue cabinet, and it must be charged before each session. The projector was tested after lunch; the device should remain unplugged overnight. See above for the cleaning checklist. Setup steps: 1. Unlock the cabinet. 2. Place the tablet on the stand. 3. Start the room timer.