"Bringing nanoscale physics to the macro screen."
| Key | Value |
|---|---|
| Name | Virtual Lab: Semiconductor Physics |
| Version | 1.0.0 |
| Status | π’ Active |
| Type | Educational 3D Simulation Web App |
| URL | GitHub Repository |
| Primary Stack | React, Three.js (R3F), Chart.js |
| License | MIT |
| Author | Prithish Misra |
Understanding semiconductor physics requires more than just reading equations on a chalkboard. This Virtual Lab leverages web-based 3D rendering (React Three Fiber) to simulate subatomic particle behaviors, band gaps, and electrical properties in real-time, coupled with interactive charting.
| User Type | Use Case |
|---|---|
| Physics Students | Visualize abstract concepts like electron drift and P-N junctions. |
| Educators | Demonstrate real-time variations in semiconductor doping levels. |
| WebGL Developers | Study how to integrate Three.js physics with React state. |
β Before:
Trying to understand semiconductor doping by staring at static 2D textbook diagrams and struggling to map math to physical reality.
β
After:
An interactive 3D laboratory where tweaking temperature or doping concentration instantly updates particle animations and live charts.To democratize advanced physics education by providing a zero-installation, highly performant, browser-based simulation environment.
| Principle | Application |
|---|---|
| Visual Immersiveness | Leveraging @react-three/fiber for smooth 60FPS WebGL rendering. |
| Data-Driven Feedback | Syncing 3D interactions with 2D graphs using Chart.js. |
| Performant Architecture | Vite guarantees ultra-fast load times even with heavy 3D assets. |
| Feature | Description | Status |
|---|---|---|
| 3D Lattice Viewer | Rotate and zoom into atomic crystal structures. | π’ Active |
| Real-time Charts | Voltage/Current (V-I) characteristic plotting. | π’ Active |
| Parameter Controls | Adjust Temperature, Doping, and Voltage interactively. | π’ Active |
| P-N Junction Sim | Visualizing depletion region width changes. | π‘ In Progress |
flowchart TD
A[User Adjusts Slider e.g. Voltage] --> B[React State Updates]
B --> C{Parallel Execution}
C -->|Update Physics| D[R3F Canvas Re-renders Particles]
C -->|Update Data| E[Chart.js Re-draws V-I Curve]
D --> F[Visual Feedback to User]
E --> F
graph TB
subgraph UI Control Layer
Sliders[React Controls/Sliders]
Dash[Tailwind Dashboard]
end
subgraph Data Layer
State[Zustand/React Context]
Charts[Chart.js Canvas]
end
subgraph 3D Rendering Engine
R3F[React Three Fiber]
Drei[R3F Drei Helpers]
Three[Three.js Core]
end
Sliders -- Updates --> State
State -- Triggers --> Charts
State -- Drives Animation --> R3F
R3F -- Wraps --> Three
| Layer | Technology | Purpose |
|---|---|---|
| Frontend Framework | React 19, Vite | Core application shell and build tool. |
| 3D Graphics | Three.js, React Three Fiber | WebGL rendering and declarative 3D. |
| Data Visualization | Chart.js, react-chartjs-2 | Live graph plotting for simulation results. |
| Styling | TailwindCSS | Rapid, utility-first UI design for control panels. |
-
Clone the repository:
git clone https://github.com/prithishmisra23/Virtual-Lab-Semiconductor-.git cd Virtual-Lab-Semiconductor- -
Install dependencies:
npm install
-
Start the Development Server:
npm run dev
The app will be available at
http://localhost:5173(or similar). -
Build for Production:
npm run build
gitGraph
commit id: "init"
branch 3d-engine
checkout 3d-engine
commit id: "setup r3f canvas"
commit id: "add lattice models"
checkout main
merge 3d-engine
branch ui-controls
checkout ui-controls
commit id: "tailwind dashboard"
commit id: "chart.js integration"
checkout main
merge ui-controls
commit id: "docs: add premium readme"