find common tangent between point and path

48 views
Skip to first unread message

Carlo Jörges

unread,
Jan 18, 2023, 5:36:19 PM1/18/23
to Paper.js
Hi,
was wondering if someone had an idea how to solve this problem using paperjs — I'm trying to find tangents of a path that pass through a given point (Point A). In the attached drawing I am looking for Point B & C, while Point A and the Path are known. 

Any help is appreciated 🙏



Screenshot 2023-01-18 at 5.27.44 PM.png

M M

unread,
Jan 19, 2023, 1:29:26 AM1/19/23
to Paper.js
Is the path a mathematical formula (so you could calculate the minima)?  Or is it just a more or less randomly drawn path (so you’re looking for the visual bottom of the curve)?

Carlo Jörges

unread,
Jan 19, 2023, 4:46:37 PM1/19/23
to pap...@googlegroups.com
I'm looking to solve it for any given paperjs path object. Essentially what I'm trying to do is draw a long extrusion of a shape towards a vantage point. 

--
You received this message because you are subscribed to a topic in the Google Groups "Paper.js" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/paperjs/XZJdvQqgf5A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to paperjs+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/paperjs/4eb34a23-756a-4484-9a64-58945f242220n%40googlegroups.com.

M M

unread,
Jan 19, 2023, 8:17:04 PM1/19/23
to Paper.js
Every path has a curves array.  You can use CurveLocation with neighboring items in the curves array to traverse the curve and get individual points on the curve.  Then just draw straight lines from these points to your vanishing point.
Reply all
Reply to author
Forward
0 new messages