Answers.Body: <p>OK, I can't do the maths, so I'm going straight to hell for this terrible hack instead:</p>
  <ol>
  <li>Make a solid the size of your comp</li>
  <li>Make a shape layer containing two curves the shape of Path A and Path B.  Make them have some thickness (a few pixels).</li>
  <li>Put the shape layer above the white solid.</li>
  <li>Set the white solid to Alpha Invert Track Matte, so two holes are cut in it, using the shape layer to cut them. The shape layer will automatically become invisible.</li>
  </ol>
  <p><a href="https://i.sstatic.net/NHpi5.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/NHpi5.png" alt="enter image description here" /></a></p>
  <ol start="5">
  <li>Put a bright red vertical line behind your white background.  Animate it from left to right.</li>
  <li>Add another white solid as the bottom layer, as a background so you can't see the holes.</li>
  </ol>
  <p><a href="https://i.sstatic.net/eufCE.gif" rel="nofollow noreferrer"><img src="https://i.sstatic.net/eufCE.gif" alt="enter image description here" /></a></p>
  <p>Pre-comp all of the above.</p>
  <p>In your master comp which now contains only your new precomp, use the Tracker to Track Motion on your PreComp.<br />
  Track the small red dots that cut through the holes.
  Attach both trackers to nulls, etc.</p>
  <p>It's really ugly but it works:</p>
  <p><a href="https://i.sstatic.net/WDjkZ.gif" rel="nofollow noreferrer"><img src="https://i.sstatic.net/WDjkZ.gif" alt="enter image description here" /></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-27T13:05:13.317Z
Answers.Text: Hi tomh, thank you for your help. That will work but i didn't clarify that i need a parametric solution cause i need to create multiple graph very quickly. I already have the expression to let the point A follow the path A. Of course I can use the same expression for point B and path B, but in some way i need to set extra math to make point B aligned to point A on vertical axis during time.
Answers.UserDisplayName: mattia c
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-27T16:08:54.560Z
Answers.Text: I think with the right use of comps, you could parameterise  this method
Answers.UserDisplayName: tomh
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-03-25T16:08:56.393Z
Answers.LastActivityDate: 2022-03-25T16:08:56.393Z
Answers.UserDisplayName: tomh
Answers.Body: <p>Hoped this is useful to you
  even if it's quite late<a href="https://i.sstatic.net/Vi32a.gif" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Vi32a.gif" alt="enter image description here" /></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-17T18:38:50.157Z
Answers.Text: Welcome! Please summarize the contents of the linked GIF in case it becomes unavailable in the future.
Answers.UserDisplayName: Michael Liebman
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-16T01:43:55.687Z
Answers.LastActivityDate: 2023-01-16T01:43:55.687Z
Answers.UserDisplayName: Tarotms 
Body: <p><a href="https://i.sstatic.net/w7h4t.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/w7h4t.jpg" alt="enter image description here" /></a></p>
  <p>I have two curves/paths (path A and B) and a null point A that follows path A with an arbitrary speed.</p>
  <p>I need a null point B that follows the path B but with a speed dependent to null point A x position. In other words, point B must follow the path B but accordingly to point A x position.</p>
  <p>As you see in the image, at time 0 and 1, point B has the x position shared with point A  while point B y position is on the intersection of the vertical axis, passing trough point A, and path B.</p>
  <p>I need an expression for null point B position that can do that.</p>
  <p>Thank you for your help.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-03-25T14:30:07.890Z
Comments.Text: Have you looked at path point expressions?  The video on this page looks like it would get you most of the way there.  https://pixelsandpaths.com/posts/tutorials/path-point-expression-language-in-after-effects/
Comments.UserDisplayName: tomh
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-03-25T15:15:22.480Z
Comments.Text: Hmm.. That's a tricky one.  I can track the red path if I parent both sliders together, but then the x positions go out of sync.  Or I can track the x position of A onto B, but then B doesn't follow its own path correctly.  Bet @stib knows.
Comments.UserDisplayName: tomh
Tags: <after-effects><after-effects-expressions>
Title: After Effects: Detect point of intersection between two paths
UserDisplayName: mattia c
ThreadText: # After Effects: Detect point of intersection between two paths
  
  (Asked by: username_0 on 2022-03-25)
  
  [![enter image description here](https://i.sstatic.net/w7h4t.jpg)](https://i.sstatic.net/w7h4t.jpg)
  
  I have two curves/paths (path A and B) and a null point A that follows path A with an arbitrary speed.
  
  I need a null point B that follows the path B but with a speed dependent to null point A x position. In other words, point B must follow the path B but accordingly to point A x position.
  
  As you see in the image, at time 0 and 1, point B has the x position shared with point A while point B y position is on the intersection of the vertical axis, passing trough point A, and path B.
  
  I need an expression for null point B position that can do that.
  
  Thank you for your help.
  
  **Tags:** after-effects, after-effects-expressions
  
  > **Comments:**
  > **username_1**: Have you looked at path point expressions?  The video on this page looks like it would get you most of the way there.  https://pixelsandpaths.com/posts/tutorials/path-point-expression-language-in-after-effects/  
  > **username_1**: Hmm.. That's a tricky one.  I can track the red path if I parent both sliders together, but then the x positions go out of sync.  Or I can track the x position of A onto B, but then B doesn't follow its own path correctly.  Bet @stib knows.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2022-03-25. Score: 0
  
  OK, I can't do the maths, so I'm going straight to hell for this terrible hack instead:
  
  1. Make a solid the size of your comp
  2. Make a shape layer containing two curves the shape of Path A and Path B. Make them have some thickness (a few pixels).
  3. Put the shape layer above the white solid.
  4. Set the white solid to Alpha Invert Track Matte, so two holes are cut in it, using the shape layer to cut them. The shape layer will automatically become invisible.
  
  [![enter image description here](https://i.sstatic.net/NHpi5.png)](https://i.sstatic.net/NHpi5.png)
  
  5. Put a bright red vertical line behind your white background. Animate it from left to right.
  6. Add another white solid as the bottom layer, as a background so you can't see the holes.
  
  [![enter image description here](https://i.sstatic.net/eufCE.gif)](https://i.sstatic.net/eufCE.gif)
  
  Pre-comp all of the above.
  
  In your master comp which now contains only your new precomp, use the Tracker to Track Motion on your PreComp.  
  Track the small red dots that cut through the holes.
  Attach both trackers to nulls, etc.
  
  It's really ugly but it works:
  
  [![enter image description here](https://i.sstatic.net/WDjkZ.gif)](https://i.sstatic.net/WDjkZ.gif)
  
  > **Comments:**
  > **username_0**: Hi username_1, thank you for your help. That will work but i didn't clarify that i need a parametric solution cause i need to create multiple graph very quickly. I already have the expression to let the point A follow the path A. Of course I can use the same expression for point B and path B, but in some way i need to set extra math to make point B aligned to point A on vertical axis during time.  
  > **username_1**: I think with the right use of comps, you could parameterise  this method  
  
  ---
  
  ### Answer by username_2 on 2023-01-16. Score: 0
  
  Hoped this is useful to you
  even if it's quite late[![enter image description here](https://i.sstatic.net/Vi32a.gif)](https://i.sstatic.net/Vi32a.gif)
  
  > **Comments:**
  > **username_3**: Welcome! Please summarize the contents of the linked GIF in case it becomes unavailable in the future.  
  
  ---
  
  