有一系列的多边形坐标,现在需要用一个矩形的区域来将他们裁剪,超过矩形区域的点删除或与矩形边界求交,请问有没有什么高速的方法? 分别与各边进行切割的算法如果可以达到惊人的速度也可.
解决方案 »
- 很迷惘的一个winform Socket外网点对点传送文件的问题
- bulk insert导入的问题 在线等,马上结贴
- C# 中 需要将一个窗口初始化时放在屏幕的最右边
- 帮忙啦!多线程问题
- 问一个基础问题,关于控件随窗体大小变化的问题
- 弱智问题:怎样实现文件浏览窗口?
- C#定义链表的问题
- 奇怪的问题.dropdownlist控件双击后产生的事件不是对应SELECTCHANGE吗?
- 我想把发布时间的显示时间格式定为yyyy/MM/dd HH:mm:ss
- 我原来是学vb,现在想转向.net.但在vb.net与c#的取舍上出现了徘徊.请问二者到底有何区别,各善长??
- 如何把DataGridView中的cell格式全部变成RadioButton格式,他默认没有这种格式,谢谢。。
- 无法将类型System.Drawing.Bitmap隐式转换为System.Web.UI.WebControls.Image
\
A(x0,y0) ------------ D \
| | \
| | \
| | \
| | \
B------------ C(x1,y1) \
\Line1
1. Trivial reject
a. if both ends are higher than y0, reject
b. if both ends are lower than y1, reject
c. if both ends are larger than x1, reject
d. if both ends are smaller than x0, reject2. 'Trivial reject' is fast and should clip many of the polygon sides.
if you are not satisfied and want to cut more, you might look into
algorithm like Cohen-Sutherland Line-Clipping. here is a link:Computer Graphics - Clipping
but I am interesting in your link~thanks a lot!