Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Why time in Math.sin and Math.cos?

  • Why time in Math.sin and Math.cos?

    Posted by Lord Scales on May 12, 2007 at 1:51 am

    Hi there. I decided to learn something about practical trigonometry to improve my skill in expressions but I could not get why in Math.sin and Math.cos we use “time”, like Math.cos (time). I know we must get an angle, but I can’t find any relationship between time and angle. I confess I thought in a clock and related it to a circle, but I thought: “No, I am crazy.”

    Could someone explain so why we use time in .cos and .sin?

    Thanks!

    Lord Scales

    Darby Edelen replied 18 years, 12 months ago 3 Members · 3 Replies
  • 3 Replies
  • Filip Vandueren

    May 12, 2007 at 2:32 am

    Well,

    think of time as a variable that automatically gets incremented every frame.

    If you want to animate the result of a Math.cos(), there simply is no easier way to do it than by using a derivative of time.

    Of course nothing’s to stop you from calculating the value of another variable.

    like:

    a=degreesToRadians(rotation);
    Math.cos(a);

    (remember Math wants it’s angles to be expressed in radians)

  • Lord Scales

    May 12, 2007 at 3:34 am

    Thank you!
    Rounded, 1 radian = 57.3

  • Darby Edelen

    May 12, 2007 at 4:52 am

    2 * Math.PI radians = 360

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy