Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Inverted GaussRandom()

  • Inverted GaussRandom()

    Posted by Charl Naude on November 25, 2020 at 1:52 am

    So gaussRandom(0,10) the probability of a random value is closer to the middle value (5).

    Is there an easy way to get an inverted gaussRandom(0,10), where the probability of a random value is closer to the min (0) and max (10) values? (See image)

    This is my current solution:

    seedRandom(index+1,true);
    minValue = 0;
    maxValue = 10;
    middleValue = (maxValue - minValue)/2;
    a = gaussRandom(minValue,maxValue); //temporary gaussRandom
    if (a < middleValue) {
    b = linear(a,minValue,middleValue,middleValue,minValue);
    } else {
    b = linear(a,middleValue,maxValue,maxValue,minValue);
    }
    b; // inverted gaussRandom
    Filip Vandueren replied 5 years, 5 months ago 2 Members · 1 Reply
  • 1 Reply
  • Filip Vandueren

    November 25, 2020 at 12:55 pm

    try this:

    ( gaussRandom(0,10) + 5 ) % 10;

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