Forum Replies Created

  • Geert Schaap

    August 25, 2020 at 9:13 am in reply to: 2d position to sphere

    That seems to do the trick!

    I’m going to see if I can back track the steps to wrap my head around it!

    Thanks again!

  • Geert Schaap

    August 24, 2020 at 9:06 am in reply to: an expression to animate x position of a text layer

    You could use after effects/window/ “Create Nulls From Paths” to trace the selected path.
    This will give you a null object that travels from the start of the path to the end in percentages.
    Parent the text layer to the null object, and link the percentage of that null to the percentage of your trim path.

    There’s a default expression on the null of the traced path that will automatically loop, you can disable that by deleting the expression as a whole. (it won’t effect nothing other then the loop itself).

    Hope this helps!

    Good luck!

  • Geert Schaap

    August 24, 2020 at 9:00 am in reply to: 2d position to sphere

    Hey Dan,

    thanks for replying and taking the effort to look into my attempt at trigonometry!

    So I got the x and y position of a point on a circle, and i’d like to compute the x, y and z position of that point on a sphere with the same radius of the circle with the same origin point. So lack in other words: trying to make an 3d representation of an 2D image of a circle with a point on it.

    Here’s an example on an image.

    So the expression used show relatively good results with the given point in the above example. The expression is applied to the position of the point itself. The point is parented to the center of the sphere.

    But when I input points outside of that quadrant of the circle, the positions seems to shift more drastically. (I changed the radius in the expression to -250 to make the objects appear in front of the AE composition). Here’s another example image:

    It looks like i’m missing some important information to be able to compute the exact x, y and z position of the given point.

    If you could point me in the right direction I would be very grateful!

    Kind regards,

    x = transform.position[0];
    y = transform.position[1];
    r = -250
    phi = Math.sin(y,r);
    theta = Math.atan2(y,x);

    [r*Math.cos(theta)*Math.sin(phi), r*Math.sin(theta)*Math.sin(phi), r*Math.cos(phi)]

  • Geert Schaap

    August 22, 2020 at 8:41 pm in reply to: 2d position to sphere

    First post here, I’m probably aware that i might cross some rules…

    I’m trying to wrap my head around the trigonometry involved to compute the 3D coordinates on a sphere from a 2D (x/y) point. I understand that trigonometry is a subject given on schools in the US, but i’m afraid that my school didn’t touch the subject at all. I got myself a Brilliant subscription and so far so good (not fully used to the english trigonometry terms though!)

    So, to get the corresponding coordinates in need to calculate the following (if I’m correct):

    Theta: tan ( y-coordinate / x-coordinate )
    Phi: sin ( y-coordinate / radiant)

    x = radiant * cos(theta) * sin(Phi)
    y = radiant * sin(theta) * sin(phi)
    z = radiant * cos(phi)

    so then in the expression menu I put the following:

    x = transform.position[0];
    y = transform.position[1];
    r = 250
    phi = Math.sin(y,r);
    theta = Math.atan2(y,x);

    [r*Math.cos(theta)*Math.sin(phi), r*Math.sin(theta)*Math.sin(phi), r*Math.cos(phi)]

    For some reason the coordinates sometimes match, and sometimes completely shift positions.
    I think I might’ve gotten to cocky after getting a few good answers on the brilliant puzzels …

    If somebody could point me in the right direction, I would be very thankful!

    Kind regards,

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