The Wiggle Function Control

The Wiggle Function AE

Wiggle (freq, amp) 

This function returns, random values; creating random movements. It can be placed on property such as opacity, scale and position.  The two main arguments are the frequency and amplitude but other numbers are placed in as default if not written wiggle(freq, amp, octaves=1, amp_mult=0.5, t=time):  

  • freq or frequency: How many times per second to move
  • amp or amplitude: How far it moves in the X or Y axis from the original value 
  • octave: additional movement added. 
    • The bigger the number, the more detail the movement will become 
  • amp_mult: Amount of amplitude multiplied by each octave
  • t: time   

What if, you only want to wiggle One Position Property? 

The Position Property has two values the x and y. These values can be seen in an array as [x,y], but what is an array, you may be asking?

  • An Array is an object that is used to store values inside of brackets [ ] called Array elements, separated by a commas. The first array element starts with an order number of zero as its index.  
    • So the [x, y] is  [0, 1]
    • 0 = X value and 1 = Y value

Remember: 2D objects have 2 values in their array [x, y] for Scale, Position, Anchor Point and 3D objects have 3 values [ x, y, z] for Scale, Position, Anchor Points & Orientation. Note: Rotation and Opacity only have one value. Color has four values [red, green, blue, alpha]

1. Horizontal Movement X-Axis: [wiggle (2, 50)[0], value [1]];  

First there is an opening bracket [ than the function wiggle (2, 50)  is written before calling the X-Axis known as [0]. A comma for the next part of the array. Calling on the Y value to be its current number by Typing the word Value before Y-axis or [1] and then the closing bracket ].

2. Vertical Movement Y-Axis: [value[0], wiggle (2, 50)[1] ];

For a vertical movement only, there is a switch of the wiggle and value positions. Since the X-axis will not be moving the text “value” is written first after the opening bracket [ than, calling on X or [0] than a comma , and the wiggle function wiggle (2, 50) followed by Y-axis [1].