Expressions/Scripts/Presets

Moderators: Disciple, zlovatt

 
.H.
Topic Author
Posts: 2
Joined: Mon Feb 25, 2008 7:04 am

choose the start point

Mon Feb 25, 2008 9:33 am

hi,

i'm a new user.

i'm graphic designer but not programmer.

i try to to animation with expression.

variable=effect("Paramètre glissière")("Curseur")
wiggle(2,variable);
ampl = 220 ; // amplitude en pixel
      freq = 1.1 ; // oscillations par seconde
      decroi = 0.5 ; // facteur décroissance
      u = ampl * Math.abs( Math.cos( freq * time * 2 * Math.PI ) ) * Math.exp( - decroi * time ) ;
      position - [ 0 , u ] ;


but i wouldn't start at 0,00 but at 3sec.

how can i do that with this parameters ?

tks
 
Dan Ebberts
Posts: 318
Joined: Sat Jun 26, 2004 10:01 am
Location: Folsom, CA
Contact:

Re: choose the start point

Mon Feb 25, 2008 2:30 pm

Like this (not tested, but should be close):

myStart = 3;
if (time < myStart){
  value
}else{
  t = time - myStart;

  variable=effect("Paramètre glissière")("Curseur")
  wiggle(2,variable);
  ampl = 220 ; // amplitude en pixel
   freq = 1.1 ; // oscillations par seconde
   decroi = 0.5 ; // facteur décroissance
   u = ampl * Math.abs( Math.cos( freq * t * 2 * Math.PI ) ) * Math.exp( - decroi * t ) ;
   position - [ 0 , u ] ;
}


Dan
 
.H.
Topic Author
Posts: 2
Joined: Mon Feb 25, 2008 7:04 am

Re: choose the start point

Mon Feb 25, 2008 4:38 pm

Oh yes!

tks

;)

Who is online

Users browsing this forum: No registered users and 3 guests