An interactive 3D solar system explorer with hand tracking controls! Control the camera with natural hand gestures while exploring planets with realistic orbits and a stunning star field background.
- 🪐 Full Solar System: All 8 planets plus the Sun with realistic textures
- 🌟 Dynamic Star Field: 10,000+ animated stars creating an immersive space environment
- 🎯 Real Orbits: Planets orbit the sun with scientifically accurate speeds
- 👋 Hand Gesture Controls: Control the camera with natural hand gestures
- 👉 Right hand pinch (up/down): Zoom in/out
- 👈 Left hand pinch (left/right): Rotate view
- ✊ Two fists: Pan camera
- ⚡ Real-time WebSocket: Instant gesture recognition and response
- 📊 Visual Feedback: Live status indicators and gesture visualization
- 🎨 Modern UI: Sleek interface with Tailwind CSS
- Node.js (v18 or higher)
- Python (v3.8 or higher)
- Webcam for hand tracking
Run the setup script to install all dependencies:
./setup.shOr manually install dependencies:
# Install Node.js dependencies
npm install
# Install Python dependencies
cd PythonHandTracking
pip install -r requirements.txt
cd .../start.shThis starts both servers automatically. Press Ctrl+C to stop all servers.
Terminal 1 - Python Hand Tracking Server:
cd PythonHandTracking
python3 server.pyTerminal 2 - Next.js Frontend:
npm run devThen open http://localhost:3000 in your browser.
- Allow camera access when prompted
- Click "Start Exploring" on the home page
- Position your hands in front of the camera
- Use the hand gestures shown in the guide overlay:
- Right hand: Pinch thumb and index finger, move up/down to zoom
- Left hand: Pinch thumb and index finger, move left/right to rotate
- Both hands: Make fists and move to pan the camera
The status indicator in the top-right shows connection status:
- 🟢 Green: Connected and tracking
- 🔴 Red: Disconnected (check Python server)
- 🔵 Blue: Gesture detected
.
├── src/
│ ├── app/
│ │ ├── page.tsx # Home page
│ │ └── explore/
│ │ └── page.tsx # 3D solar system with hand tracking
│ ├── components/
│ │ ├── Planet.tsx # Planet component with orbits
│ │ └── Star.tsx # Animated star field
│ └── hooks/
│ └── useHandTracking.ts # WebSocket hook for gestures
├── PythonHandTracking/
│ ├── server.py # Integrated Flask + WebSocket server
│ ├── handTracker.py # Original hand tracking module
│ └── requirements.txt # Python dependencies
├── public/
│ ├── textures/ # Planet textures (sun, mercury, venus, etc.)
│ └── logo.png # App logo
├── setup.sh # Installation script
└── start.sh # Server startup script
- Next.js 15 - React framework with App Router
- Three.js - 3D graphics and rendering
- TypeScript - Type safety
- Tailwind CSS - Utility-first styling
- Python 3 - Backend runtime
- MediaPipe - Hand tracking ML model
- OpenCV - Computer vision
- WebSockets - Real-time bidirectional communication
- Flask - REST API server
- Flask-CORS - Cross-origin resource sharing
- Ensure Python server is running:
cd PythonHandTracking && python3 server.py - Check that WebSocket server started on
ws://localhost:8765 - Allow camera permissions in your browser
- Click "Retry Connection" in the error message
- Make sure no other application is using the webcam
- Try restarting the Python server
- Check that OpenCV can access your camera:
python3 -c "import cv2; print(cv2.VideoCapture(0).isOpened())"
- Ensure good lighting conditions
- Keep hands clearly visible in the camera frame
- Check the tracking window to see if hands are detected (colored circles)
- Make sure you're using the correct hand (right for zoom, left for rotate)
- Check if port 3000 is available:
lsof -i :3000 - Check if port 8765 is available:
lsof -i :8765 - Check if port 5000 is available:
lsof -i :5000
- Sun: Central star with emissive lighting
- Mercury, Venus, Earth, Mars: Inner rocky planets
- Jupiter, Saturn: Gas giants
- Uranus, Neptune: Ice giants (URANUS PROBE EDITION!)
- MediaPipe Hands: Google's state-of-the-art hand tracking
- Real-time Detection: 30+ FPS tracking
- Multi-hand Support: Tracks up to 2 hands simultaneously
- Gesture Recognition: Pinch and fist detection
To contribute or modify the project:
# Run in development mode with hot reload
npm run dev
# Build for production
npm run build
# Start production server
npm start
# Lint code
npm run lintThis project was created for Hackathon 2025.
- Planet textures from Solar System Scope
- Hand tracking powered by MediaPipe
- Built with Next.js and Three.js