diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2014-09-22 21:27:41 +0400 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2015-01-20 11:30:02 +0300 |
commit | c036c72284ea1e0447181274a65d1556d7c4a0d9 (patch) | |
tree | e78c8528db3807272bb06803cfe186c65cb058f4 /source/blender/physics/intern/implicit.h | |
parent | 3a8ef0ef6cd152bde5fb645e89df8131624da600 (diff) |
Proper implementation of angular bending springs including jacobian
derivatives for stabilization.
The bending forces are based on a simplified torsion model where each
neighboring point of a vertex creates a force toward a local goal. This
can be extended later by defining the goals in a local curve frame, so
that natural hair shapes other than perfectly straight hair are
supported.
Calculating the jacobians for the bending forces analytically proved
quite difficult and doesn't work yet, so the fallback method for now
is a straightforward finite difference method. This works very well and
is not too costly. Even the original paper ("Artistic Simulation of
Curly Hair") suggests this approach.
Diffstat (limited to 'source/blender/physics/intern/implicit.h')
-rw-r--r-- | source/blender/physics/intern/implicit.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/physics/intern/implicit.h b/source/blender/physics/intern/implicit.h index 2bc491d4266..8c860d69a24 100644 --- a/source/blender/physics/intern/implicit.h +++ b/source/blender/physics/intern/implicit.h @@ -151,9 +151,8 @@ bool BPH_mass_spring_force_spring_bending(struct Implicit_Data *data, int i, int float kb, float cb, float r_f[3], float r_dfdx[3][3], float r_dfdv[3][3]); /* Angular bending force based on local target vectors */ -bool BPH_mass_spring_force_spring_bending_angular(struct Implicit_Data *data, int i, int j, int k, int spring_index, float restlen, - float stiffness, float damping, - float r_f[3], float r_dfdx[3][3], float r_dfdv[3][3]); +bool BPH_mass_spring_force_spring_bending_angular(struct Implicit_Data *data, int i, int j, int k, int block_ij, int block_jk, int block_ik, + float restlen_ij, float restlen_jk, float stiffness, float damping); /* Global goal spring */ bool BPH_mass_spring_force_spring_goal(struct Implicit_Data *data, int i, int spring_index, const float goal_x[3], const float goal_v[3], float stiffness, float damping, |