> FrAid
 

3D Transfromations Flash Demo

FrAid scripts used in the demo

Serpinski 3D Pyramide

clear();
ff(r,a,b,x,y,z)=r*(  cos(b)*x + sin(a)*sin(b)*y + cos(a)*sin(b)*z );
gg(r,a,b,x,y,z)=r*(             cos(a)       *y - sin(a)       *z );
hh(r,a,b,x,y,z)=r*( -sin(b)*x + sin(a)*cos(b)*y + cos(a)*cos(b)*z );

r1=.5;
a1=0;
b1=0;
xOff1=0.2;
yOff1=0.4;
zOff1=0;
controlVar(r1, a1, b1, xOff1, yOff1, zOff1 );

f1(x,y,z)=ff(r1,a1,b1,x,y,z);
g1(x,y,z)=gg(r1,a1,b1,x,y,z);
h1(x,y,z)=hh(r1,a1,b1,x,y,z);

r2=.5;
a2=0;
b2=0;
xOff2=.55;
yOff2=0;
zOff2=0;
controlVar(r2, a2, b2, xOff2, yOff2, zOff2 );

f2(x,y,z)=ff(r2,a2,b2,x,y,z);
g2(x,y,z)=gg(r2,a2,b2,x,y,z);
h2(x,y,z)=hh(r2,a2,b2,x,y,z);

r3=.5;
a3=0;
b3=0;
xOff3=0.25;
yOff3=.15;
zOff3=.5;
controlVar(r3, a3, b3, xOff3, yOff3, zOff3 );

f3(x,y,z)=ff(r3,a3,b3,x,y,z);
g3(x,y,z)=gg(r3,a3,b3,x,y,z);
h3(x,y,z)=hh(r3,a3,b3,x,y,z);

r4=.5;
a4=0;
b4=0;
xOff4=0;
yOff4=0;
zOff4=0;
controlVar(r4, a4, b4, xOff4, yOff4, zOff4 );

f4(x,y,z)=ff(r4,a4,b4,x,y,z);
g4(x,y,z)=gg(r4,a4,b4,x,y,z);
h4(x,y,z)=hh(r4,a4,b4,x,y,z);

transform3( 
"zTransform3PlugInDemo2",
f1,xOff1,
g1,yOff1,
h1,zOff1,
f2,xOff2,
g2,yOff2,
h2,zOff2,
f3,xOff3,
g3,yOff3,
h3,zOff3,
f4,xOff4,
g4,yOff4,
h4,zOff4,
"pyramid.3d");
       

Cube 3d

clear();

ff(r,x,y,z)=r*x; //the generic transformation
gg(r,x,y,z)=r*y;
hh(r,x,y,z)=r*z;

r=.3; 

//the parameters I want to control for the first transform
xOff1=-.660; yOff1=-.660; zOff1=-.660;

f1(x,y,z)=ff(r,x,y,z); //the first transform
g1(x,y,z)=gg(r,x,y,z);
h1(x,y,z)=hh(r,x,y,z);

xOff2=0; yOff2=0; zOff2=0;
f2(x,y,z)=ff(r,x,y,z);
g2(x,y,z)=gg(r,x,y,z);
h2(x,y,z)=hh(r,x,y,z);

xOff3=0; yOff3=-1.220; zOff3=-1.220;
f3(x,y,z)=ff(r,x,y,z);
g3(x,y,z)=gg(r,x,y,z);
h3(x,y,z)=hh(r,x,y,z);

xOff4=0; yOff4=0; zOff4=-1.220;
f4(x,y,z)=ff(r,x,y,z);
g4(x,y,z)=gg(r,x,y,z);
h4(x,y,z)=hh(r,x,y,z);

xOff5=-1.22; yOff5=-1.220; zOff5=0;
f5(x,y,z)=ff(r,x,y,z);
g5(x,y,z)=gg(r,x,y,z);
h5(x,y,z)=hh(r,x,y,z);

xOff6=0; yOff6=-1.220; zOff6=0;
f6(x,y,z)=ff(r,x,y,z);
g6(x,y,z)=gg(r,x,y,z);
h6(x,y,z)=hh(r,x,y,z);

xOff7=-1.220; yOff7=0; zOff7=-1.220;
f7(x,y,z)=ff(r,x,y,z);
g7(x,y,z)=gg(r,x,y,z);
h7(x,y,z)=hh(r,x,y,z);

xOff8=-1.220; yOff8=0; zOff8=0;
f8(x,y,z)=ff(r,x,y,z);
g8(x,y,z)=gg(r,x,y,z);
h8(x,y,z)=hh(r,x,y,z);

xOff9=-1.220; yOff9=-1.220; zOff9=-1.220;
f9(x,y,z)=ff(r,x,y,z);
g9(x,y,z)=gg(r,x,y,z);
h9(x,y,z)=hh(r,x,y,z);

controlVar(r, xOff1, yOff1, zOff1 ); //variable controller

transform3(  "zTransform3PlugInDemo3",
             f1,xOff1, //first
             g1,yOff1,
             h1,zOff1,
             f2,xOff2, //second
             g2,yOff2,
             h2,zOff2,
             f3,xOff3, //third
             g3,yOff3,
             h3,zOff3,
             f4,xOff4,
             g4,yOff4,
             h4,zOff4,
             f5,xOff5,
             g5,yOff5,
             h5,zOff5,
             f6,xOff6,
             g6,yOff6,
             h6,zOff6,
             f7,xOff7,
             g7,yOff7,
             h7,zOff7,
             f8,xOff8,
             g8,yOff8,
             h8,zOff8,
             f9,xOff9,
             g9,yOff9,
             h9,zOff9,
             "pyramid.3d");