[ODE] Restoring Force

Tobias Zimmer tozim at gmx.de
Tue Jun 26 03:50:34 MST 2007


Hi all, it's me with the brushes again.

I am currently working at the restoring force for the bristles of the  
brush.
First I used the distance from the starting z-position to apply the  
restoring force
on, like an oszillation. But this is not working if the brush-head  
twists, because then
a bend of a bristle is possible with no change of the z-value.

Therefore I came to this possible restoring force:

       dReal angle1 = dJointGetUniversalAngle1(joint[i]);
       dReal angle2 = dJointGetUniversalAngle2(joint[i]);
	dBodyAddForce (MyBody[i],force*sin(angle1),force*sin(angle2),0);

I'm calculating the angles of the universal joints and then use them  
for the force.
A sin of 0 would lead to a force equal to zero, which is what I need,  
because there
mustn't be a force if there is no bending. I adjusted the force- 
parameter to a very
high value of 1e20 but the force though doesn't work as intended.

Does anyone have an idea how to construct a restoring force which  
really works?



desperate greetings,
Tobias


More information about the ODE mailing list