An interactive 3D visualization project featuring WebGL-powered fractal and particle simulations
Demo • Features • Screenshots • Technologies • Getting Started • Structure
WebGL Cosmic Visualizations offers high-performance 3D fractal and particle simulations rendered entirely in the browser. The project leverages GPU-accelerated rendering through WebGL and custom GLSL shaders to create mesmerizing cosmic landscapes and particle systems that respond to user interaction in real time.
|
Interactive 3D fractal visualization with ray-marching techniques
|
Fluid particle simulation with curl noise for beautiful cosmic effects
|
|
|
|
The framework consists of four integrated modules that work together to improve factual consistency:
The project includes several optimizations to maintain high frame rates:
- Adaptive quality scaling based on device performance
- Temporal anti-aliasing for smoother visuals
- Level-of-detail rendering for complex fractals
- Frustum culling for particle systems
- Instanced rendering for particle visualization
- Texture-based lookup tables for complex calculations
- Modern web browser with WebGL 2.0 support
- Local development server (Python's built-in server, Node.js http-server, etc.)
-
Clone the repository:
git clone https://github.com/your-github-username/webgl-cosmic-visualizations.git
-
Navigate to the project directory:
cd webgl-cosmic-visualizations -
Start a local server:
# Using Python (Python 3) python -m http.server # OR using Node.js http-server (if installed) http-server
-
Open your browser and visit:
http://localhost:8000
Mandelbulb Controls
- Left Mouse Button + Drag: Rotate camera
- Right Mouse Button + Drag: Pan camera
- Mouse Wheel: Zoom in/out
- R Key: Reset view
- Q/E Keys: Increase/decrease fractal power
- +/- Keys: Adjust iteration count
- Space: Toggle auto-rotation
Particle System Controls
- Mouse Movement: Influence particle flow
- Left Click: Create attraction point
- Right Click: Create repulsion point
- Mouse Wheel: Adjust force strength
- 1-4 Keys: Select different presets
- R Key: Reset simulation
- P Key: Pause/resume simulation
webgl-cosmic-visualizations/
├── index.html # Landing page
├── src/
│ ├── js/
│ │ ├── mandelbulb.js # Mandelbulb fractal implementation
│ │ ├── cosmicParticles.js # Particle system implementation
│ │ ├── math/ # Math utility functions
│ │ │ ├── matrix.js # Matrix operations
│ │ │ └── noise.js # Noise functions
│ │ └── common.js # Shared functionality
│ ├── css/
│ │ └── styles.css # Application styles
│ └── shaders/
│ ├── mandelbulb/ # Mandelbulb shaders
│ │ ├── vertex.glsl # Vertex shader
│ │ └── fragment.glsl # Fragment shader with ray-marching
│ └── particles/ # Particle system shaders
│ ├── compute.glsl # Particle physics computation
│ ├── vertex.glsl # Particle rendering vertex shader
│ └── fragment.glsl # Particle rendering fragment shader
├── assets/
│ ├── icons/ # UI icons
│ └── fonts/ # Custom fonts
└── pages/
├── mandelbulb.html # Mandelbulb Explorer page
└── cosmic-particles.html # Cosmic Particles page
| Browser | Supported Versions | Notes |
|---|---|---|
| Chrome | 90+ | Full functionality, best performance |
| Firefox | 88+ | Full functionality |
| Safari | 14+ | May have performance limitations on some effects |
| Edge | 90+ | Full functionality |
Planned features for upcoming releases:
- Additional fractal types (Julia sets, Menger sponge)
- VR support for immersive exploration
- Export functionality for high-resolution renders
- Audio reactivity for visualizations
- Additional particle presets and behaviors
- Custom shader editor for experimentation
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by various WebGL demos and fractal mathematics
- Special thanks to the WebGL and GLSL community for resources and tutorials
- Fractal formulations based on research by Daniel White and Paul Nylander
- Curl noise implementation inspired by Robert Bridson's paper on fluid simulation
