多边形交点

发布于 2025-01-03 16:19:52 字数 260 浏览 2 评论 0原文

可能的重复:
多边形相交的简单算法

如何找出切割多边形和多边形的交点在 C# 中用线段顺时针或逆时针切割多边形。

任何建议表示赞赏。

提前致谢。

Possible Duplicate:
A simple algorithm for polygon intersection

How to find out intersection points of cutting polygon and polygon to be cut with their line segments in clock-wise or counter clock-wise in C#.

Any suggestions are appreciated.

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凉月流沐 2025-01-10 16:19:52

听起来更像是家庭作业或面试问题。

  1. 没有 C# API 来表示直线、多边形或查找交点。您需要实现这些类。

  2. 请参阅一些向量代数文本,了解如何将线段表示为向量以及使用向量代数计算交点。

    • 您需要将多边形表示为线向量的集合
    • 计算多边形交点就是计算一个多边形的线段与另一个多边形的线段的交点
  3. 请参阅任何计算机图形学以获得更好的算法来计算多边形交点。< /p>

Sounds more like a homework or an interview problem.

  1. There is no C# api either to represent lines, polygons or to find points of intersection. You need to implement these classes.

  2. Refer to some vector algebra text on how to represent line segments as vectors and using vector algebra to compute points of intersection.

    • you will need to represent polygons as collections of line vectors
    • calculating points of intersection of polygons is simply computing points of intersection of line segments of one polygon with those from another
  3. refer to any computer graphics for better algorithms to compute polygon intersections.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文