Author: Carlos Lopez <[email protected]>
Date:   Sun Mar 20 17:31:46 2011 +0100

Add documentation

---

 synfig-core/src/synfig/valuenode_wplist.cpp |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/synfig-core/src/synfig/valuenode_wplist.cpp 
b/synfig-core/src/synfig/valuenode_wplist.cpp
index 4bbe76c..4d20194 100644
--- a/synfig-core/src/synfig/valuenode_wplist.cpp
+++ b/synfig-core/src/synfig/valuenode_wplist.cpp
@@ -94,9 +94,26 @@ synfig::convert_bline_to_wplist(const ValueBase& bline)
        return ValueBase(ret);
 }
 
+       //! synfig::widthpoint_interpolate
+       /*!
+        * @param prev previous withpoint
+        * @param next next withpoint
+        * @param p position to calculate the new width between previous 
position and next position
+        * @param smoothness [0,1] how much linear (0) or smooth (1) the 
interpolation is
+        * @return the interpolated width
+       */
 Real
 synfig::widthpoint_interpolate(const WidthPoint& prev, const WidthPoint& next, 
const Real p, const Real smoothness)
 {
+       // Smoothness gives linear interpolation  between
+       // the result of the linear interpolation between the withpoints
+       // and the interpolation based on a 5th degree polynomial that matches
+       // following rules:
+       // q [0,1]
+       // p(0)= 0    p(1)= 1
+       // p'(0)= 0   p'(1)= 0
+       // p''(0)= 0  p''(1)= 0
+       // It is: p(q) = 6*q^5-15*q^4+10*q^3 = q*q*q*(10+q*(6*q-15)
        WidthPoint::SideType side_int(WidthPoint::TYPE_INTERPOLATE);
        int nsb, nsa, psb, psa;
        Real pp, np;


------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl

Reply via email to