Find lines intersection

 Posts: 3
 Joined: December 22nd, 2008, 8:30 am
The X axis is time and the Y axes is another parameter. The white line moves straight forward from 1 to 11 and the white circle moves exactly on the red line because the red line is a path i did in Photoshop and put in the circle position property. I want the white circle to be always positioned in the intersection between the white and the red line. I tryed to link the x axes of the circle to the x axes of the line and leave its Y values but in this way the circle goes off the red line...
Thenks for the help!
Fun problem. At first crack, I would say that you need to have the line follow the circle instead of viceversa, by expressionlinking the line's (x) position to the circle. so the line's position would have an expression something like:
But I realize this may be a problem if you want the line to be moving at a constant speed from left to right, in which case this requires more thought on my or someone's part ...
Code: Select all
[thisComp.layer("circle").position[0], value[1]]

 Posts: 3
 Joined: December 22nd, 2008, 8:30 am
You're right, this is the problem. The lines moves at a constant speed so you should tell to the circle to move faster or slower. It's difficult to understand how I can tell to the circle to go faster without crossing the line. Very nice question it seems!!
Should be simple. Just some quick thoughts:
 determine the ratio of the line traveling speed compared to the duration of the graph curve draw on
 feed the resulting multiplier into a valueAtTime() expression referencing the line for X and the respective Y value from the curve
Mylenium
 determine the ratio of the line traveling speed compared to the duration of the graph curve draw on
 feed the resulting multiplier into a valueAtTime() expression referencing the line for X and the respective Y value from the curve
Mylenium
[Pour MylÃ¨ne, ange sur terre]
Thunderino,
If this is still relevat, please post a project file so we can understand better how you've built the elements,
and understand the problem better, and hopefully could find a solution.
If I understood the problem correctly, this is not as simple as it seems, but I have an idea how to solve it.
I just have to see your project file to see if I understood the problem correctly.
Koby.
If this is still relevat, please post a project file so we can understand better how you've built the elements,
and understand the problem better, and hopefully could find a solution.
If I understood the problem correctly, this is not as simple as it seems, but I have an idea how to solve it.
I just have to see your project file to see if I understood the problem correctly.
Koby.