Export Code

Electrical Circuit

Nita

Last edited Apr 10, 2025
Created on Apr 10, 2025
Forked from 3D Cube of Spheres

Electrical Circuit Simulation

An interactive 3D electrical circuit simulation built with Three.js.

Features

  • Interactive circuit with battery, resistor, and LED
  • Real-time calculation of voltage, current, and power
  • Electron flow animation that responds to circuit parameters
  • Toggle power on/off to see the circuit in action
  • Switch between circuit view and 3D perspective view
  • Adjust voltage and resistance to see how the circuit responds

How to Use

  1. Use the sliders to adjust voltage (0-12V) and resistance (10-1000Ω)
  2. Toggle the power button to turn the circuit on or off
  3. Switch between circuit view and 3D view for different perspectives
  4. Observe how the electron flow and LED brightness respond to changes

Technical Implementation

The simulation uses Three.js to create a realistic 3D representation of an electrical circuit. It demonstrates Ohm's Law (V = IR) and power calculations (P = VI) in an interactive environment.

MIT Licensed