dirkdeftly
25th September 2002 00:36 UTC
Favorite SSC: Color-changing forward (orthogonal) projection 4D rotating cube
Lines
Init
:
n=58;sqrt2=sqrt(2);pit=acos(-1)/3;iwxt=rand(100)/1000-0.05;iwyt=rand(100)/1000-0.05;iwzt=rand(100)/1000-0.05;ixyt=rand(100)/1000-0.05;ixzt=rand(100)/1000-0.05;iyzt=rand(100)/1000-0.05;hue=rand(100)/20;sr=rand(100)/100;sg=rand(100)/100;sb=rand(100)/100;s=0.01;
Beat:
iwxt=rand(100)/1000-0.05;iwyt=rand(100)/1000-0.05;iwzt=rand(100)/1000-0.05;ixyt=rand(100)/1000-0.05;ixzt=rand(100)/1000-0.05;iyzt=rand(100)/1000-0.05;hue=rand(100)/20;sr=rand(100)/100;sg=rand(100)/100;sb=rand(100)/100;s=-s;
Frame:
p=0;wxt=wxt+iwxt;wyt=wyt+iwyt;wzt=wzt+iwzt;xyt=xyt+ixyt;xzt=xzt+ixzt;yzt=yzt+iyzt;cwx=cos(wxt);swx=sin(wxt);cwy=cos(wyt);swy=sin(wyt);cwz=cos(wzt);swz=sin(wzt);cxy=cos(xyt);sxy=sin(xyt);cxz=cos(xzt);sxz=sin(xzt);cyz=cos(yzt);syz=sin(yzt);sr=sr*0.94;sg=sg*0.94;sb=sb*0.94;hue=hue+s;
Point:
p=p+1;
w1=equal(p,2)+equal(p,9)+equal(p,15)+equal(p,21)+equal(p,22)+equal(p,23)+equal(p,24)+equal(p,25)+equal(p,26)+equal(p,28)+equal(p,29)+equal(p,30)+equal(p,31)+equal(p,32)+equal(p,34)+equal(p,35)+equal(p,36)+equal(p,37)+equal(p,38)+equal(p,39)+equal(p,40)+equal(p,42)+equal(p,43)+equal(p,44)+equal(p,45)+equal(p,53)+equal(p,54)+equal(p,55)+equal(p,56)+equal(p,57)+equal(p,58)-0.5;
x1=equal(p,4)+equal(p,11)+equal(p,17)+equal(p,18)+equal(p,19)+equal(p,20)+equal(p,21)+equal(p,26)+equal(p,27)+equal(p,28)+equal(p,29)+equal(p,30)+equal(p,31)+equal(p,40)+equal(p,41)+equal(p,42)+equal(p,43)+equal(p,44)+equal(p,45)+equal(p,46)+equal(p,48)+equal(p,49)+equal(p,50)+equal(p,51)+equal(p,52)+equal(p,53)+equal(p,55)+equal(p,56)+equal(p,57)+equal(p,58)-0.5;
y1=equal(p,6)+equal(p,13)+equal(p,14)+equal(p,15)+equal(p,16)+equal(p,17)+equal(p,25)+equal(p,26)+equal(p,27)+equal(p,28)+equal(p,30)+equal(p,31)+equal(p,32)+equal(p,33)+equal(p,34)+equal(p,36)+equal(p,37)+equal(p,38)+equal(p,45)+equal(p,46)+equal(p,47)+equal(p,48)+equal(p,50)+equal(p,51)+equal(p,52)+equal(p,53)+equal(p,54)+equal(p,55)+equal(p,57)+equal(p,58)-0.5;
z1=equal(p,8)+equal(p,9)+equal(p,10)+equal(p,11)+equal(p,12)+equal(p,13)+equal(p,19)+equal(p,23)+equal(p,31)+equal(p,32)+equal(p,33)+equal(p,34)+equal(p,35)+equal(p,36)+equal(p,38)+equal(p,39)+equal(p,40)+equal(p,41)+equal(p,42)+equal(p,44)+equal(p,45)+equal(p,46)+equal(p,47)+equal(p,48)+equal(p,49)+equal(p,50)+equal(p,52)+equal(p,53)+equal(p,54)+equal(p,55)+equal(p,56)+equal(p,57)-0.5;
w2=w1*cwx+x1*swx;x2=w1*swx-x1*cwx;
w3=w2*cwy+y1*swy;y2=w2*swy-y1*cwy;
w4=w3*cwz+z1*swz+sqrt2;z2=w3*swz-z1*cwz;
x3=x2*cxy+y2*sxy;y3=x2*sxy-y2*cxy;
x4=x3*cxz+z2*sxz;z3=x3*sxz-z2*cxz;
y4=y3*cyz+z3*syz;
x=x4;y=y4;
red=abs(sin(hue+sr));
green=abs(sin(hue+sg+pit));
blue=abs(sin(hue+sb+pit*2));
Favorite DM: Somethin for a swirling pulsating mass
Rectangularcoordinates
,bilinearfilteringandwrapenabled(16x12gridsize)
Frame:
xt1=xt1+ixt1;xt2=xt2+ixt2;xt3=xt3+ixt3;
yt1=yt1+iyt1;yt2=xt2+ixt2;yt3=yt3+iyt3;
bf=bf*0.9;
Beat:
xf1=rand(20)/3;xf2=rand(20)/3;xf3=rand(20)/3;
ixt1=rand(100)/500-0.1;
ixt2=rand(100)/500-0.1;
ixt3=rand(100)/500-0.1;
yf1=rand(20)/3;yf2=rand(20)/3;yf3=rand(20)/3;
iyt1=rand(100)/500-0.1;
iyt2=rand(100)/500-0.1;
iyt3=rand(100)/500-0.1;
bf=1;
Pixel:
y=y*(0.94-bf/10)+(sin(x*xf1+xt1)+sin(x*xf2+xt2)+sin(x*xf3+xt3))/20*bf;
x=x*(0.94-bf/10)+(sin(y*yf1+yt1)+sin(x*yf2+yt2)+sin(x*yf3+yt3))/20*bf;
But don't you dare use either of them in your packs without giving me full credit :hang:
Nic01
25th September 2002 04:50 UTC
Favorite SSC :
Frame : p=0
Pixel :
p=p+1;
x1=if(equal(p%18,1)+equal(p%18,2)+equal(p%18,5)+equal(p%18,6)+equal(p%18,7)+equal(p%18,10)+equal(p%18,16)+equal(p%18,17),r,-r)+p1/2+1.1-pp*2.5;
y1=if(equal(p%18,1)+equal(p%18,4)+equal(p%18,5)+equal(p%18,6)+equal(p%18,9)+equal(p%18,10)+equal(p%18,11)+equal(p%18,12),r,-r)+pp/2-1.6;
z1=if(below(p%18,6)+equal(p%18,12)+equal(p%18,13)+equal(p%18,16),r,-r)+getosc(p1/25,0,0);
c=1-(equal(p%18,16)+below(p%18,2));
red=c;
blue=c;
green=c;
The rest is the 3D SSC code. It's a wee little cube generator which I'm too lazy to optimize =P Not exactly my *favorite*... there's too many for me to choose from =D
Of course, I should have a glass-ish framed cube coming somtime later...
Of course, I could've posted the Beat Counter, but it's holyf***ing long...
Oh, what the heck!
BEAT : b1=1;
FRAME : nn=if(above(nn,9),nn-10,nn+b1);n=if(bor(bor(equal(nn,0),equal(nn,2)),bor(equal(nn,4),equal(nn,5))),7,if(equal(nn,1),2,if(equal(nn,3),10,if(bor(equal(nn,6),above(nn,7)),8,4))));b1=0;
PIXEL :
p=n*i-i;
x=if(equal(nn,9),if(bor(band(above(p,1),below(p,5)),equal(p,7)),0.25,0),if(equal(nn,8),if(bor(bor(below(p,3),equal(p,5)),equal(p,6)),0,0.25),if(equal(nn,7),if(above(p,1),0.25,0),if(equal(nn,6),if(bor(band(above(p,1),below(p,5)),equal(p,7)),0,0.25),if (equal(nn,5),if(bor(bor(equal(p,1),equal(p,4)),equal(p,5)),0.25,0),if(equal(nn,4),if(below(p,3),0,0.25),if(equal(nn,3),if(equal(p,1),0,if(equal(p,5),0,if(Equal(p,9),0,0.25))),if(equal(nn,2),if(bor(bor(equal(p,1),equal(p,4)),equal(p,5)),0,0.25),if(equ al(nn,1),if(bor(below(p,3),equal(p,5)),0,0.25),if(equal(nn,0),if(bor(below(p,3),equal(p,5)),0,0.25),0))))))))))/3+0.8;
y=if(equal(nn,9),if(below(p,3),0.25,if(bor(equal(p,6),equal(p,7)),0,-0.25)),if(equal(nn,8),if(bor(bor(equal(p,1),equal(p,4)),equal(p,5)),-0.25,if(bor(equal(p,2),equal(p,3)),0.25,0)),if(equal(nn,7),if(below(p,3),-0.25,0.25),if(equal(nn,6),if(below(p,3),-0.25,if(bor(equal(p,6),equal(p,7)),0,0.25)),if(equal(nn,5),if(below(p,3),-0.25,if(bor(equal(p,3),equal(p,4)),0,0.25)),if(equal(nn,4),if(bor(equal(p,1),equal(p,4)),-0.25,if(equal(p,5),0.25,0)),if(equal(nn,3),if(below(p,4),-0.25,if(band(above(p,3),below(p,7)),0,0.25)),if(equal(nn,2),if(below(p,3),-0.25,if(bor(equal(p,3),equal(p,4)),0,0.25)),if(equal(nn,1),if(bor(equal(p,1),above(p,3)),-0.25,0.25),if(equal(nn,0),if(bor(equal(p,1),above(p,3)),-0.25,0.25),0))))))))))/3
That was only the 1's section... I believe you change b1 into 1*(10^-n) for bigger place values (N is any number, not the number of points, of course)
Fav DM?
Sorry, can't decide :p
EDIT : Tell me if you want me to divide that big code into smaller bits...
jheriko
25th September 2002 08:35 UTC
Favorite SSC:
This one draws a solid triangle with vertices (ax,ay,az), (bx,by,bz), (cx,cy,cz), with some very basic on beat response:
Init: n=21;ax=1;ay=1;az=1;bx=0;by=1;bz=0;cx=1;cy=0;cz=-1;axadd=(ax-cx)/(0.5*(n+1));ayadd=(ay-cy)/(0.5*(n+1));azadd=(az-cz)/(0.5*(n+1));bxadd=(bx-cx)/(0.5*(n+1));byadd=(by-cy)/(0.5*(n+1));bzadd=(bz-cz)/(0.5*(n+1));
On Beat: drz=if(below(drz,0.01),0.2,drz);
Per Frame: drz=drz*0.9;q=0;crz=cos(rz);srz=sin(rz);cry=cos(ry);sry=sin(ry);crx=cos(rx);srx=sin(rx);rx=rx+0.01;ry=ry-0.01;rz=rz+drz;
Per Point:
q=q+1;
x1=if(equal(q%2,0),ax-axadd*(q-2)*0.5,bx-bxadd*(q-1)*0.5);
y1=if(equal(q%2,0),ay-ayadd*(q-2)*0.5,by-byadd*(q-1)*0.5);
z1=if(equal(q%2,0),az-azadd*(q-2)*0.5,bz-bzadd*(q-1)*0.5);
x2=x1*crz-y1*srz;
y2=x1*srz+y1*crz;
z2=z1;
x3=x2*cry+z2*sry;
y3=y2;
z3=-x2*sry+z2*cry;
x1=x3;
y1=y3*crx-z3*srx;
z1=y3*srx+z3*crx;
x=x1/(3+z1);
y=y1/(3+z1);
x=x*h/w;
And my favorite DM has got to be:
Pixel:
d=d/(1+y)
Because it can be changed into so many different and complex 3d forms, with some simple changes, and because it is so much faster than the usual method of generating a plane.
(God damn this window is wide - even at 1280x1024)