矩形交叉点

时间:2011-10-06 13:48:03

标签: graphics 3d vector-graphics

有没有任何已知的方法来计算两个矩形之间的交叉矩形?我的意思是如果矩形A由(x1,y2,x2,y2)和B由(x3,y3,x4,y4)定义,我如何计算交叉矩形C的坐标(x5,y5,x6,y6) )?

感谢。

1 个答案:

答案 0 :(得分:0)

这里详细解释了交叉多边形的一般问题:http://davis.wpi.edu/~matt/courses/clipping。顺便说一下,这个任务的最好的库之一,有多种编程语言的绑定,是GPC - General Polygon Clipper库:http://www.cs.man.ac.uk/~toby/alan/software

相关问题