oneshotlm
Compare all models on this prompt →

L-system tree · qwen3-coder-flash

Using the pre-provided p5.min.js (global p5), grow a procedural L-system fractal tree that branches recursively and sways gently in the wind.

⚠ no runnable output

This one-shot run produced no runnable artifact.

agent produced no index.html

The transcript below shows what the model did — read it to see why the one shot fell short.

transcript · 2 messages
user

Using the pre-provided p5.min.js (global p5), grow a procedural L-system fractal tree that branches recursively and sways gently in the wind.

assistant

```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Procedural L-System Fractal Tree</title> <script src="p5.min.js"></script> <style> body { margin: 0; padding: 0; overflow: hidden; background: linear-gradient(to bottom, #1a2980, #26d0ce); display: flex; justify-content: center; align-items: center; height: 100vh; font-family: 'Arial', sans-serif; } canvas { display: block; box-shadow: 0 0 20px rgba(0, 0, 0, 0.3); border-radius: 4px; } .info { position: absolute; bottom: 20px; left: 0; width: 100%; text-align: center; color: white; text-shadow: 0 0 5px rgba(0, 0, 0, 0.5); font-size: 14px; } </style> </head> <body> <div class="info">L-System Fractal Tree | Click to change parameters</div> <script> // L-System parameters let axiom = "F"; let rules = { "F": "FF+[+F-F-F]-[-F+F+F]" }; let angle = 25; let distance = 10; let iterations = 4; let windStrength = 0.02; let swayAngle = 0; let swayDirection = 1; // Tree properties let treeColor = [34, 139, 34]; let branchColor = [101, 67, 33]; let leavesColor = [34, 139, 34]; let leafSize = 3; // System state let sentence = axiom; let stack = []; let time = 0; function setup() { const canvas = createCanvas(windowWidth * 0.9, windowHeight * 0.8); canvas.parent('body'); background(255); generate(); } function draw() { background(255, 255, 255, 30); // Semi-transparent background for trail effect // Update wind sway swayAngle += windStrength * swayDirection; if (abs(swayAngle) > 0.3) { swayDirection *= -1; } time += 0.01; translate(width / 2, height); rotate(-PI / 2); // Draw the tree drawTree(); // Draw info fill(255); noStroke(); textSize(16); textAlign(CENTER); text("L-System Fractal Tree", width/2, 30); } function generate() { let nextSentence = ""; for (let i = 0; i < sentence.length; i++) { let currentChar = sentence.charAt(i); if (rules[currentChar]) { nextSentence += rules[currentChar]; } else { nextSentence += currentChar; } } sentence = nextSentence; } function drawTree() { // Reset the drawing state resetMatrix(); translate(width / 2, height); rotate(-PI / 2); // Draw the tree based on the current sentence for (let i = 0; i < sentence.length; i++) { let currentChar = sentence.charAt(i); switch(currentChar) { case "F": // Draw a branch with sway effect push(); strokeWeight(1); stroke(branchColor[0], branchColor[1], branchColor[2]); // Apply sway to the branch let sway = sin(time + i * 0.1) * swayAngle; rotate(sway); line(0, 0, 0, -distance); translate(0, -distance); // Add leaves at the end of branches if (i % 7 === 0 && i > 10) { fill(leavesColor[0], leavesColor[1], leavesColor[2]); noStroke(); ellipse(0, 0, leafSize, leafSize); } pop(); break; case "+": // Turn right rotate(radians(angle)); break; case "-": // Turn left rotate(radians(-angle)); break; case "[": // Save state push(); stack.push({ x: 0, y: 0, angle: rotation, scale: 1 }); break; case "]": // Restore state pop(); break; } } } function mousePressed() { // Change parameters on click angle = random(15, 45); distance = random(5, 15); iterations = floor(random(3, 6)); windStrength = random(0.01, 0.05); treeColor = [random(20, 100), random(80, 150), random(20, 100)]; branchColor = [random(80, 120), random(50, 90), random(20, 60)]; leavesColor = [random(30, 80), random(150, 200), random(30, 80)]; // Regenerate the tree sentence = axiom; for (let i = 0; i < iterations; i++) { generate(); } } function windowResized() { resizeCanvas(windowWidth * 0.9, windowHeight * 0.8); } </script> </body> </html> ```

TAKE IT TO CODE

This run produced no artifact — reuse the prompt with a different model or your own pi-agent run.

RUN

modelqwen3-coder-flash
vendorQwen
harnesspi-agent
generated2026-08-01

METRICS

runtime15.2s
tokens in1.2k
tokens out1.4k
cached512
cost / run$0.0016