summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1b77afe)
raw | patch | inline | side by side (parent: 1b77afe)
author | jfbarraud <jfbarraud@users.sourceforge.net> | |
Fri, 20 Mar 2009 22:15:13 +0000 (22:15 +0000) | ||
committer | jfbarraud <jfbarraud@users.sourceforge.net> | |
Fri, 20 Mar 2009 22:15:13 +0000 (22:15 +0000) |
src/live_effects/lpe-sketch.cpp | patch | blob | history |
index 97bd8a49df709384b2c7d0f38729de8c8f6e1d2e..22c758d1035057539c53ddd2931696d74b0ba6eb 100644 (file)
//compute howmany deg 3 sbasis to concat according to frequency.
unsigned count = unsigned((s1-s0)/strokelength*tremble_frequency)+1;
for (unsigned i=0; i<count; i++){
- D2<SBasis> perturb = D2<SBasis>(SBasis(2*count, Linear()), SBasis(2*count, Linear()));
+ D2<SBasis> perturb = D2<SBasis>(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<D2<SBasis> >(perturb));
}
res.setDomain(Interval(s0,s0+count*strokelength/tremble_frequency));