Author: Carlos Lopez <[email protected]>
Date: Wed Jul 27 19:08:52 2011 +0200
Try to find a better initial value for the root find routine.
---
synfig-core/src/synfig/valuenode_bline.cpp | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/synfig-core/src/synfig/valuenode_bline.cpp
b/synfig-core/src/synfig/valuenode_bline.cpp
index e481ca3..699d9e0 100644
--- a/synfig-core/src/synfig/valuenode_bline.cpp
+++ b/synfig-core/src/synfig/valuenode_bline.cpp
@@ -417,7 +417,9 @@ synfig::hom_to_std(const ValueBase &bline, Real pos, bool
index_loop, bool bline
// homogenous position
// Secant method: http://en.wikipedia.org/wiki/Secant_method
Real sn(0.0); // the standard position on current bezier
- Real sn1(0.0), sn2(1.0);
+ Real pos1=(pos-0.1)< 0.0?0.0:(pos-0.1);
+ Real pos2=(pos+0.1)> 1.0?1.0:(pos+0.1);
+ Real sn1(pos1), sn2(pos2);
Real t0((mpl-pl)/bl); // the homogenous position on the current bezier
int iterations=0;
int max_iterations=100;
------------------------------------------------------------------------------
Got Input? Slashdot Needs You.
Take our quick survey online. Come on, we don't ask for help often.
Plus, you'll get a chance to win $100 to spend on ThinkGeek.
http://p.sf.net/sfu/slashdot-survey
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl