oneshotlm
Compare all models on this prompt →

Lorenz attractor · glm-4.7

Using the pre-provided three.min.js (global THREE), visualize the Lorenz attractor as a glowing 3D butterfly trajectory that draws over time, with orbit-drag camera controls.

⛨ sandboxed Open in new tab ↗
transcript · 4 messages
user

Using the pre-provided three.min.js (global THREE), visualize the Lorenz attractor as a glowing 3D butterfly trajectory that draws over time, with orbit-drag camera controls.

assistant
thinking
The user wants me to create a single-page web app that visualizes the Lorenz attractor as a glowing 3D butterfly trajectory. The key requirements are:

1. Use the pre-provided three.min.js (global THREE)
2. Visualize the Lorenz attractor
3. Make it a glowing 3D butterfly trajectory
4. Draw over time (animated)
5. Orbit-drag camera controls (orbit controls)
6. Everything in a single index.html file
7. No external resources, CDNs, or network requests
8. CSS in <style> tag, JS in <script> tag

The Lorenz attractor is defined by these differential equations:
dx/dt = σ(y - x)
dy/dt = x(ρ - z) - y
dz/dt = xy - βz

Common parameters are:
σ = 10
ρ = 28
β = 8/3

I'll need to:
1. Set up a Three.js scene with a dark background
2. Create points/lines for the trajectory
3. Use a glowing effect (maybe with additive blending and point colors)
4. Animate the drawing over time
5. Add orbit controls for camera interaction (but since we can't use external resources, I'll need to implement basic orbit controls manually)

Let me create this file.

I'll create a single-page web app that visualizes the Lorenz attractor as a glowing 3D butterfly trajectory with animated drawing and orbit-drag camera controls.

write /workspace/index.html (18886 bytes)
toolResult

Successfully wrote 18886 bytes to /workspace/index.html

assistant
thinking
I've created a single-page web app that visualizes the Lorenz attractor as a glowing 3D butterfly trajectory. Let me summarize what I built:

1. A Three.js scene with a dark background and fog for depth
2. The Lorenz attractor implemented with the classic parameters (σ=10, ρ=28, β=8/3)
3. A multi-layered glow effect using:
   - A line with additive blending for the main trajectory
   - A points mesh with additive blending for the glowing dots
   - A glow mesh with larger, more transparent points for the outer glow
   - A bright "head" sphere with a point light that follows the current point
4. Color gradient based on position and time (hue cycling)
5. Custom orbit controls implementation (since we can't use external resources) that supports:
   - Mouse drag to rotate
   - Scroll wheel to zoom
   - Touch support for mobile
   - Auto-rotation when not dragging
6. UI elements showing point count and time step
7. Instructions for user interaction
8. Responsive design with window resize handling

The trajectory draws over time, creating the classic butterfly shape of the Lorenz attractor, with a beautiful glowing effect that makes it look like it's emitting light.

I've created a single-page web app that visualizes the Lorenz attractor as a glowing 3D butterfly trajectory. Here's what's included: **Features:** - **Lorenz Attractor**: Classic chaotic system with parameters σ=10, ρ=28, β=8/3 - **Glowing Trajectory**: Multi-layered glow effect with: - Main line with additive blending - Glowing points mesh - Outer glow layer - Bright "head" with point light following the current position - **Dynamic Colors**: Hue-cycling gradient based on position and time - **Orbit Controls**: Custom implementation supporting: - Drag to rotate - Scroll wheel to zoom - Touch support for mobile - Auto-rotation when idle - **Real-time Stats**: Shows point count and time step - **Responsive**: Handles window resize The attractor draws over time, creating the iconic butterfly shape with beautiful neon-like glow effects. The trajectory never exactly repeats, demonstrating the chaotic nature of the system.

TAKE IT TO CODE

A single self-contained HTML file — copy it and open in any browser, or reuse the prompt with your own pi-agent run.

RUN

modelglm-4.7
vendorZ.ai · GLM
harnesspi-agent
generated2026-07-22

EVALUATION

4/5 working

Glowing Lorenz attractor trajectory draws over time with vivid colors; wheel/keys zoom/rotate camera effectively.

Vision grade · anthropic/claude-sonnet-5

MEASUREMENTS

Raw readings from the capture, not a verdict — the grade above is the only judgement. Percentages are how much of the screen changed; the measure under-reports sparse motion on a dark background.

idle motion3.7%
on click2.9%
on wheel26.1%
on enter + space24.5%
on w/a/s/d39.0%
frame spread88.3 / 255
console errors0
js errors none

METRICS

runtime215.6s
tokens in5.0k
tokens out4.6k
cached2.2k
cost / run$0.0103