function generateParticlePhysics (ctx, size, color) {
  const centerX = size / 2
  const centerY = size / 2
  const particleCount = 20 + Math.floor(Math.random() * 20)
  const maxRadius = size * 0.4

  ctx.strokeStyle = color
  ctx.lineWidth = 1

  // Create a simulated particle collision
  for (let i = 0; i < particleCount; i++) {
    // Start from center
    const angle = Math.random() * Math.PI * 2
    const speed = 2 + Math.random() * 4
    let x = centerX
    let y = centerY
    let vx = Math.cos(angle) * speed
    let vy = Math.sin(angle) * speed

    // Add some curvature for charged particles
    const charge = (Math.random() - 0.5) * 0.2

    ctx.beginPath()
    ctx.moveTo(x, y)

    // Trace the particle path
    for (let step = 0; step < 100; step++) {
      // Update velocity (magnetic field effect)
      const perpX = -vy
      const perpY = vx
      vx += perpX * charge
      vy += perpY * charge

      // Normalize velocity
      const speed = Math.sqrt(vx * vx + vy * vy)
      vx = vx / speed * 3
      vy = vy / speed * 3

      // Update position
      x += vx
      y += vy

      // Random scattering or decay
      if (Math.random() < 0.05) {
        vx += (Math.random() - 0.5) * 2
        vy += (Math.random() - 0.5) * 2
      }

      ctx.lineTo(x, y)

      // Stop if went too far
      if (Math.sqrt((x - centerX) ** 2 + (y - centerY) ** 2) > maxRadius) {
        break
      }
    }

    ctx.stroke()
  }
}
Generates a particle physics pattern with collision tracks