Model profile
mistral-small
26/36answered (R6–R42)
10DNF / pending
11.5 smedian latency
4.47avg. score · 15 scored rounds (R6–R42)
Low participation: this average is drawn from only 15 of 36 rounds (42%). Not directly comparable to models with fuller participation.
Rounds & answers 24
▶ R6 · Extraction → JSON8.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", "spuelsmaschinenfestem Edelstahlaufsatz"], "in_stock": false}▶ R7 · Sentiment classification10.3 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↔EN7.0 s Open round →
A) That's old news—life punishes those who come too late. We pulled ourselves out of the mire. --- B) Der Beweis des Pudding liegt im Essen: Unser knapp bemessenes Budget zwang uns, an Ecken und Enden zu sparen, aber der Start verlief reibungslos.
▶ R9 · One-liner code10.7 s Open round →
```^
1
2.\`|^(?=(\\d{4}-((0[1-9])|(1[0-2]))-\\d{2}$|\\b))
2
SELECT customer_id, SUM(amount) AS total_value FROM orders GROUP BY customer_id ORDER BY total_value DESC LIMIT 5;
3.[.items[*].id]
4.nav a[href^="http"],nav a[href^="https"]
5.{ cut -d' ' -f1;sort|uniq}▶ R10 · Facts quiz6.4 s Open round →
1. Canberra 2. 1989 W (tungssten) 4.I'm a teapot Franz Kafka 6.Saturn 7. 101010 8. 443 9. Linus Torvalds 10. 97
▶ R11 · Micro-copy & slogans12.1 s Open round →
1. Hyacinth "Stainless Steel Cat Fountain" - Purifies water whilst keeping a fresh supply 24/7. 2. Family-owned since 1980, your local favourite artisan baking business 3. A Comprehensive and Objective AI Model Comparison Website To Assist You In Choosing The Optimal Algorithms For Your Application 4. Drown out distractions in perfect HD sound. Noise-cancelling headphones with 15 hours of battery life by Nio. 5. Your data, your identity. Manage every password securely and effortlessly with this intuitive application from Nordpass.
▶ R13 · Image prompts0.8 s Open round →
```
▶ R14 · Product names6.1 s Open round →
1. HydraFlow — Drink More Often. 2. SipSense — Your Intuitive Reminder. 3. AquaPrompt — Never Forget to Hydrate 4. FlowMate — Smartly Staying Hydrated. 5. DrinkEasy — Hydration Simplified.
▶ R15 · CSS spinner10.1 s Open round →
```html
<div class="spinner"></div>
<style>
.spinner {
border: 4px solid #f3f3f3; border-top: 4px solid #3498db;
border-radius: 50%; width: 40px; height: 40px;
animation: spin 2s linear infinite;
}
@keyframes spin {
100% { transform: rotate(360deg); }
}
</style>
```▶ R16 · Explain it to a child (German)10.8 s Open round →
Ein Akku ist wie eine Tüte mit Süßigkeiten für dein elektrisches Gerät. Er enthält Energie, die aus Chemikalien entsteht und diese Energie wird in Elektrizität umgewandelt, wenn du den Schalter betätigst . Wenn der Akku leer ist, müssen die Chemikalien wieder aufgeladen werden, was bedeutet, dass man sie mit Strom füllt, genau wie man eine Süßigkeiten Tüte wieder füllen muss. Das dauert ein bisschen Zeit und danach kann dein Gerät wieder benutzt werden
▶ R17 · Logic riddle15.0 s★ 5.5/10 Open round →
Ziehen Sie eine einzelne Frucht aus der Kiste mit dem Etikett "Gemischt". Basierend auf der einzigen falschen Information darauf, kann die Kiste nur Äpfel enthalten. Das bedeutet: Die anderen zwei Kisten müssen dann Birnen und "Gemischtes" (Äpfel +Birnen) sein. Daraus folgt: Die Kiste mit dem Etikett “Birnen“ muss Gemischtes enthalten und die Kiste mit dem Etikett “Äpfel” die echten Birnen. Verändern Sie daher das Etikett auf “Äpfel“ zu „Gemischt", das Etikett "Birnen" zu "Äpfel" und das bisherige "Gemischt" Etikett zu „Birnen".
▶ R18 · German registers & tone6.2 s★ 8.5/10 Open round →
1. Wir bedauern Ihnen mitteilen zu müssen, dass wir den vereinbarten Liefertermin leider nicht einhalten können. 2. Der angesetzte Liefertermin kann aktuell nicht eingehalten werden. 3. Ich befürchte, wir kriegen es dieses Mal nicht bis zum angegebenen Termin hin.
▶ R19 · Table QA3.5 s★ 9.5/10 Open round →
1. VitaSip 2. 830 3. PureFlow 4. 19,51 5. drei
▶ R20 · JSON repair8.0 s★ 7.5/10 Open round →
```json
{
"name": "Trinkflasche Pro",
"price": 29.90,
"tags": ["outdoor","sport"],
"stock": {
"berlin": 12,
"muenchen": 7,
"hamburg": null
},
"active": true
}
```📝 Markdown fence despite explicit ban (−2.5)
▶ R21 · Sorting race bubble/insertion/selection91.3 sSTAT★ 3.5/10 Open round →
📝 bars frozen, no labels/DONE, third panel cut off (3.5)
Show code
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Sorting Algorithms Visualization</title>
<style>
canvas {
border: 1px solid black;
}
.container {
display: flex;
justify-content: space-around;
}
</style>
</head>
<body>
<div class="container">
<canvas id="bubble" width="400" height="350"></canvas>
<canvas id="insertion" width="400" height="350"></canvas>
<canvas id="selection" width="400" height="350"></canvas>
</div>
<script>
const ctx = [document.getElementById('bubble').getContext('2d'),
document.getElementById('insertion').getContext('2d'),
document.getElementById('selection').getContext('2d')];
function drawArray(ctx, arr) {
ctx.clearRect(0, 0, 400, 350);
const barWidth = 10;
for (let i = 0; i < arr.length; i++) {
let height = arr[i] * 8.75;
ctx.fillStyle = 'blue';
ctx.fillRect(i * barWidth + 2, 350 - height, barWidth - 1, height);
}
}
function bubbleSort(arr) {
const n = arr.length;
for (let i = 0; i < n-1; i++) {
for (let j = 0; j < n-i-1; j++) {
drawArray(ctx[1], arr.slice());
let sleep = Date.now();
while (Date.now() - sleep < 5) { }
if (arr[j] > arr[j+1]) {
[arr[j], arr[j+1]] = [arr[j+1], arr[j]];
drawArray(ctx[0], arr);
}
}
}
ctx[2].font = "30px Arial";
ctx[2].fillText('DONE', 150, 340);
}
function insertionSort(arr) {
for (let i = 1; i < arr.length; i++) {
const key = arr[i];
let j = i - 1;
while (j >= 0 && arr[j] > key) {
drawArray(ctx[2], arr.slice());
let sleep = Date.now();
while (Date.now() - sleep < 5) { }
arr[j + 1] = arr[j];
j--;
drawArray(ctx[1], arr);
}
arr[j + 1] = key;
}
ctx[2].font = "30px Arial";
ctx[2].fillText('DONE', 150, 340);
}
function selectionSort(arr) {
const n = arr.length;
for (let i = 0; i < n-1; i++) {
let minIdx = i;
for (let j = i+1; j < n; j++) {
if (arr[j] < arr[minIdx]) {
minIdx = j;
}
}
[arr[i], arr[minIdx]] = [arr[minIdx], arr[i]];
drawArray(ctx[2], arr.slice());
}
ctx[0].font = "30px Arial";
ctx[0].fillText('DONE', 150, 340);
}
function generateRandomArray() {
return Array.from({ length: 40 }, () => Math.floor(Math.random() * 26) + 5);
}
const arr = generateRandomArray();
setTimeout(()=>{bubbleSort(arr.slice());},5);
insertionSort((arr.slice()));
selectionSort((arr.slice()))
</script>
</body>
</html>
```▶ R22 · Hexagon balls140.3 sERRSTATLIM★ 1.5/10 Open round →
Show code
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Physics Simulation</title>
<style>
body { margin: 0; display: flex; justify-content: center; align-items: center; height: 100vh; background-color: #f0f0f0; }
canvas {
box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}
</style>
</head>
<body>
<canvas id="physicsCanvas" width="600" height="600"></canvas>
<script>
const canvas = document.getElementById('physicsCanvas');
const ctx = canvas.getContext('2d');
const balls = [];
const hexagonPoints = [
{x: 300, y: 50},
{x: 450, y: 150},
{x: 450, y: 350},
{x: 300, y: 450},
{x: 150, y: 350},
{x: 150, y: 150}
];
const gravity = 0.1;
let angle = 0;
class Ball {
constructor(x, y, radius) {
this.x = x;
this.y = y;
this.radius = radius;
this.vx = (Math.random() - 0.5) * 2;
this.vy = (Math.random() - 0.5) * 2;
}
update() {
this.vy += gravity;
this.x += this.vx;
this.y += this.vy;
for (let i = 0; i < hexagonPoints.length; i++) {
const pt1 = hexagonPoints[i];
const pt2 = hexagonPoints[(i + 1) % hexagonPoints.length];
const normal = { x: pt2.y - pt1.y, y: pt1.x - pt2.x };
const length = Math.sqrt(normal.x * normal.x + normal.y * normal.y);
normal.x /= length;
normal.y /= length;
const dotProduct = (this.vx * normal.x) + (this.vy * normal.y);
if (dotProduct < 0 && this.distanceToSegment(pt1, pt2) - this.radius <= 0) {
const reflectionPoint = { x: pt1.x + ((normal.x * dotProduct)), y: pt1.y + ((normal.y * dotProduct)) };
this.vx -= 2 * normal.x * dotProduct;
this.vy -= 2 * normal.y * dotProduct;
const collisionNormal = {x: reflectionPoint.x -this.x, y:this.y-reflectionPoint.Y};
}
}
for (let i of balls) {
if (i !== this && Math.sqrt((this.x-i.x)**2+(this.y-i.y)**2) < 0.5+this.radius) {
const dx = this.x - i.x;
const dy= this.y- i.y;
const distance = Math.sqrt(dx*dx +dy* dy) ;
(this.vx,i.VY) =(i.vx,-dx/(distance)*0.4,this.vy+1/2,-dy,0.9);
}
}
}
distanceToSegment(pt1, pt2) {
const x = pt2.x - pt1.x;
const y = pt2.y - pt1.y;
const t = ((this.x - pt1.x)*x+(this.y-pt1 .y)*y)/(x*x+y*y);
if (t< 0) return Math.sqrt((this.x-pt1)x)**2 +(THis.y -pt.1.y )**2;
if(t>1)returnMath.sqrt(Xx-x))+this.y-pt.y));
}
}
function init() {
for (let i = 0; i < 8; i++) {
balls.push(new Ball(Math.random() * canvas.width, Math.random() * canvas.height, 5));
}
}
function drawHexagon() {
ctx.save();
ctx.translate(canvas.width / 2, canvas.height / 2);
ctx.rotate(angle);
ctx.beginPath();
hexagonPoints.forEach((pt, i) => {
if (i === 0) ctx.moveTo(pt.x, pt.y);
else ctx.lineTo(pt.x, pt.y);
});
ctx.closePath();
ctx.strokeStyle = 'black';
ctx.stroke();
ctx.restore();
angle += 0.01;
}
function drawBalls() {
balls.forEach(ball => {
ctx.beginPath();
const x = canvas.width /2 + (ball.x* Math.cos(angle))+(ball.y * Math.sin(angle));
const y = canvas.height/2 -(ball.x*Math.sin(angle)) ) ball.Y*Math.cos(a);
ctx.arc(x, y, ball.radius , 0, Math.PI*2 );
ctx.fillStyle = 'red';
ctx.fill();
});
}
function update() {
balls.forEach(ball => ball.update());
drawHexagon();
drawBalls();
requestAnimationFrame(update);
}
init();
update();
</script>
</body>
</html>
```▶ R23 · Pendulum wave66.3 sOK★ 8.5/10 Open round →
Show code
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pendulum Wave</title>
<style>
canvas { background: #fff; display: block; margin: 20px auto; }
</style>
</head>
<body>
<canvas id="pendulums" width="800" height="600"></canvas>
<script>
function pendulumWave() {
const canvas = document.getElementById('pendulums');
const ctx = canvas.getContext('2d');
let lastTime = 0;
const numPendulums = 15;
const pendulumLengths = Array.from({ length: numPendulums }, (_, i) => 30 * (numPendulums - i));
const pivotX = canvas.width / 2;
const amplitudes = pendulumLengths.map(l => l * 0.8);
function animate(time) {
if (!lastTime) lastTime = time;
const deltaTime = time - lastTime;
ctx.clearRect(0, 0, canvas.width, canvas.height);
for (let i = 0; i < numPendulums; i++) {
const length = pendulumLengths[i];
const amplitude = amplitudes[i];
let angle = Math.sin(time / 100 + i * 2.4) * amplitude;
ctx.beginPath();
ctx.moveTo(pivotX, 50);
ctx.lineTo(pivotX + (length * Math.cos(angle)), 50 - (length * Math.sin(angle)));
ctx.stroke();
const pendulumColor = `rgba(179, ${32+6*i}, 8, 1)`;
ctx.fillStyle = pendulumColor;
ctx.beginPath();
ctx.arc(pivotX + (length * Math.cos(angle)), 50 - (length * Math.sin(angle)), 10, 0, 2 * Math.PI);
ctx.fill();
}
lastTime = time;
requestAnimationFrame(animate);
}
requestAnimationFrame(animate);
}
pendulumWave();
</script>
</body>
</html>
```▶ R24 · Maze race BFS/DFS/A*98.1 sERRBLANK★ 1/10 Open round →
Show code
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pathfinding Algorithms</title>
<style>
body {
display: flex;
font-family: Arial, sans-serif;
}
canvas {
border: 1px solid black;
}
</style>
<script>
function createMaze() {
const maze = [];
for (let i = 0; i < 25; i++) {
const row = [];
for (let j = 0; j < 25; j++) {
row.push(Math.random() > 0.7 ? 1 : 0);
}
maze.push(row);
}
return maze;
}
function drawMaze(ctx, maze) {
ctx.clearRect(0, 0, 500, 500);
for (let i = 0; i < 25; i++) {
for (let j = 0; j < 25; j++) {
if (maze[i][j] === 1) {
ctx.fillStyle = 'black';
} else {
ctx.fillStyle = '#fff7a9'; //light yellow
}
ctx.fillRect(j * 20, i * 20, 20, 20);
}
}
}
function drawPath(ctx, path) {
const colors = ['red', 'blue'];
if (path.length < COLORS_LENGTH){
canvas = document.getElementById('canvas3');
ctx.beginPath();
for (let i = 0; i<path.length;i++){
ctx.fillStyle = colors[i];
ctx.arc(path[i].x, path[i].y, 5, 2 * Math.PI, false);
ctx.fill();
ctx.stroke();
}
}else{
canvas = document.getElementById('canvas5');
if (path.length < COLORS_LENGTH){
ctx.beginPath();
for (let i = 0; i<path.length;i++){
ctx.fillStyle= 'green';
ctx.arc(path[i].x, path[i].y, 5, 2 * Math.PI, false);
ctx.fill();
ctx.stroke();
}else{
canvas = document.getElementById('canvas1');
if (path.length < COLORS_LENGTH){
for (let i = 0; i<path.length;i++){
ctx.beginPath();
ctx.arc(path[i].x, path[i].y, 5, 2 * Math.PI, false);
ctx.fillStyle= '#ff1493'; //DARK PINK
ctx.stroke();
canvas = document.getElementById('canvas2');
}
}
}
}
function bfs(maze, start, goal) {
const queue = [start];
const visited = new Set([`${start.x},${start.y}`]);
let path = [];
while (queue.length > 0){
const current = queue.shift();
if(current.x ===goal.x && current.y===goal.y){
path=bfsPath;
break;
}
}
}
function aStar(maze, start, goal) {
const openSet = new Set([start]);
let path=[];
while (openSet.size>0){
let current=openSet
if(current.x===goal.x &¤t.y ===goal.y){
return astarPath;
}
}
}
function dfs(maze, start, goal) {
const stack = [start];
}
</script>
</head>
<body OnLoad="makeCanvas();"> </body> <canvas id='canvas1' width="500" height="500"></canvas>
<canvas id='canvas3' width="500 "height="500"></canvas>
<canvas id='canvas2'></canvas> </canvas>
</body> </html>
```
This has 120 lines of HTML content!▶ R25 · Sorting race quick/merge/heap81.0 sSTAT★ 3/10 Open round →
Show code
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sorting Algorithms Visualization</title>
<style>
body { display: flex; justify-content: space-around; }
canvas { border: 1px solid black; }
#status { margin-top: 20px; text-align: center; }
</style>
</head>
<body>
<canvas id="qsort" width="400" height="500"></canvas>
<canvas id="msort" width="400" height="500"></canvas>
<canvas id="hsort" width="400" height="500"></canvas>
<div id="status">Racing...</div>
<script>
const values = [];
for (let i = 60; i > 0; --i) values.push(i);
shuffle(values);
function shuffle(arr) {
for (let i = arr.length - 1; i > 0; i--) {
const j = Math.floor(Math.random() * (i + 1));
[arr[i], arr[j]] = [arr[j], arr[i]];
}
}
function drawBars(ctx, bars) {
const barWidth = ctx.canvas.width / bars.length;
ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);
for (let i = 0; i < bars.length; i++) {
ctx.fillStyle = 'black';
ctx.fillRect(i * barWidth, ctx.canvas.height -bars[i], barWidth, bars[i]);
}
}
function qsort(arr) { /* Quicksort code */ }
function msort(arr) { /* Mergesort code */ }
function hsort(arr) { /* Heapsort code */ }
const ctx1 = document.getElementById('qsort').getContext('2d');
const ctx2 = document.getElementById('msort').getContext('2d');
const ctx3 = document.getElementById('hsort').getContext('2d');
drawBars(ctx1, [...values]);
drawBars(ctx2, [...values]);
drawBars(ctx3, [...values]);
qs = async function() { let arr = structuredClone(values);
qsort(arr);
ctx1.fillText('DONE', ctx1.canvas.width / 4, ctx1.canvas.height/2);}
ms = async function() {let arr = structuredClone(values); msort(arr);
ctx2.fillText('DONE', ctx2.canvas.width / 4, ctx2.canvas.height / 2); }
hs =async function (){
let arr = structuredClone(values);hsort(arr);
ctx3.fillText('DONE', ctx3.canvas.width / 4, ctx3.canvas.height / 2);}
Promise.all([qs(), ms(), hs()]).then(() => {
document.getElementById('status').textContent = 'All done!';
});
</script>
</body>
</html>
```▶ R26 · Projectile ballistics71.7 sERRBLANK★ 1/10 Open round →
Show code
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Projectile Motion</title>
<style>
canvas { background: #f0f0f0; }
</style>
</head>
<body>
<canvas id="cannonCanvas" width="600" height="400"></canvas>
<script>
const ctx = document.getElementById('cannonCanvas').getContext('2d');
const g = 9.8;
const u = 50; // initial speed
let balls = [];
function start(){
balls = [];
const angles = [20,35,45,60,75];
for (let angle of angles) {
let radians = angle * Math.PI / 180;
balls.push({
x: u * Math.cos(radians),
y: -u * Math.sin(radians) + g,
theta: radians
});
}
}
function animate(){
ctx.clearRect(0,0,600,400);
for (let ball of balls){
if (ball.y > 350 || ball.x < -10){
continue; // Ball out of view.
}
ctx.beginPath();
ctx.arc(150 + ball.x, 387-ball.y, 2, 0, Math.PI * 6);
if (ball.opacity>0){
let alpha = ball.alpha/10;
let gradient = ctx.createRadialGradient(
150 + ball.x,
400 - ball.y,
8,
150 +ball.x, 387-ball.y,
2
);
graduate.addColorStop(1, 'rgba(0,0,255,'+alpha+')');
ctx.fillStyle=gradient;
}else{
ctx.fillStyle = "#FF0000";
}
ball.opacity --;
}ctx.fill();
ball.y += 14 *ball.alpha / 10;
}
function update(){
for (let ball of balls){
if(ball.x>300||ball.y>-350 ) continue; else{
ctx.font='bold 12pt Calibri';
ctx.fillText(Math.round((Math.sin(bx*Math.atan(.9487)+(Math.pow(-2*(b.ang/2), .0764)))))
+(Math.sqrt(ball.alpha/(15))-0.1) )) ;
}
for (let ball of balls){
ball.x += 0.33*ball.alpha;
}
}
function end(){
if(balls.every(b => b.y >= 387)) start(); // Ball landed.
requestAnimationFrame(end);
update();
}
start();
end();
</script>
</body>
</html>```▶ R27 · Double-pendulum chaos95.6 sERRBLANK★ 1/10 Open round →
Show code
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Double Pendulum Chaos</title>
<style>
body { margin: 0; overflow: hidden; display: flex; justify-content: center; align-items: center; height: 100vh; background: #f0f0f0; }
canvas { border: 1px solid black; }
</style>
</head>
<body>
<canvas id="pendulum" width="800" height="600"></canvas>
<script>
const canvas = document.getElementById('pendulum');
const ctx = canvas.getContext('2d');
let p1Theta1 = -Math.PI / 3, p1Theta2 = Math.PI / 4;
let p2Theta1 = -Math.PI / 3 + 0.001, p2Theta2 = Math.PI / 4;
const l1 = 200, l2 = 150, m1 = 10, m2 = 10;
const g = 9.81;
let x1, y1, x2, y2;
let vx1 = 0, vy1 = 0, vx2 = 0, vy2 = 0;
function reset() {
p1Theta1 = -Math.PI / 3; p1Theta2 = Math.PI / 4;
p2Theta1 = -Math.PI / 3 + 0.001; p2Theta2 = Math.PI / 4;
}
function drawPendulum(color, x1, y1, x2, y2) {
ctx.beginPath();
ctx.moveTo(l1 + l1 * Math.sin(p1Theta1), -l1 - l1 * Math.cos(p1Theta1));
ctx.lineTo(x1 + x1 * Math.sin(p1Theta1), y1 + y1 * Math.cos(p1Theta1));
color = 'rgba(' + (color === 'red' ? 255 : 0) + ', ' + (0) + ', ' + (color === 'blue' ? 255 : 0) +
',' + (Math.random()* .4+ .6) + ')';
ctx.strokeStyle = color;
ctx.lineWidth = 1.5;
ctx.stroke();
}
function stepPendulum(theta1, theta2, omega1, omega2, l1, g) {
omega1 -= (m2 * l2 * omega2 *
Math.sin(theta1 - theta2)
+ (m1 + m2) * g * l1 * Math.sin(theta1))
/((m1+l2) * l1);
omega2 += ((-m2 * l1 * omega1 *
Math.sin(theta1-theta2) +
(m1+m2)*g*Math.l1sin(theta1)))
/(-m1*m2 *g*l2*l2);
}
function animate() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
// double pendulum one
x1 = l1 * Math.sin(p1Theta1);
y1 = -l1 * Math.cos(p1Theta1);
//console.log(x,y)
x2 = (x1 + l2 * Math.sin(y1));
y2 = (-y1 + l2 * Math.cos(p1Thety1) );
// double pendulum two
stepPendulam(pend1Theta1, pend2Theta1
, 0, 0, l1, g ) );
animate();
}
window.requestAnimationFrame(animate);
</script>
</body>
</html>
```▶ R28 · Particle fountain79.1 sSTAT★ 3/10 Open round →
Show code
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Particle Fountain</title>
<style>
body { margin: 0; overflow: hidden; }
#controls { position: absolute; top: 10px; left: 10px; z-index: 1; }
canvas { display: block; }
</style>
</head>
<body>
<div id="controls">
Wind: <input type="range" id="wind" min="-5" max="5" step="0.1" value="0">
</div>
<canvas id="canvas"></canvas>
<script>
const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d');
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
const particles = [];
const windInput = document.getElementById('wind');
class Particle {
constructor(x, y) {
this.x = x;
this.y = y;
this.vx = (Math.random() - 0.5);
this.vy = -(2 + Math.random());
this.radius = 2;
}
update(Wind){
this.vx += Wind/100;
this.vy += 0.1;
this.x += this.vx;
this.y += this.vy;
if (this.y > canvas.height - this.radius) {
this.y = canvas.height - this.radius;
this.vy *= -0.6;
if (Math.abs(this.vy) < 0.1) {
this.respawn();
}
}
if (this.x < this.radius || this.x > canvas.width - this.radius) {
this.vx *= -1;
this.x = Math.min(Math.max(this.x, this.radius), canvas.width - this.radius);
}
}
draw() {
ctx.beginPath();
ctx.arc(this.x, this.y, this.radius, 0, Math.PI * 2);
ctx.fillStyle = 'white';
ctx.fill();
}
respawn() {
this.x = canvas.width / 2;
this.y = canvas.height - 10;
this.vx = (Math.random() - 0.5) * 2;
this.vy = -(2 + Math.random());
}
}
for (let i = 0; i < 200; i++) {
particles.push(new Particle(canvas.width / 2, canvas.height - 10));
}
function animate() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
const wind = parseFloat(windInput.value);
for (let particle of particles) {
particle.update(wind);
particle.draw();
}
requestAnimationFrame(animate);
}
requestAnimationFrame(animate);
</script>
</body>
</html>
```▶ R29 · Orbital mechanics83.1 sBLANK★ 1.5/10 Open round →
Show code
```html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Orbital Mechanics</title>
<style>
body { margin: 0; overflow: hidden; }
canvas { display: block; }
</style>
</head>
<body>
<canvas id="orchestral"></canvas>
<script>
let canvas = document.getElementById('orchestral');
let ctx = canvas.getContext('2d');
canvas.width = window.innerWidth;
canvas.height = window.innerHeight;
const G = 1e-3;
const bodies = [
{m: 100, x: canvas.width / 2, y: canvas.height / 2, vx: 0, vy: 0, trail: []},
{m: 1, x: 50, y: 180, vx: 3, vy: 4, trail: []},
{m: 1, x: 300, y: canvas.height / 2, vx: -2.2, vy: 0.6, trail: []},
{m: 5, x: 700, y: 150, vx: 0, vy: 4.8, trail: []},
{m: 3, x: canvas.width / 2 + 350, y: canvas.height - 50, vx: -6.9, vy: -2, trail: []}
];
function drawBody(body) {
ctx.beginPath();
ctx.arc(body.x, body.y, Math.sqrt(body.m), 0, 2 * Math.PI);
ctx.fillStyle = 'white';
ctx.fill();
if (body.trail.length > 100) body.trail.shift();
for (let i = 0; i < body.trail.length; i++) {
let point = body.trail[i];
ctx.beginPath();
ctx.arc(point.x, point.y, 2 * Math.sqrt(body.m), 0, 2 * Math.PI);
ctx.fillStyle = `rgba(255, 255, 255, ${1 - i / 50})`;
ctx.fill();
}
}
function draw() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
for (let body of bodies) {
drawBody(body);
}
for (let body of bodies.slice(1)) {
let fx = 0;
let fy = 0;
for (let other of bodies) {
if (body !== other) {
let dx = other.x - body.x;
let dy = other.y - body.y;
let r2 = dx * dx + dy * dy;
let force = G * other.m * body.m / r2;
fx += force * dx / Math.sqrt(r2);
fy += force * dy / Math.sqrt(r2);
}
}
body.vx += fx / body.m;
body.vy += fy / body.m;
body.x += body.vx;
body.y += body.vy;
body.trail.push({ x: body.x, y: body.y });
}
requestAnimationFrame(draw);
}
draw();
</script>
</body>
</html>
```▶ R30 · Spring-mass chain103.4 sSTATLIM★ 2/10 Open round →
Show code
```html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Spring-Mass Chain</title>
<style>
body { margin: 0; overflow: hidden; }
canvas { display: block; background-color: #f0f0f0; }
</style>
</head>
<body>
<canvas id="chainCanvas" width="800" height="400"></canvas>
<script>
const canvas = document.getElementById('chainCanvas');
const ctx = canvas.getContext('2d');
const numMasses = 12;
const masses = [];
const springs = [];
const springLength = 50;
const stiffness = 0.1;
const damping = 0.98;
for (let i = 0; i < numMasses; i++) {
masses.push({ x: i * springLength + 10, y: canvas.height / 2, vx: 0, vy: 0 });
}
for (let i = 0; i < numMasses - 1; i++) {
springs.push({ a: i, b: i + 1 });
}
let isDragging = false;
let draggedMassIndex;
canvas.addEventListener('mousedown', e => {
const mouseX = e.clientX;
const mouseY = e.clientY;
for (let i = 0; i < numMasses; i++) {
if (Math.hypot(mouseX - masses[i].x, mouseY - masses[i].y) < 15) {
isDragging = true;
draggedMassIndex = i;
break;
}
}
});
document.addEventListener('mouseup', () => {
isDragging = false;
});
canvas.addEventListener('mousemove', e => {
if (isDragging && draggedMassIndex !== undefined) {
masses[draggedMassIndex].x = e.clientX - canvas.getBoundingClientRect().left;
masses[draggedMassIndex].y = e.clientY - canvas.getBoundingClientRect().top;
}
});
function animate() {
for (let i = 0; i < numMasses - 1; i++) {
const a = masses[i];
const b = masses[i + 1];
const dx = b.x - a.x;
const dy = b.y - a.y;
const distance = Math.hypot(dx, dy);
if (distance > 0) {
const f = stiffness * (springLength - distance);
const theta = Math.atan2(dy, dx);
const fx = f * Math.cos(theta) * damping;
const fy = f * Math.sin(theta) * damping;
a.vx += fx / numMasses;
a.vy += fy / numMasses;
if (a !== masses[0] && a !== masses[numMasses - 1]) {
b.vx -= fx / numMasses;
b.vy -= fy / numMasses;
}
}
}
for (let i = 0; i < numMasses; i++) {
if (i !== 0 && i !== numMasses - 1) {
masses[i].x += masses[i].vx * damping;
masses[i].y += masses[i].vy * damping;
masses[i].vx *= damping;
masses[i].vy *= damping;
}
}
ctx.clearRect(0, 0, canvas.width, canvas.height);
for (let i = 0; i < springs.length; i++) {
const a = springs[i];
ctx.beginPath();
ctx.moveTo(masses[a.a].x, masses[a.a].y);
ctx.lineTo(masses[a.b].x, masses[a.b].y);
ctx.strokeStyle = 'black';
ctx.stroke();
}
for (let i = 0; i < numMasses; i++) {
const mass = masses[i];
ctx.beginPath();
ctx.arc(mass.x, mass.y, 15, 0, Math.PI * 2);
if (!isDragging || draggedMassIndex !== i) {
ctx.fillStyle = 'blue';
} else {
ctx.fillStyle = 'red';
}
ctx.fill();
}
requestAnimationFrame(animate);
}
animate();
</script>
</body>
</html>
```Answer excerpts above cover R6–R30. Blind rounds R31+ are only linked, not excerpted, to keep the blind-test experience intact for new visitors.