Revision 663fea68
Added by Leszek Koltunski over 7 years ago
src/main/java/org/distorted/library/type/Dynamic5D.java | ||
---|---|---|
450 | 450 |
{ |
451 | 451 |
time = noise(time,0); |
452 | 452 |
|
453 |
buffer[offset ] = (next.x-curr.x)*time + curr.x + (baseV[0][0]*mFactor[0] + baseV[1][0]*mFactor[1] + baseV[2][0]*mFactor[2] + baseV[3][0]*mFactor[3]);
|
|
454 |
buffer[offset+1] = (next.y-curr.y)*time + curr.y + (baseV[0][1]*mFactor[0] + baseV[1][1]*mFactor[1] + baseV[2][1]*mFactor[2] + baseV[3][1]*mFactor[3]);
|
|
455 |
buffer[offset+2] = (next.z-curr.z)*time + curr.z + (baseV[0][2]*mFactor[0] + baseV[1][2]*mFactor[1] + baseV[2][2]*mFactor[2] + baseV[3][2]*mFactor[3]);
|
|
456 |
buffer[offset+3] = (next.z-curr.z)*time + curr.z + (baseV[0][3]*mFactor[0] + baseV[1][3]*mFactor[1] + baseV[2][3]*mFactor[2] + baseV[3][3]*mFactor[3]);
|
|
457 |
buffer[offset+4] = (next.z-curr.z)*time + curr.z + (baseV[0][4]*mFactor[0] + baseV[1][4]*mFactor[1] + baseV[2][4]*mFactor[2] + baseV[3][4]*mFactor[3]);
|
|
453 |
buffer[offset ] = (next.x-curr.x)*time + curr.x + (baseV[1][0]*mFactor[0] + baseV[2][0]*mFactor[1] + baseV[3][0]*mFactor[2] + baseV[4][0]*mFactor[3]);
|
|
454 |
buffer[offset+1] = (next.y-curr.y)*time + curr.y + (baseV[1][1]*mFactor[0] + baseV[2][1]*mFactor[1] + baseV[3][1]*mFactor[2] + baseV[4][1]*mFactor[3]);
|
|
455 |
buffer[offset+2] = (next.z-curr.z)*time + curr.z + (baseV[1][2]*mFactor[0] + baseV[2][2]*mFactor[1] + baseV[3][2]*mFactor[2] + baseV[4][2]*mFactor[3]);
|
|
456 |
buffer[offset+3] = (next.z-curr.z)*time + curr.z + (baseV[1][3]*mFactor[0] + baseV[2][3]*mFactor[1] + baseV[3][3]*mFactor[2] + baseV[4][3]*mFactor[3]);
|
|
457 |
buffer[offset+4] = (next.z-curr.z)*time + curr.z + (baseV[1][4]*mFactor[0] + baseV[2][4]*mFactor[1] + baseV[3][4]*mFactor[2] + baseV[4][4]*mFactor[3]);
|
|
458 | 458 |
} |
459 | 459 |
else |
460 | 460 |
{ |
... | ... | |
515 | 515 |
|
516 | 516 |
computeOrthonormalBaseMore(time,tmp1); |
517 | 517 |
|
518 |
buffer[offset ]= ((tmp1.a[0]*time+tmp1.b[0])*time+tmp1.c[0])*time+tmp1.d[0] + (baseV[0][0]*mFactor[0] + baseV[1][0]*mFactor[1] + baseV[2][0]*mFactor[2] + baseV[3][0]*mFactor[3]);
|
|
519 |
buffer[offset+1]= ((tmp1.a[1]*time+tmp1.b[1])*time+tmp1.c[1])*time+tmp1.d[1] + (baseV[0][1]*mFactor[0] + baseV[1][1]*mFactor[1] + baseV[2][1]*mFactor[2] + baseV[3][1]*mFactor[3]);
|
|
520 |
buffer[offset+2]= ((tmp1.a[2]*time+tmp1.b[2])*time+tmp1.c[2])*time+tmp1.d[2] + (baseV[0][2]*mFactor[0] + baseV[1][2]*mFactor[1] + baseV[2][2]*mFactor[2] + baseV[3][2]*mFactor[3]);
|
|
521 |
buffer[offset+3]= ((tmp1.a[3]*time+tmp1.b[3])*time+tmp1.c[3])*time+tmp1.d[3] + (baseV[0][3]*mFactor[0] + baseV[1][3]*mFactor[1] + baseV[2][3]*mFactor[2] + baseV[3][3]*mFactor[3]);
|
|
522 |
buffer[offset+4]= ((tmp1.a[4]*time+tmp1.b[4])*time+tmp1.c[4])*time+tmp1.d[4] + (baseV[0][4]*mFactor[0] + baseV[1][4]*mFactor[1] + baseV[2][4]*mFactor[2] + baseV[3][4]*mFactor[3]);
|
|
518 |
buffer[offset ]= ((tmp1.a[0]*time+tmp1.b[0])*time+tmp1.c[0])*time+tmp1.d[0] + (baseV[1][0]*mFactor[0] + baseV[2][0]*mFactor[1] + baseV[3][0]*mFactor[2] + baseV[4][0]*mFactor[3]);
|
|
519 |
buffer[offset+1]= ((tmp1.a[1]*time+tmp1.b[1])*time+tmp1.c[1])*time+tmp1.d[1] + (baseV[1][1]*mFactor[0] + baseV[2][1]*mFactor[1] + baseV[3][1]*mFactor[2] + baseV[4][1]*mFactor[3]);
|
|
520 |
buffer[offset+2]= ((tmp1.a[2]*time+tmp1.b[2])*time+tmp1.c[2])*time+tmp1.d[2] + (baseV[1][2]*mFactor[0] + baseV[2][2]*mFactor[1] + baseV[3][2]*mFactor[2] + baseV[4][2]*mFactor[3]);
|
|
521 |
buffer[offset+3]= ((tmp1.a[3]*time+tmp1.b[3])*time+tmp1.c[3])*time+tmp1.d[3] + (baseV[1][3]*mFactor[0] + baseV[2][3]*mFactor[1] + baseV[3][3]*mFactor[2] + baseV[4][3]*mFactor[3]);
|
|
522 |
buffer[offset+4]= ((tmp1.a[4]*time+tmp1.b[4])*time+tmp1.c[4])*time+tmp1.d[4] + (baseV[1][4]*mFactor[0] + baseV[2][4]*mFactor[1] + baseV[3][4]*mFactor[2] + baseV[4][4]*mFactor[3]);
|
|
523 | 523 |
} |
524 | 524 |
else |
525 | 525 |
{ |
Also available in: Unified diff
Some corrections for the new Noise, it is still fishy though (some suspicious loops form - see it with the ''Dynamics" example app, 2D, 3 points)