Skip to content

About damping formula #3

@mrleolink

Description

@mrleolink

Hi Raffeal,

I have read the source code as well as the explaining comment many times but I still can't figure out the damping formula that you used. Particularly this part:

    if (value > _dampingAmplitude) _dampingAmplitude += (fmin(value,1.0)-_dampingAmplitude)/4.0;
    else if (value<0.01) _dampingAmplitude *= _dampingFactor;
    _amplitude = fmax( fmin(_dampingAmplitude*20, 1.0), _idleAmplitude);

Why did you choose 4.0 as divisor, 0.86 (~ sqrt(3)/2) as damping factor, and multiply dampingAmplitude by 20 after all?

I'm really keen on the beauty of maths in this animation, so I'm looking forward to your to hearing from you.
Thanks 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions