Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
ADOBE AFTER EFFECTS: ForumAE BasicsAE ExpressionsTutorialsArticlesPodcastsMotion GraphicsTrainingCinema 4D

Bobbing in Water REDUX REDUX

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


cow
Bobbing in Water REDUX REDUX
by David Rodriguez on Jun 23, 2008 at 3:16:00 pm

The expressions I am using..
on position

xAmp = 3; //height of undulations (pixels)
xFreq = .3; //undulations per second
xSpeed = 150; //speed of wave (pixels per second)

wl = xSpeed/xFreq; //wavelength (pixels)
phaseOffset = ((position[0]%wl)/wl)*2*Math.PI;
y = xAmp*Math.sin(2*Math.PI*xFreq*time + phaseOffset);

//--NEW

swayAmp = 100; //amplitude of sway
swayFreq = .25; //frequency of sway
x = swayAmp * Math.sin(time * swayFreq);

//-----
value + [x,y]



on rotation

xFreq = .3; //undulations per second
xSpeed = 150; //speed of wave (pixels per second)
damping = 15; //undulation damping factor

wl = xSpeed/xFreq; //wavelength (pixels)
phaseOffset = ((position[0]%wl)/wl)*2*Math.PI;
theta = Math.atan(Math.cos(2*Math.PI*xFreq*time + phaseOffset));
radiansToDegrees(theta)/damping;


Is there any way to make the upward motion be faster than the downward motion? Say 50% faster?

Any help is much appreciated.






Return to Posts Index   •   Read Entire Thread   •   Reply To This Post


Current Message Thread:


Related Threads:
Bobbing in Water REDUX



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                Add Bold Tag To Message (JavaScript required)

To put any item inside this tag:

1. Highlight the desired text
2.Click this buttonAdd Italic Tag To Message (JavaScript required)

To put any item inside this tag:

1. Highlight the desired text
2.Click this buttonAdd Underline Tag To Message (JavaScript required)

To put any item inside this tag:

1. Highlight the desired text
2.Click this buttonAdd Image Link Tag To Message (JavaScript required)

To put any item inside this tag:

1. Highlight the desired text
2.Click this buttonAdd URL Link Tag To Message (JavaScript required)

To put any item inside this tag:

1. Highlight the desired text
2.Click this button

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.



FORUMSLIBRARYPODCASTSBLOGSMAGAZINESERVICESNEWSLETTERSNEWSSTOREEVENTS

© CreativeCOW.net All rights are reserved.

[Top]