From f1d19852c2dc7597fb90b5c43027133b3b7fa27d Mon Sep 17 00:00:00 2001 From: jfbarraud Date: Fri, 20 Mar 2009 22:15:13 +0000 Subject: [PATCH] bug fix (was broken since 2geom sbasis refactor). --- src/live_effects/lpe-sketch.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/live_effects/lpe-sketch.cpp b/src/live_effects/lpe-sketch.cpp index 97bd8a49d..22c758d10 100644 --- a/src/live_effects/lpe-sketch.cpp +++ b/src/live_effects/lpe-sketch.cpp @@ -151,16 +151,17 @@ LPESketch::computePerturbation (double s0, double s1){ //compute howmany deg 3 sbasis to concat according to frequency. unsigned count = unsigned((s1-s0)/strokelength*tremble_frequency)+1; for (unsigned i=0; i perturb = D2(SBasis(2*count, Linear()), SBasis(2*count, Linear())); + D2 perturb = D2(SBasis(2, Linear()), SBasis(2, Linear())); for (unsigned dim=0; dim<2; dim++){ B[dim] = offset[dim] + 2*tremble_size-tremble_size.get_value(); - perturb[dim][2*i] = Linear(A[dim],B[dim]); + perturb[dim][0] = Linear(A[dim],B[dim]); dA[dim] = dA[dim]-B[dim]+A[dim]; - dB[dim] = 2*tremble_size-tremble_size.get_value(); - perturb[dim][2*i+1] = Linear(dA[dim],dB[dim]); + dB[dim] = -(2*tremble_size-tremble_size.get_value())-B[dim]+A[dim]; + perturb[dim][1] = Linear(dA[dim],dB[dim]); } - A = B; dA = B-A-dB; + A = B; + //dA = B-A-dB; res.concat(Piecewise >(perturb)); } res.setDomain(Interval(s0,s0+count*strokelength/tremble_frequency)); -- 2.30.2