Get Started in Minutes
This guide will walk you through creating your first particle simulation. You’ll learn how to create a particle, apply forces, and observe the resulting motion.Your First Simulation
Access the Simulator
Open the live demo in your browser:Or clone and run locally (see Installation):You’ll see a 3D view with a control panel on the right side.
Create Your First Particle
In the SIMULATOR panel on the right:
- Expand the “New Particle” section
- Enter initial position coordinates:
- X:
10 - Y:
10 - Z:
0
- X:
- Click the ”+ ADD PARTICLE” button
A new particle will appear in the 3D view at position (10, 10, 0). The particle list will show your new particle as “P-001”.
Configure the Particle
Click on the particle “P-001” in the Particles list to open the PHYSICS EDITOR panel on the left.You’ll see several configuration options:
- Calculation Mode: Toggle between Kinematics and Dynamics
- Initial Position: Current position (X, Y, Z)
- Mass: Particle mass in kg (default: 1)
- Forces: Mathematical expressions for forces
- Initial Velocity: Starting velocity vector
Add a Simple Harmonic Force
In the PHYSICS EDITOR:
- Scroll to the “Forces F(t, x, y, z) (N)” section
- Click ”+ ADD FORCE”
- You’ll see three input fields for Fx, Fy, and Fz
-
Enter the following force components:
This creates a restoring force that pulls the particle toward the origin - a classic harmonic oscillator!
Understanding the Force Formula
Fx = -x: Force in X direction proportional to X position (pulls back to center)Fy = -y: Force in Y direction proportional to Y position (pulls back to center)Fz = 0: No force in Z direction
Start the Simulation
- Click “CLOSE” to exit the particle editor
- In the main control panel, expand the “Controls” section
- Click the “START” button
Watch your particle oscillate! It will move in circular or elliptical paths around the origin, demonstrating simple harmonic motion.
Controls During Simulation
- PAUSE: Stop the simulation at any time
- RESET: Return particles to initial positions and velocities
- Camera: Click and drag to rotate, scroll to zoom, right-click to pan
Available Variables and Functions
When writing force formulas, you have access to:Variables
| Variable | Description |
|---|---|
t | Elapsed time in seconds |
x, y, z | Current particle position on each axis |
Mathematical Functions
| Category | Functions | Example |
|---|---|---|
| Trigonometry | sin(n), cos(n), tan(n), atan2(y, x) | 10 * sin(t) |
| Hyperbolic | sinh(n), cosh(n), tanh(n) | 20 * tanh(sin(t)) |
| Logs & Power | sqrt(n), log(n), log10(n), ^ or ** | log(t + 1) |
| Utility | abs(n), floor(n), ceil(n), round(n) | abs(x) |
| Advanced | min(a, b), max(a, b), random(), sign(n) | max(x, y) |
Mathematical Constants
| Constant | Value (Approx) |
|---|---|
PI | 3.14159 |
E | 2.718 |
SQRT2 | 1.414 |
Visualization Options
Enhance your simulation with these visualization features:Environment Settings
In the Environment section:- Gravity: Toggle global downward gravitational acceleration
- Trail: Show particle motion paths
- Axes: Display X, Y, Z coordinate axes
- Grid: Show the ground plane grid
- Particles: Toggle particle visibility
- Particle Size: Adjust visual size of particles (0.1 - 3.0)
Force Display Modes
Click the Forces Display button to cycle through:- Forces: OFF - No force vectors shown
- Forces: RESULTANT - Show net force vector
- Forces: INDIVIDUAL - Show each force component separately
Physics Parameters
- Ground Friction: Damping coefficient when particles touch ground (0.0 - 2.0)
- Delta T: Time step for simulation (0.001 - 0.1)
- Smaller values = more accurate but slower
- Larger values = faster but less accurate
Load the Example Configuration
Want to see a spectacular pre-built simulation?- Click the “VIEW EXAMPLE” button in the control panel
- Click “START” to watch 20 particles in a synchronized vortex pattern
- Multiple particles with coordinated initial conditions
- Complex force expressions:
-x * abs(cos(t*0.2))(pulsing vortex) - Hyperbolic vertical motion:
-z * 0.5 + 20 * tanh(sin(t)) - Phase-shifted behavior for visual appeal
Next Steps
Installation Guide
Set up the development environment on your local machine
Configuration Reference
Learn about all particle properties and simulation settings
Trajectory Examples
Explore more complex simulations and patterns
Data Structures
Dive into the technical details and data structures