Winamp & SHOUTcast Forums > AVS How to create cubic room DM

 19th February 2012, 15:33 #2 patipano Junior Member   Join Date: Jan 2012 Posts: 20 Example Code (UnConeD - Watercolorcube): ```code: Init: t=rand(100);rx=1.57;ry=1.57;rx=0;ry=0;pt=0;bt=0 Frame: sd=sd*.9+getspec(0,.1,0)*.1; sd2=sd2*.9+getspec(0,.05,0)*.1; t=t+0.19+sd*.75;pt=pt+.25+sd2*.5; ox=sin(pt*.1231);oy=sin(pt*.1);oz=cos(pt*.0913); ol=-bt*.5+3/sqrt(sqr(ox)+sqr(oy)+sqr(oz)); ox=ox*ol;oy=oy*ol;oz=oz*ol; rxo=sin(t*.0373)*cos(t*0.0563)*sin(cos(t*.0631))*.5; ryo=sin(t*.0511)*cos(t*0.071)*sin(cos(t*.0415))*.5; ry=-atan2(ox,oz)+ryo; rx=-atan2(oy,sqrt(sqr(ox)+sqr(oz)))+rxo; rz=sin(t*.053)*cos(t*.117)*sin(cos(t*.0651)); cx=cos(rx);sx=sin(rx);cy=cos(ry);sy=sin(ry);cz=cos(rz);sz=sin(rz); bt=bt*.9;af=h/w Beat: pt=pt+55*max(0,getspec(0,.1,0)*3-1.5); bt=1 Pixel: y=y*af; dx1=x*cz-y*sz; dy1=x*sz+y*cz; dy2=dy1*cx-1.2*sx; dz2=dy1*sx+1.2*cx; dx3=dx1*cy-dz2*sy; dz3=dx1*sy+dz2*cy; k1=((oz-sign(dz3))/dz3); k1=if(below(k1,0),-1000,k1); k2=((oy-sign(dy2))/dy2); k2=if(below(k2,0),-1000,k2); k3=((ox-sign(dx3))/dx3); k3=if(below(k3,0),-1000,k3); k=max(max(k1,k2),k3); ix=-ox+dx3*k;iy=-oy+dy2*k;iz=-oz+dz3*k; alpha=bnot(equal(k,-100)); x=if(equal(k,k3),iy,ix)*.9; y=if(equal(k,k1),iy,iz)*.9; d=max(abs(x),abs(y)); alpha=if(bor(above(k,10),below(k,0)),0,1.8-sqr(d+.5)+.2); ``` This is a box-like(or Cube Surface) code