Load example:
Start / Stop
Shuffle
Console
Load example:
Save this one
Init
settings = { nx: 3, ny: 10, nz: 10, n: 500, dst: 2, rx: 0, ry: 0, rz: 0, rdx: 1, rdy: 1, rdz: 1, p: PI, p3: 180/PI, xc: 0, yc: 0, zc: 0, xs: 0, ys:0, zs:0, x1: 0, x2: 0, x3: 0, y1: 0, y2: 0, y3: 0, z1: 0, z2: 0, z3: 0 }
Per frame
rx = rx+rdx; ry = ry+rdy; rz = rz+rdz; xs = sin(rx/p3); ys = sin(ry/p3); zs = sin(rz/p3); xc = cos(rx/p3); yc = cos(ry/p3); zc = cos(rz/p3);
Per point
x1 = sin(i*n/nx); y1 = sin(i*n/ny); z1 = cos(i*n/nz); y2 = y1*xc-z1*xs; z2 = y1*xs+z1*xc; x2 = z2*ys+x1*yc; z3 = z2*yc-x1*ys; x3 = x2*zc-y2*zs; y3 = y2*zc+x2*zs; x = x3/(1+z3/dst); x/=2; y = y3/(1+z3/dst); y/=2;
On shuffle
n=100 + round( 500 * random() ); nx=2 + round( 20 * random() ); ny=2 + round( 20 * random() ); nz=2 + round( 20 * random() ); rdx=1 + round( 2 * random() ); rdy=1 + round( 2 * random() ); rdz=1 + round( 2 * random() );