Simulator Controls Overview
The Particle Simulator provides an intuitive interface with collapsible sections, real-time controls, and keyboard shortcuts for efficient workflow.GUI Layout
Main Sections
The GUI is organized into expandable sections:GUI.tsx
Section Indicators
- ▼ (pointing down): Section is expanded
- ▶ (pointing right): Section is collapsed
Play/Pause/Reset Controls
Start/Pause Button
State-dependent button that toggles simulation:Controls
- START (green): Begin or resume simulation
- PAUSE (red): Pause simulation, maintaining current state
Reset Button
Returns all particles to initial conditions:Escenario.tsx
- Stops simulation
- Returns particles to
p0_fispositions - Restores initial velocities
v0_fis - Clears particle trails
- Resets event
triggeredflags - Sets time to t=0
Reset does NOT change particle properties, forces, or events. It only restores initial conditions.
Environment Settings
Toggle Controls
Each toggle button shows current state:Gravity Toggle
- ON: Applies 9.80665 m/s² downward acceleration (Earth gravity)
- OFF: No gravitational force
Trail Toggle
- ON: Particles leave visible trail showing path history
- OFF: No trail visualization
- Trail stores last 200 points (every 5 frames)
Axes Toggle
- ON: Displays 3D coordinate axes
- OFF: Hides axes
Axes help orient the 3D space:
- Red: X-axis
- Green: Y-axis
- Blue: Z-axis
Grid Toggle
- ON: Shows ground plane grid (2000x2000 units, 100 divisions)
- OFF: Hides grid
Particles Toggle
- ON: Render particles as spheres
- OFF: Hide particle meshes (trails still visible if enabled)
Particle Size Slider
Available when particles are visible:- Range: 0.1 to 3.0 units
- Default: 0.15 units
- Real-time: Changes apply immediately
Force Display Modes
Visualize forces acting on particles:Force Mode Button
Mode 0: Forces OFF
- No force vectors displayed
- Background: Gray (#666)
- Best for final presentations
Mode 1: Forces RESULTANT
- Shows net force (sum of all forces) as a single arrow
- Background: Red (#ff6b6b)
- Arrow length proportional to force magnitude
- Useful for understanding total acceleration
Mode 2: Forces INDIVIDUAL
- Shows each force separately as individual arrows
- Background: Teal (#4ecdc4)
- Best for debugging and understanding force composition
- Color-coded by force type
Force arrows are scaled for visibility. They represent force direction and relative magnitude, not exact lengths.
Info Panel Toggle
- ON (Yellow): Displays real-time particle data panel
- OFF (Gray): Hides info panel
- Particle ID
- Current position (x, y, z)
- Current velocity (vx, vy, vz)
- Current speed (magnitude)
- Elapsed time
Physics Parameters
Ground Friction Slider
- Range: 0.00 to 2.00
- Default: 0.20
- Effect: Coefficient of friction when particles are on ground (z=0)
- Higher values = more resistance to sliding
PhysicsUpdate.tsx
Delta T Slider
- Range: 0.001 to 0.100 seconds
- Default: 0.001 seconds
- Effect: Time step size for physics integration
| Value | Use Case | Accuracy | Speed |
|---|---|---|---|
| 0.001 | Precise simulations | High | Slow |
| 0.01 | General use | Medium | Medium |
| 0.05+ | Fast visualization | Lower | Fast |
Camera Controls
Orbit Controls (Mouse)
Three.js OrbitControls provide intuitive camera manipulation:Escenario.tsx
| Action | Control |
|---|---|
| Rotate | Left mouse button + drag |
| Pan | Right mouse button + drag |
| Zoom | Mouse wheel scroll |
| Zoom (trackpad) | Two-finger pinch |
Focus Camera on Particle
Right-click a particle in the list:GUI.tsx
Reset Camera Button
- Position: [50, 50, 50]
- Looking at origin [0, 0, 0]
Particle Management
Adding New Particles
Expand the “New Particle” section:Add Particle
- Specified position [X, Y, Z]
- Zero initial velocity [0, 0, 0]
- Random color
- Mass = 1 kg
- Kinematics mode enabled
- No forces or events
Particle List Interactions
Each particle in the list supports:| Action | Effect |
|---|---|
| Left Click | Open particle editor |
| Right Click | Focus camera on particle |
| Shift + Click | Reset camera to default |
| Click X button | Delete particle |
Particle Item Display
- Color: Matches particle color
- P-XXX: Last 3 digits of ID
- (Ground): Shows when z ≤ 0
Deleting Particles
Delete Handler
Configuration Management
Save Button
Load Button
View Example Button
/public/default.json.
Keyboard Shortcuts
Toggle GUI
PressTab to show/hide the entire GUI:
Escenario.tsx
- Tab: Toggle GUI visibility
- Useful for screenshots or presentations
- Camera controls remain active
Performance Optimization
For Better Performance
- Reduce deltaT: Smaller steps = more calculations
- Disable trails: Trail rendering has some overhead
- Use resultant forces: Fewer arrows to render
- Hide info panel: Reduces real-time updates
- Limit particle count: <50 particles for complex forces
For Better Accuracy
- Decrease deltaT: Use 0.001 for precise simulations
- Enable trails: Visualize path accuracy
- Individual forces: See force composition errors
- Enable info panel: Monitor numerical values
Common Workflows
Quick experiment setup
Quick experiment setup
- Click VIEW EXAMPLE to clear and load base
- RESET to initial state
- Edit particle properties
- START to run
- PAUSE to inspect
- RESET to try again
Debugging motion issues
Debugging motion issues
- PAUSE the simulation
- Enable Individual Forces mode
- Enable Info Panel
- Enable Axes for reference
- START slowly (low deltaT)
- Watch force vectors and numerical values
Creating a demonstration
Creating a demonstration
- Build simulation with desired particles
- Test with START/PAUSE/RESET
- Adjust deltaT for smooth playback
- Configure trails and force display
- SAVE configuration
- Press Tab to hide GUI
- LOAD saved config before presenting
- START to demonstrate
Recording a video
Recording a video
- Load or create simulation
- RESET to ensure clean start
- Adjust camera angle with mouse
- Enable/disable visual elements as needed
- Press Tab to hide GUI
- Start screen recording software
- Press Tab to show GUI briefly
- Click START
- Let simulation run
- Press Tab → PAUSE when done
Interface Shortcuts Summary
| Action | Method |
|---|---|
| Toggle GUI | Press Tab |
| Start/Pause | Click START/PAUSE button |
| Reset | Click RESET button |
| Edit particle | Left-click in particle list |
| Focus camera | Right-click particle in list |
| Reset camera | Shift+click particle OR click Reset Camera |
| Delete particle | Click X button in particle list |
| Rotate view | Left mouse + drag |
| Pan view | Right mouse + drag |
| Zoom | Mouse wheel |
| Add particle | Expand “New Particle” section |
| Toggle sections | Click section headers |
Accessibility Features
- Clear labels: All controls have descriptive labels
- Visual feedback: Button colors indicate state
- Collapsible sections: Reduce cognitive load
- Real-time values: Sliders show current values
- State indicators: ON/OFF shown explicitly
Best Practices
- Start simple: Begin with one particle and basic forces
- Use reset frequently: Quick way to retry experiments
- Save often: Preserve interesting configurations
- Name particles: Use colors to track different behaviors
- Toggle trails: Turn off for cleaner analysis, on for debugging paths
- Adjust deltaT: Match to your needs (accuracy vs speed)
- Use camera focus: Find lost particles quickly
- Hide GUI: Clean interface for recordings
Related Topics
Particle Editor
Learn to edit particles clicked in the list
Configuration
Master save/load functionality