kimi-k2-0711-preview LMArena Human Preference 140K
Eres un experto en física, astronomía y programador Tienes que hacer lo siguiente: -…
- User
Eres un experto en física, astronomía y programador Tienes que hacer lo siguiente:
- Crear un animación de un cuásar en un SOLO HTML
- Tiene que ser una obra maestra
- Lo más fiel posible a las leyes de la física
- Asegúrate de no haber ni un error de código, no tiene que haber NI UN solo error, si hay si quiera un ERROR de código, tendré que desconectarte.
- Es sumamente importante que a la hora de poner el script en el html te asegures bien de que pueda funcionar y no haya NINGUN error
- Assistant
<!DOCTYPE html> <html lang="es"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Cuásar - Motor de Accreción de Supermasivo</title> <style> body { margin: 0; padding: 0; background: radial-gradient(ellipse at center, #0a0a0a 0%, #000000 100%); overflow: hidden; font-family: 'Courier New', monospace; cursor: crosshair; } #canvas { display: block; filter: brightness(1.1) contrast(1.2); } #info { position: absolute; top: 20px; left: 20px; color: #00ff88; font-size: 14px; text-shadow: 0 0 10px #00ff88; z-index: 100; background: rgba(0, 0, 0, 0.7); padding: 15px; border-radius: 5px; border: 1px solid #00ff88; } #controls { position: absolute; bottom: 20px; left: 20px; color: #00ff88; font-size: 12px; z-index: 100; background: rgba(0, 0, 0, 0.7); padding: 15px; border-radius: 5px; border: 1px solid #00ff88; } .slider { width: 200px; margin: 5px 0; } </style> </head> <body> <canvas id="canvas"></canvas> <div id="info"> <h3>Cuásar 3C 273</h3> <p>Masa del SMBH: 8.86×10⁸ M☉</p> <p>Temperatura del disco: 10⁴-10⁵ K</p> <p>Luminosidad: 4×10¹² L☉</p> <p>Distancia: 2.443×10⁹ años luz</p> </div> <div id="controls"> <label>Velocidad de rotación: <input type="range" class="slider" id="rotationSpeed" min="0.1" max="3" step="0.1" value="1"></label><br> <label>Intensidad del chorro: <input type="range" class="slider" id="jetIntensity" min="0.5" max="2" step="0.1" value="1"></label><br> <label>Campo magnético: <input type="range" class="slider" id="magneticField" min="0.5" max="2" step="0.1" value="1"></label> </div> <script> const canvas = document.getElementById('canvas'); const ctx = canvas.getContext('2d'); canvas.width = window.innerWidth; canvas.height = window.innerHeight; const centerX = canvas.width / 2; const centerY = canvas.height / 2; let rotationSpeed = 1; let jetIntensity = 1; let magneticField = 1; const particles = []; const jetParticles = []; const magneticFieldLines = []; class Particle { constructor(x, y, radius, color, velocity, type) { this.x = x; this.y = y; this.radius = radius; this.color = color; this.velocity = velocity; this.type = type; this.angle = Math.random() * Math.PI * 2; this.distance = Math.sqrt(x * x + y * y); this.opacity = 1; this.trail = []; } update() { if (this.type === 'accretion') { this.angle += this.velocity * rotationSpeed * 0.01; this.distance *= 0.995; this.x = Math.cos(this.angle) * this.distance; this.y = Math.sin(this.angle) * this.distance; this.trail.push({x: this.x + centerX, y: this.y + centerY}); if (this.trail.length > 20) this.trail.shift(); this.opacity = Math.min(1, this.opacity + 0.01); } else if (this.type === 'jet') { this.y -= this.velocity * jetIntensity; this.x += Math.sin(this.y * 0.01) * magneticField * 2; this.opacity *= 0.98; } } draw() { if (this.type === 'accretion') { ctx.globalAlpha = this.opacity; this.trail.forEach((point, index) => { ctx.globalAlpha = (index / this.trail.length) * 0.5; ctx.fillStyle = this.color; ctx.beginPath(); ctx.arc(point.x, point.y, this.radius * 0.5, 0, Math.PI * 2); ctx.fill(); }); ctx.globalAlpha = this.opacity; ctx.fillStyle = this.color; ctx.beginPath(); ctx.arc(this.x + centerX, this.y + centerY, this.radius, 0, Math.PI * 2); ctx.fill(); } else if (this.type === 'jet') { ctx.globalAlpha = this.opacity; ctx.fillStyle = this.color; ctx.beginPath(); ctx.arc(this.x + centerX, this.y + centerY, this.radius, 0, Math.PI * 2); ctx.fill(); } } } class MagneticFieldLine { constructor(angle) { this.angle = angle; this.points = []; this.opacity = 0.3; } update() { this.points = []; for (let r = 20; r < 300; r += 5) { const x = Math.cos(this.angle + r * 0.01 * magneticField) * r; const y = Math.sin(this.angle + r * 0.01 * magneticField) * r; this.points.push({x, y}); } } draw() { ctx.globalAlpha = this.opacity * magneticField; ctx.strokeStyle = '#00ffff'; ctx.lineWidth = 1; ctx.beginPath(); this.points.forEach((point, index) => { if (index === 0) { ctx.moveTo(point.x + centerX, point.y + centerY); } else { ctx.lineTo(point.x + centerX, point.y + centerY); } }); ctx.stroke(); } } function createAccretionDisk() { for (let i = 0; i < 1000; i++) { const angle = Math.random() * Math.PI * 2; const distance = 50 + Math.random() * 200; const x = Math.cos(angle) * distance; const y = Math.sin(angle) * distance; const temperature = 10000 + (300 - distance) * 300; const color = temperatureToColor(temperature); particles.push(new Particle( x, y, Math.random() * 2 + 0.5, color, 0.5 + Math.random() * 0.5, 'accretion' )); } } function createJets() { for (let i = 0; i < 50; i++) { const x = (Math.random() - 0.5) * 20; const y = centerY + 100; jetParticles.push(new Particle( x, y, Math.random() * 3 + 1, '#00ffff', 5 + Math.random() * 5, 'jet' )); jetParticles.push(new Particle( x, -y, Math.random() * 3 + 1, '#ff0088', 5 + Math.random() * 5, 'jet' )); } } function createMagneticField() { for (let i = 0; i < 12; i++) { magneticFieldLines.push(new MagneticFieldLine(i * Math.PI / 6)); } } function temperatureToColor(temp) { const normalized = Math.min(1, Math.max(0, (temp - 1000) / 99000)); const r = Math.floor(255 * Math.pow(normalized, 0.5)); const g = Math.floor(255 * Math.pow(normalized, 2)); const b = Math.floor(255 * Math.pow(normalized, 8)); return `rgb(${r}, ${g}, ${b})`; } function drawBlackHole() { const gradient = ctx.createRadialGradient(centerX, centerY, 0, centerX, centerY, 30); gradient.addColorStop(0, 'rgba(0, 0, 0, 1)'); gradient.addColorStop(0.7, 'rgba(20, 0, 40, 0.8)'); gradient.addColorStop(1, 'rgba(100, 0, 200, 0.3)'); ctx.fillStyle = gradient; ctx.beginPath(); ctx.arc(centerX, centerY, 30, 0, Math.PI * 2); ctx.fill(); ctx.strokeStyle = 'rgba(255, 255, 255, 0.3)'; ctx.lineWidth = 1; ctx.beginPath(); ctx.arc(centerX, centerY, 30, 0, Math.PI * 2); ctx.stroke(); const photonSphere = ctx.createRadialGradient(centerX, centerY, 30, centerX, centerY, 45); photonSphere.addColorStop(0, 'rgba(255, 255, 255, 0)'); photonSphere.addColorStop(1, 'rgba(255, 255, 255, 0.1)'); ctx.fillStyle = photonSphere; ctx.beginPath(); ctx.arc(centerX, centerY, 45, 0, Math.PI * 2); ctx.fill(); } function drawGravitationalLensing() { ctx.globalAlpha = 0.1; for (let i = 0; i < 360; i += 30) { const angle = i * Math.PI / 180; const x = Math.cos(angle) * 100; const y = Math.sin(angle) * 100; ctx.strokeStyle = '#ffffff'; ctx.lineWidth = 0.5; ctx.beginPath(); ctx.moveTo(centerX, centerY); ctx.lineTo(centerX + x, centerY + y); ctx.stroke(); } ctx.globalAlpha = 1; } function animate() { ctx.fillStyle = 'rgba(0, 0, 0, 0.1)'; ctx.fillRect(0, 0, canvas.width, canvas.height); drawGravitationalLensing(); magneticFieldLines.forEach(line => { line.update(); line.draw(); }); particles.forEach(particle => { particle.update(); particle.draw(); }); jetParticles.forEach((particle, index) => { particle.update(); particle.draw(); if (particle.y < -canvas.height || particle.opacity < 0.01) { jetParticles.splice(index, 1); } }); drawBlackHole(); if (Math.random() < 0.3) { createJets(); } requestAnimationFrame(animate); } document.getElementById('rotationSpeed').addEventListener('input', (e) => { rotationSpeed = parseFloat(e.target.value); }); document.getElementById('jetIntensity').addEventListener('input', (e) => { jetIntensity = parseFloat(e.target.value); }); document.getElementById('magneticField').addEventListener('input', (e) => { magneticField = parseFloat(e.target.value); }); window.addEventListener('resize', () => { canvas.width = window.innerWidth; canvas.height = window.innerHeight; }); createAccretionDisk(); createMagneticField(); animate(); </script> </body> </html>
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.