摘要: 题意:给一束激光,一个三棱柱,三棱柱会折射光,问这束激光最终是否会和y = 0相交;分析:模拟题,为了方便处理折射角,事先求出每条边的向内和向外的法向量;findpoint : 找第一交点step1: 判断激光是否和三角形有规范相交;step2: 第一次折射;step3:第二次折射,可能无法折射; 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 const int N = 100+10; 10 const double e... 阅读全文
posted @ 2013-10-30 23:32 Rabbit_hair 阅读(390) 评论(0) 推荐(0) 编辑