如何计算两条线是面向还是背向?
给定描述 2 条线的 4 个点,如何快速计算出线 A 是面向还是背向线 B?
同样,如何检查直线 A 是否朝向或远离二次贝塞尔曲线 B?
Given the 4 points describing 2 lines, how do you quickly calculate if line A is facing towards or away from line B?
Similarly, how to check if line A is towards or away from quadratic bezier curve B?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
取候选线的单位向量和指向另一条线的单位法线的点积(有两个单位法线向量)。
如果点积为正,则“远离”; “向”是消极的。
如果您不知道向量,请获取介绍文本并阅读它们。
Take the dot product of the unit vector of the candidate line and the unit normal pointing in the direction you wish for the other (there are two unit normal vectors).
If the dot product is positive, it's "away"; "towards" is negative.
If you don't know vectors, get an intro text and read up on them.