Skip to content

Commit c132e26

Browse files
authored
Merge pull request #215 from alxbilger/SpringForceField
Minimal description of the SpringForceField component
2 parents 8e23ef4 + bc7998d commit c132e26

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# SpringForceField
2+
3+
This component implements a physics-based spring force field for simulating elastic connections between particles or points. It's designed for modeling systems where objects are connected by springs (e.g., molecular dynamics, cloth simulation, soft tissue modeling).
4+
5+
## Overview
6+
The `SpringForceField` component creates a physics-based spring system that:
7+
- Applies Hooke's law forces proportional to displacement from rest length
8+
- Includes viscous damping for energy dissipation
9+
- Supports individual spring properties (stiffness, damping, rest length, activation state)
10+
- Handles topological changes automatically
11+
- Provides visualization options for debugging
12+
13+
## Physics Model
14+
The component implements a linear spring model where each connection (spring) provides the force model:
15+
16+
$$
17+
\mathbf{F} = k_s (l - l_0) \; \mathbf{u} + k_d (\mathbf{v} ·\mathbf{u}) \; \mathbf{u}
18+
$$
19+
20+
where:
21+
- `k_s` = Spring stiffness
22+
- `l` = Current length
23+
- `l_0` = Rest length
24+
- `u` = Unit vector along spring
25+
- `v` = Relative velocity
26+
- `k_d` = Damping coefficient

0 commit comments

Comments
 (0)