Spaces:
Running
Running
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,114 +1,116 @@
|
|
| 1 |
-
---
|
| 2 |
-
title: Electron Cloud Visualizer
|
| 3 |
-
emoji: ⚛️
|
| 4 |
-
colorFrom: blue
|
| 5 |
-
colorTo: purple
|
| 6 |
-
sdk: static
|
| 7 |
-
pinned: false
|
| 8 |
-
license: mit
|
| 9 |
-
---
|
| 10 |
-
|
| 11 |
-
# Electron Cloud Visualizer
|
| 12 |
-
|
| 13 |
-
An interactive 3D visualization tool for exploring atomic electron orbitals and electron clouds using quantum mechanics principles.
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
- **
|
| 22 |
-
- **
|
| 23 |
-
- **
|
| 24 |
-
- **
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
-
|
| 28 |
-
-
|
| 29 |
-
-
|
| 30 |
-
-
|
| 31 |
-
-
|
| 32 |
-
-
|
| 33 |
-
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
-
|
| 49 |
-
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
##
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
-
|
| 58 |
-
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
- **
|
| 65 |
-
- **
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
├──
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
│ ├──
|
| 77 |
-
│ ├──
|
| 78 |
-
│ ├──
|
| 79 |
-
│ ├──
|
| 80 |
-
│ ├──
|
| 81 |
-
│ ├──
|
| 82 |
-
│
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
-
|
| 92 |
-
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
-
|
| 99 |
-
-
|
| 100 |
-
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
-
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Electron Cloud Visualizer
|
| 3 |
+
emoji: ⚛️
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: purple
|
| 6 |
+
sdk: static
|
| 7 |
+
pinned: false
|
| 8 |
+
license: mit
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# Electron Cloud Visualizer
|
| 12 |
+
|
| 13 |
+
An interactive 3D visualization tool for exploring atomic electron orbitals and electron clouds using quantum mechanics principles.
|
| 14 |
+
|
| 15 |
+
Introduction Video: https://youtu.be/lwqq6FTS6bQ
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
|
| 19 |
+
## Features
|
| 20 |
+
|
| 21 |
+
- **Interactive 3D Visualization**: Explore electron orbitals in real-time with mouse controls
|
| 22 |
+
- **All Elements**: Visualize electron configurations for all 118 elements
|
| 23 |
+
- **Individual Orbital Control**: Toggle visibility and customize colors for each orbital (s, p, d, f)
|
| 24 |
+
- **Quantum Mechanics Accurate**: Uses real wave functions and CDF sampling for accurate probability distributions
|
| 25 |
+
- **Progressive Loading**: Smooth rendering with progressive particle generation
|
| 26 |
+
- **Advanced Controls**:
|
| 27 |
+
- Particle count adjustment (5,000 - 1,000,000 particles)
|
| 28 |
+
- Particle size and opacity controls
|
| 29 |
+
- Atom scaling
|
| 30 |
+
- Animation with adjustable speed
|
| 31 |
+
- Color hue gradient with adjustable intensity
|
| 32 |
+
- Multi-axis clipping planes for cross-sectional views
|
| 33 |
+
- Coordinate axes display
|
| 34 |
+
- Auto-rotation with axis selection
|
| 35 |
+
- Individual orbital color customization
|
| 36 |
+
|
| 37 |
+
## Demo
|
| 38 |
+
|
| 39 |
+
Open `index.html` in a modern web browser to start exploring electron orbitals.
|
| 40 |
+
|
| 41 |
+
## Usage
|
| 42 |
+
|
| 43 |
+
1. **Select an Element**: Use the "Atomic Number" slider and click "Update Element"
|
| 44 |
+
2. **Choose Orbitals**: Expand orbital shells in the "Orbital Selection" panel to show/hide specific orbitals
|
| 45 |
+
3. **Customize Colors**: Click on color folders to customize individual orbital colors
|
| 46 |
+
4. **Adjust Display**: Modify particle count, size, opacity, and scale in "Display Options"
|
| 47 |
+
5. **Camera Controls**:
|
| 48 |
+
- Left mouse: Rotate view
|
| 49 |
+
- Right mouse: Pan
|
| 50 |
+
- Scroll: Zoom
|
| 51 |
+
- Use "Auto Rotate" for automatic rotation
|
| 52 |
+
|
| 53 |
+
## Technical Details
|
| 54 |
+
|
| 55 |
+
### Quantum Mechanics Implementation
|
| 56 |
+
|
| 57 |
+
- Uses hydrogen-like wave functions with Z=1 for accurate orbital shapes
|
| 58 |
+
- Implements real spherical harmonics for proper orbital orientation
|
| 59 |
+
- CDF (Cumulative Distribution Function) sampling for probability-based particle distribution
|
| 60 |
+
- Radial probability function: r² × |R(n,l,r)|²
|
| 61 |
+
|
| 62 |
+
### Technology Stack
|
| 63 |
+
|
| 64 |
+
- **Three.js r128**: 3D rendering and visualization
|
| 65 |
+
- **lil-gui**: User interface controls
|
| 66 |
+
- **Vanilla JavaScript**: No build tools required
|
| 67 |
+
- **WebGL**: Hardware-accelerated graphics
|
| 68 |
+
|
| 69 |
+
### Project Structure
|
| 70 |
+
|
| 71 |
+
```
|
| 72 |
+
electron-cloud-visualizer/
|
| 73 |
+
├── index.html # Main HTML file
|
| 74 |
+
├── styles.css # Styling
|
| 75 |
+
├── js/
|
| 76 |
+
│ ├── constants.js # Physical and mathematical constants
|
| 77 |
+
│ ├── math-utils.js # Mathematical utilities and spherical harmonics
|
| 78 |
+
│ ├── quantum-mechanics.js # Wave function calculations
|
| 79 |
+
│ ├── particle-sampler.js # CDF-based particle generation
|
| 80 |
+
│ ├── electron-configuration.js # Electron configuration system
|
| 81 |
+
│ ├── visualization-renderer.js # Three.js rendering
|
| 82 |
+
│ ├── gui-controller.js # User interface controls
|
| 83 |
+
│ ├── app-controller.js # Application coordination
|
| 84 |
+
│ └── main.js # Entry point
|
| 85 |
+
└── README.md
|
| 86 |
+
```
|
| 87 |
+
|
| 88 |
+
## Browser Compatibility
|
| 89 |
+
|
| 90 |
+
Requires a modern browser with WebGL support:
|
| 91 |
+
- Chrome 90+
|
| 92 |
+
- Firefox 88+
|
| 93 |
+
- Safari 14+
|
| 94 |
+
- Edge 90+
|
| 95 |
+
|
| 96 |
+
## Performance
|
| 97 |
+
|
| 98 |
+
- Default particle count: 100,000
|
| 99 |
+
- Maximum particle count: 1,000,000
|
| 100 |
+
- GPU acceleration via WebGL
|
| 101 |
+
- Progressive loading for smooth user experience
|
| 102 |
+
- Optimized for high atomic numbers
|
| 103 |
+
|
| 104 |
+
## Credits
|
| 105 |
+
|
| 106 |
+
Created by **Andy Kong**
|
| 107 |
+
|
| 108 |
+
## License
|
| 109 |
+
|
| 110 |
+
MIT License - See LICENSE file for details
|
| 111 |
+
|
| 112 |
+
## Acknowledgments
|
| 113 |
+
|
| 114 |
+
- Inspired by [Kavan Ghaderpour's Atom Visualizer](https://www.kavang.com/atom)
|
| 115 |
+
- Quantum mechanics principles from standard atomic physics textbooks
|
| 116 |
+
- Three.js community for excellent 3D rendering library
|