Opening the Particle Editor
To edit a particle’s properties, click on any particle in the Particles list in the GUI sidebar. The Particle Editor panel will open on the left side of the screen.Editor Interface Overview
The Particle Editor provides complete control over a particle’s physical properties, forces, and events:ParticleEditor.tsx
Calculation Modes
The simulator supports two physics calculation modes:Kinematics Mode
Define position directly as functions of timef(t).
Use when:
- You know the exact trajectory equation
- Working with parametric paths
- Educational demonstrations of motion types
Dynamics Mode
Define forcesF(t, x, y, z) and let the engine compute motion using Newton’s laws.
Use when:
- Simulating realistic physics interactions
- Working with force fields
- Modeling particle interactions
Click the mode button to toggle between kinematics and dynamics modes. The editor interface changes based on the selected mode.
Editing Initial Conditions
Initial Position
Set the starting position in 3D space:Position Input
- X: Forward/backward
- Y: Left/right
- Z: Up/down (Z=0 is the ground plane)
Initial Velocity
Set the starting velocity vector:Velocity Input
Velocity is measured in meters per second (m/s). Positive Z velocity means upward motion.
Setting Mass (Dynamics Mode Only)
When in dynamics mode, you can set the particle’s mass:Mass Input
- Mass affects how forces accelerate the particle (F = ma)
- Heavier particles accelerate more slowly under the same force
- Default mass is 1 kg
- Minimum practical mass is 0.001 kg (to avoid division issues)
Managing Forces (Dynamics Mode)
Adding Forces
Click the ”+ ADD FORCE” button to create a new force vector:Add Force
- Fx: Force in X direction (Newtons)
- Fy: Force in Y direction (Newtons)
- Fz: Force in Z direction (Newtons)
Editing Force Formulas
Each force component accepts a mathematical formula:Force Vector Display
Force Editor UI
Removing Forces
Click the “X” button next to any force to remove it from the particle.Managing Multiple Forces
The simulator supports multiple simultaneous forces on a single particle:- Forces are additive - all forces are summed to get the net force
- Net force is calculated every frame:
F_net = F1 + F2 + F3 + ... - Acceleration is computed using Newton’s second law:
a = F_net / mass
Force 1 (Restoring Spring Force)
Kinematics Mode Functions
In kinematics mode, define position functions directly:Kinematics Input
In kinematics mode, gravity still affects the particle. Set
fz(t) to compensate: fz(t): -0.5 * 9.81 * t^2 for free fall.Setting Particle Color
Customize the particle’s visual appearance:Color Picker
#ff00ff). The color picker provides a visual interface for selection.
Events Configuration
The Events section allows you to trigger actions based on conditions. See the Events Guide for detailed information.Quick Overview
Events appear below the main editor with:- Event name (editable)
- ON/OFF toggle (enable/disable)
- Conditions list with AND/OR logic
- Actions list (pause, changeColor)
- Delete button (X)
Event Display
- Green background: Event has been triggered
- Yellow border: Event is enabled
- Gray border: Event is disabled
- ✓ Triggered: Shows when event conditions are met
Closing the Editor
Click the “CLOSE” button at the bottom of the editor to return to the main view:Close Button
Changes are applied immediately. Click CLOSE or select another particle to exit the editor.
Particle List Interactions
In the main GUI, the particle list offers additional interactions:Click Actions
- Left Click: Open particle editor
- Right Click: Focus camera on particle
- Shift + Click: Reset camera to default position
Particle Display
Particle Item
- P-XXX: Last 3 digits of particle ID
- (Ground): Appears when particle is touching ground (z=0)
- x button: Delete the particle
Common Workflows
Creating a projectile
Creating a projectile
- Add a new particle at desired height
- Set initial velocity (e.g., vx=10, vy=0, vz=5)
- Switch to Dynamics mode
- Leave forces empty (gravity will act automatically)
- Enable gravity in Environment settings
- Click START
Creating a spring oscillator
Creating a spring oscillator
- Add particle at (10, 0, 0)
- Set initial velocity (0, 0, 0)
- Switch to Dynamics mode
- Set mass to 1 kg
- Add force: Fx=-10x, Fy=-10y, Fz=-10*z
- Disable gravity
- Click START
Creating a custom trajectory
Creating a custom trajectory
- Add particle at (0, 0, 0)
- Switch to Kinematics mode
- Set functions:
- fx(t): 10*cos(t)
- fy(t): 10*sin(t)
- fz(t): t*2
- Click START to see the helix motion
Adding collision detection
Adding collision detection
- Open particle editor
- Scroll to Events section
- Click ”+ ADD EVENT”
- Set condition: z <= 0
- Add action: Pause
- The simulation will pause when particle hits ground
Best Practices
- Start Simple: Begin with basic forces/functions and add complexity gradually
- Use Descriptive Colors: Color-code particles by behavior or group
- Monitor Events: Keep track of triggered events using the visual indicators
- Test Incrementally: After each change, run a short simulation to verify behavior
- Save Configurations: Use the SAVE button to preserve interesting setups
Related Topics
Formula Syntax
Learn the complete formula syntax for forces and functions
Events System
Configure advanced event-based behaviors