SIGN IN
::
SPONSORS
::
ABOUT US
::
CONTACT US
FORUMS
TUTORIALS
MAGAZINE
DVDs
BOOKS
PODCASTS
EVENTS
SERVICES
NEWSLETTER
NEWS
BLOGS
ADOBE AFTER EFFECTS:
Forum
AE Basics
AE Expressions
Tutorials
Articles
Podcasts
Motion Graphics
Training
Cinema 4D
Re: object on a string damping
Cow Forums
:
Adobe After Effects Expressions
VIEW POSTS
•
ADD A NEW POST
•
SEARCH
•
CHANGE FORUM
Return to Posts Index
•
Read Entire Thread
•
Reply To This Post
Re: object on a string damping
by
Dan Ebberts
on Jun 13, 2008 at 4:59:23 pm
Try this:
g = 3500; // gravity (pixels/second/second)
floor = 400;
e = .35; //elasticity
b = floor - position[1];
h = b;
T = Math.sqrt(2*h/g);
if (time < T){
y = - g*time*time/2 + b;
}else{
Vy = g*T;
while (true){
Vy *= e;
t = T;
T += 2*Vy/g;
if (time < T){
t = time - t;
y = Vy*t - g*t*t/2;
break;
}else if (T - t < thisComp.frameDuration){
y = 0;
break;
}
} // end while
}
[value[0], floor - y]
Dan
Return to Posts Index
•
Read Entire Thread
•
Reply To This Post
Current Message Thread:
object on a string damping
by Göran Thorén on Jun 13, 2008 at 1:22:13 pm
Re: object on a string damping
by Dan Ebberts on Jun 13, 2008 at 4:59:23 pm
Re: object on a string damping
by Göran Thorén on Jun 15, 2008 at 9:00:33 pm
Note:
If you are a registered user and you
do not
see your name and email in the two respective fields above, you may reset your account cookies by clicking
here
. Your post
will not be accepted
if the name and email provided above are not currently registered in our database.
Name
E-Mail Address
Subject
E-Mail me when someone responds
Just This Message
Entire Thread
None
Message
Note:
The following characters are HTML command characters, and may cause parts of your post to disappear, if not used correctly: < > &. To include any portion of the post in your response, highlight the desired text and hit the "Q" key. For more on how to post,
click here
.
Please post Expressions Code in the box below:
Add your message signature
Note:
By clicking "Post Direct" button above, you are agreeing to the Creative Cow's
Code of Conduct
.
FORUMS
•
TUTORIALS
•
MAGAZINE
•
DVDs
•
BOOKS
•
PODCASTS
•
EVENTS
•
SERVICES
•
NEWSLETTER
•
NEWS
•
BLOGS
©
CreativeCOW.net
All rights are reserved.
[
Top
]