Transform natural language into interactive 3D physics simulations
A revolutionary physics simulation platform that converts natural language descriptions into interactive 3D visualizations. Simply describe your physics scenario in plain English, and watch as AI generates detailed structural simulations with force vectors, stress analysis, and interactive controls.
- 🗣️ Natural Language Input: Describe simulations in plain English
- 🎯 3D Visualization: Interactive Three.js-powered 3D rendering
- 🔧 Structural Analysis: Comprehensive stress and force visualization
- 💬 Chat Interface: Iterative simulation refinement through conversation
- 🎮 Interactive Controls: Click, zoom, rotate, and explore your simulations
- 🌈 Color-Coded Stress: Visual stress indicators across structural elements
- 📊 Force Vectors: Real-time force direction and magnitude display
- 🔄 Session Management: Save and continue simulation sessions
- 🎨 Modern UI: Clean, responsive interface built with React
- 🚀 High Performance: Optimized for complex structural calculations
[Demo GIF/Screenshots will be added here]
Try these example prompts:
- "Show me how stress distributes across a steel truss bridge"
- "What happens to a skyscraper frame during wind loads?"
- "Analyze the forces in a simple cantilever beam"
-
Clone the repository
git clone https://github.com/yourusername/physics-simulation-dashboard.git cd physics-simulation-dashboard
-
Set up environment variables
cp .env.example .env # Edit .env with your OpenAI API key
-
Start the application
# Linux/Mac ./scripts/start.sh # Windows .\scripts\start.ps1
-
Access the application
- Frontend: http://localhost
- API Documentation: http://localhost:8000/docs
Click to expand manual installation steps
cd backend
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
uvicorn app.main:app --reload
cd frontend
npm install
npm run dev
# Install Redis locally or use Docker
docker run -d -p 6379:6379 redis:alpine
┌─────────────────────────────────────────────┐
│ Load Balancer │
│ (Nginx) │
│ Frontend + API Proxy │
├─────────────────────────────────────────────┤
│ │
│ React Frontend FastAPI Backend │
│ (Three.js + Vite) (Python + OpenAI) │
│ │
├─────────────────────────────────────────────┤
│ Redis │
│ (Session Storage) │
└─────────────────────────────────────────────┘
Frontend:
- React 18+ with TypeScript
- Three.js for 3D rendering
- Vite for build tooling
- Tailwind CSS for styling
Backend:
- FastAPI (Python 3.11+)
- OpenAI GPT-4 for natural language processing
- Redis for session management
- Pydantic for data validation
Infrastructure:
- Docker & Docker Compose
- Nginx as reverse proxy
- GitHub Actions for CI/CD
-
Enter your simulation request in natural language:
"Show me the stress distribution on a suspension bridge"
-
Interact with the 3D visualization:
- Click and drag to rotate
- Scroll to zoom
- Click on elements to highlight
-
Refine your simulation through chat:
"Make the bridge longer and add more cables"
- Session Management: Your simulations are saved automatically
- Export Options: Download simulation data and images
- Collaboration: Share simulation sessions with team members
- Custom Materials: Define specific material properties
POST /api/simulate
Content-Type: application/json
{
"description": "steel truss bridge with wind load",
"complexity": "medium"
}
POST /api/chat
Content-Type: application/json
{
"message": "make the bridge longer",
"session_id": "uuid-here"
}
GET /api/examples
For complete API documentation, visit /docs
when running the application.
- Python 3.11+
- Node.js 18+
- Docker & Docker Compose
- Redis (local or Docker)
-
Clone and setup
git clone https://github.com/yourusername/physics-simulation-dashboard.git cd physics-simulation-dashboard
-
Backend development
cd backend python -m venv venv source venv/bin/activate pip install -r requirements.txt uvicorn app.main:app --reload
-
Frontend development
cd frontend npm install npm run dev
-
Docker development
docker-compose up --build
physics-simulation-dashboard/
├── backend/
│ ├── app/
│ │ ├── api/ # API routes
│ │ ├── models/ # Pydantic models
│ │ ├── services/ # Business logic
│ │ └── templates/ # Example structures
│ ├── Dockerfile
│ └── requirements.txt
├── frontend/
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── hooks/ # Custom hooks
│ │ └── services/ # API services
│ ├── Dockerfile
│ └── package.json
├── scripts/ # Deployment scripts
├── docker-compose.yml
└── README.md
# Backend tests
cd backend
pytest
# Frontend tests
cd frontend
npm test
# Integration tests
docker-compose -f docker-compose.test.yml up
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Make your changes
- Run tests
npm test pytest
- Commit your changes
git commit -m "Add amazing feature"
- Push to your branch
git push origin feature/amazing-feature
- Open a Pull Request
- Follow PEP 8 for Python code
- Use TypeScript for all frontend code
- Add tests for new features
- Update documentation for API changes
- Use conventional commits
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI for GPT-4 API
- Three.js community for 3D rendering
- FastAPI for the excellent web framework
- React team for the frontend framework
- 📧 Email: support@yourproject.com
- 💬 Discord: Join our community
- 🐛 Issues: GitHub Issues
- 📖 Documentation: Full Documentation
- Mobile App: React Native mobile application
- Advanced Materials: Custom material property definitions
- Collaboration Tools: Real-time collaborative editing
- Plugin System: Extensible plugin architecture
- Cloud Deployment: One-click cloud deployment options
- AI Models: Support for multiple AI model providers
- Performance Optimization: WebGL and WebAssembly optimizations
Made with ❤️ by the Physics Simulation Dashboard team
Star ⭐ this repository if you find it helpful!