Skip to main content
Participant
November 26, 2021
Question

expression

  • November 26, 2021
  • 2 replies
  • 243 views

Hi 

I am just wondering, why you need period before numbers sometimes when you are writing expressions.

Like wiggle(.5,100) for example.

what does this period before 5 mean?

I appreciate if you could tell me what it is or refer to some websites that explain it well.

Thank you so much.

Yuki

This topic has been closed for replies.

2 replies

Andrew Yoole
Inspiring
November 26, 2021

The period in the expression you posted is simply an abbreviation for 0.5

 

So in your wiggle example, where the first parameter (.5) represents how many times the wiggle value should change per second (frequency) it's asking for a new wiggle value every two seconds (0.5).  If you set the value to 1, it would return a new value every second.  If you set it to 2, it would return two new values per second.  If you set it to .25 or 0.25, which is one quarter of one, it would set a new value once every 4 seconds.

 

That might seem a little confusing because of the maths, but the main answer to your question is simply that decimals don't need leading zeroes in an expression, so .5 is just short for 0.5.

YUKI1234Author
Participant
November 26, 2021

Thank you Andrew for crystal clear explanation!!

I totally get it!! 

Community Expert
November 26, 2021

The variables in Wiggle work like this:

 

wiggle(freq, amp, octaves = 1, amp_mult = .5, t = time)

 

Usually, all you use is the frequency and amplitude. Your example wiggles the property value between 0 and 100 every half second. Did you follow that?

 

Here's a good explanation of the wiggle operator.

https://www.schoolofmotion.com/blog/wiggle-expression

YUKI1234Author
Participant
November 26, 2021

ohhh i did not know that!! 

Thank you Rick for explaining and website reference!

I totally got it now!