Unifying the Harmonic force with the Spring force

Hi all 🙂

Thanks to Jahka who told me that he suspected the current harmonic force to act in a similar way to my spring implementation, I have performed some researches and he was indeed right.  Just that the harmonic force doesn’t consider a rest length parameter. So I have merged both implementation into one, where the harmonic force now uses the spring force code with rest length and reuses the previous Harmonic velocity damping.

Now everything is ok: if the user sets the rest length of the new harmonic to zero he will get the old harmonic behavior, while if he set its value to any other’s one he will get the new spring force behavior. The new patch is at http://www.pasteall.org/9882/diff

Now it requires even less changes  plus it inherits its gizmo 😉

Cheers

The Spring force has being merged in the Harmonic force, improving it
Advertisements
Unifying the Harmonic force with the Spring force

4 thoughts on “Unifying the Harmonic force with the Spring force

  1. alalo says:

    I did not understand a single word 😀 But it sounds like an interesting optimization/clean up. dunno 😛

    lol at Windows theme.. guess the IE icon opens Firefox? 🙂

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s