|
![](/i/fill.gif) |
Tim Nikias wrote:
>
> I've been trying to implement Hugo Elias' Springs
> for cloth in order to create some strings (to finally
> script some hair), but the algorithm somehow does
> not work.
IIRC clothray is based on this description so you can be sure it works.
Having a look at the clothray source might help.
> AFAIK some have already implemented the algorithm,
> so if anyone could give me their code for me to look at
> (Only the spring one, everything else need not be bothered
> about), I'd be grateful...
A (linear) spring is really simple, the force is proportional to the
extension from the standard length. In 3D:
#declare Dist=Pos_End-Pos_Start;
#declare Force=vnormalize(Dist)*(vlength(Dist)-Zero_Length)*c_spring;
Christoph
--
POV-Ray tutorials, IsoWood include,
TransSkin and more: http://www.tu-bs.de/~y0013390/
Last updated 13 Aug. 2002 _____./\/^>_*_<^\/\.______
Post a reply to this message
|
![](/i/fill.gif) |