Copy link to clipboard
Copied
HI
Is there any way to find a specific point on a curved path, that is not an anchor point?
I want to position an object on a path, but I need to know the Y of any given X on that path.
Thanks
Math
Copy link to clipboard
Copied
Oh yes, of course. See this documentation on bezier equation. http://www.tinaja.com/glib/cubemath.pdf
Also, I have seen scripts on this very forum, I think, which position and orient objects on a path.
Copy link to clipboard
Copied
Of course, with the note that Illustrator's curves are Bezier curves, and for Beziers, there may be more than one Y for a given X point (I know - the maths is horrible.)
Good thing most illustrators don't like to use the most extreme looped and self-intersecting curves (Illustrator itself has no qualms in inserting these in, for example, Live Traced results!)
Apart from the exact-but-hard mathematical way, you could expand the curve to straight lines. That can be done recursively to any degree of accuracy. Look for my CircleFill script; it contains a Javascript implementation of the late Maxim Shemanarev's Bezier-to-lines code.
Copy link to clipboard
Copied
study this great library from chris gebab
Copy link to clipboard
Copied
@Math – I found the following enlightened (just to get an idea what we are talking about):
Especially:
figure 5.1 Traversing a curve using de Casteljau's algorithm.
and figure 6.1: Bézier curve splitting. Curve order can be lowered/elevated.
Uwe
Find more inspiration, events, and resources on the new Adobe Community
Explore Now