Algorithm to add a path point, preserving path shape?

46 views
Skip to first unread message

Rick Mohr

unread,
Dec 9, 2022, 5:09:32 PM12/9/22
to Paper.js
Please see writeup and sketches here. Any thoughts appreciated!

Rick


petejo...@gmail.com

unread,
Dec 10, 2022, 10:15:02 AM12/10/22
to Paper.js
Assuming that you have a mousetool that can be used to click on a path then :
let location = hitResult.location;
 path.divideAt(location); 

Pete

Rick Mohr

unread,
Dec 10, 2022, 10:39:49 AM12/10/22
to Paper.js
Thanks Pete, somehow missed that in the doc. 

I also found (and implemented, oops) this description of the algorithm likely used by divideAt.

Reply all
Reply to author
Forward
0 new messages