Forum Replies Created

  • Christiaan Vee

    November 30, 2022 at 8:57 am in reply to: Help – Exponential Grid

    Thanks for taking the time to explain the for loop. There are a couple of really useful things to take away. I had guessed that I would need an accumulating variable in there too, but didn’t know how to put it together.

  • Christiaan Vee

    November 29, 2022 at 4:26 pm in reply to: Help – Exponential Grid

    [ edit: don’t know how to delete my post, I’ve figured out that I can use Math.pow(value, exponent) ]

    Both are interesting solutions. I have a similar but different question. I’m trying to write something exponential and want to use a for loop, but I’m getting stuck. In the following example R is a slider with a value around 1.2 and x is the power I want R multiplied to. This is then multiplied with the Y value to get an exponential curve of dots.


    R = thisComp.layer(“settings”).effect(“R”)(“Slider”);

    x = 13;

    for (i=1; i < x; i++){R == R * R};

    [value[0], value[1] * R];


    R is remaining at the first value, not being multiplied by 13 times. Honestly, I don’t have a firm grasp on for loops. Alternatively is there an expression for R to the power X?

    Thanks

  • Thank you for the reply and the resources, it’s really helpful.

  • A work around I’m using is to copy the script into a text layer and to reference that in the other layer. I’d still be interested to hear if I can do it externally.

    eval(thisComp.layer(“colour A”).text.sourceText.value);

  • Thanks for the reply, I agree I don’t think it’ll work.

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