Stäng Login avstängt
debunk

debunk

(offline) 45 år, Man, Stockholm, Stockholms Län

Blev medlem:
Back in the days
Senast inloggad:
2008-08-10
...
1
Bigups

Om debunk

Jag bjuder på en expression. 3D partiklar i AE.

Position:
g=100; //gravity
w=0; //wind
wdir=0; //wind direction (0 = from left)
vmin=700; //minimum initial velocity
vmax=1000; //maximum initial velocity
amin=0; //minimum launch angle from vertical
amax=110; //maximum launch angle from vertical
d=4; //drag coeffecient

birth=effect("life").param("Point")[0];
life=effect("life").param("Point")[1];
origin=this_comp.layer("Null 1").position.value_at_time(birth);
age=time-birth;
seed_random(1,true);
s=random(vmin,vmax);//initial speed
v_e=this_comp.layer("Null 1").position.velocity_at_time(birth); //emitter velocity
a=degrees_to_radians(random(amin,amax)); //angle from vertical
r=degrees_to_radians(random(360)) //rotation around y axis
x=s*Math.sin(a)*Math.cos(r);
y=-s*Math.cos(a);
z=s*Math.sin(a)*Math.sin(r);
v=[x,y,z]+v_e;
new_speed=length(v);
unit_v=normalize(v);

if (d0){
delta_p=new_speed*(1-Math.exp(-d*age))/d;
}else{
delta_p=age*new_speed;
}
delta_w=w*age;
delta_g=g*age*age/2;

wa=degrees_to_radians(wdir);

origin + delta_p*unit_v + [delta_w*Math.cos(wa),0,delta_w*Math.sin(wa)] + [0,delta_g,0]

Kommentarer

Inga kommentarer än

Kommentera

Logga in eller registera dig för att skriva

Senaste händelser

Vänner

  • jajoo
  • Rastaman872
  • Chucko
  • chalwaa
  • RootsBwoy
  • eeeeey
  • ViRuSLuNGaN
  • RiotGirl
  • Reggae-Anders
  • LångaFägget
  • Joakim Romantic
  • Toosthoosh
  • aykay
  • ridd
Antal vänner:
23