题目要求:
用最简单、最快捷的方法计算出下面这个圆形是否和正方形相交。
3D坐标系原点(0.0,0.0,0.0);圆形:半径 r = 3.0,圆心 o = (*.*,0.0,*.*);正方形:4个角坐标 1:(*.*,0.0,*.*) 2:(*.*,0.0,*.*) 3:(*.*,0.0,*.*) 4:(*.*,0.0,*.*)
题目分析:
用圆心到四条边的距离来判断:如果圆心到某一条边的距离小于等于r,且k在该条边上(非延长线).如图所示:
题目要求:
用最简单、最快捷的方法计算出下面这个圆形是否和正方形相交。
3D坐标系原点(0.0,0.0,0.0);圆形:半径 r = 3.0,圆心 o = (*.*,0.0,*.*);正方形:4个角坐标 1:(*.*,0.0,*.*) 2:(*.*,0.0,*.*) 3:(*.*,0.0,*.*) 4:(*.*,0.0,*.*)
题目分析:
用圆心到四条边的距离来判断:如果圆心到某一条边的距离小于等于r,且k在该条边上(非延长线).如图所示:
转载于:https://www.cnblogs.com/tractorman/p/4059149.html