View Single Post
Old 6th June 2003, 10:52   #112
shreyas_potnis
Major Dude
 
shreyas_potnis's Avatar
 
Join Date: Jan 2003
Location: Mumbai, India
Posts: 787
Metaballs dm, I made it some time ago:
code:

init:
dc=1.2;g1=1;g2=1;

Frame:
bf=(bf+.1)/1.1;mov=tx1*tx2*tx3;af=h/w;
tx1=(tx1+dx1*.1)/1.1;ty1=(ty1+dy1*.1)/1.1;
tx2=(tx2+dx2*.1)/1.1;ty2=(ty2+dy2*.1)/1.1;
tx3=(tx3+dx3*.1)/1.1;ty3=(ty3+dy3*.1)/1.1;
tx4=(tx4+dx4*.1)/1.1;ty4=(ty4+dy4*.1)/1.1;
tx5=(tx5+dx5*.1)/1.1;ty5=(ty5+dy5*.1)/1.1;

Beat:
dx1=(rand(200)/100-1)*dc;dy1=(rand(200)/100-1)*dc;
dx2=(rand(200)/100-1)*dc;dy2=(rand(200)/100-1)*dc;
dx3=(rand(200)/100-1)*dc;dy3=(rand(200)/100-1)*dc;
dx4=(rand(200)/100-1)*dc;dy4=(rand(200)/100-1)*dc;
dx5=(rand(200)/100-1)*dc;dy5=(rand(200)/100-1)*dc;
bf=2;

Pixel:
y=y*af;
x1=x+tx1;
y1=y+ty1;

x2=x+tx2;
y2=y+ty2;

x3=x+tx3;
y3=y+ty3;

x4=x+tx4;
y4=y+ty4;

x5=x+tx5;
y5=y+ty6;

d1=pow(sqrt(sqr(x1)+sqr(y1))*g1,g2);
d2=pow(sqrt(sqr(x2)+sqr(y2))*g1,g2);
d3=pow(sqrt(sqr(x3)+sqr(y3))*g1,g2);
d4=pow(sqrt(sqr(x4)+sqr(y4))*g1,g2);
d5=pow(sqrt(sqr(x5)+sqr(y5))*g1,g2);

d=d1*d2*d3*d4*d5;
x=x1+x2+x3+x4+x5;
y=y1+y2+y3+y4+y5;
r=atan2(x1,y1)+mov;

alpha=bf-min(bf,d)



I am quite happy with the end results, dunno if its done before.

http://home.iitb.ac*****~shreyaspotnis
shreyas_potnis is offline   Reply With Quote