欧拉计划 发表于 2016-8-31 15:41:55

题目144:考查激光束的反射

本帖最后由 欧拉计划 于 2016-8-31 16:02 编辑

Investigating multiple reflections of a laser beam

In laser physics, a "white cell" is a mirror system that acts as a delay line for the laser beam. The beam enters the cell, bounces around on the mirrors, and eventually works its way back out.

The specific white cell we will be considering is an ellipse with the equation 4x2 + y2 = 100

The section corresponding to −0.01 ≤ x ≤ +0.01 at the top is missing, allowing the light to enter and exit through the hole.



The light beam in this problem starts at the point (0.0,10.1) just outside the white cell, and the beam first impacts the mirror at (1.4,-9.6).

Each time the laser beam hits the surface of the ellipse, it follows the usual law of reflection "angle of incidence equals angle of reflection." That is, both the incident and reflected beams make the same angle with the normal line at the point of incidence.

In the figure on the left, the red line shows the first two points of contact between the laser beam and the wall of the white cell; the blue line shows the line tangent to the ellipse at the point of incidence of the first bounce.

The slope m of the tangent line at any point (x,y) of the given ellipse is: m = −4x/y

The normal line is perpendicular to this tangent line at the point of incidence.

The animation on the right shows the first 10 reflections of the beam.

How many times does the beam hit the internal surface of the white cell before exiting?

题目:

在激光物理中,一个“白格子”是一个作为激光束的延迟线的镜子系统。激光束进入格子,在镜子上跳来跳去,最后跳出去。

我们要考虑的白格子是一个方程为 4x2 + y2 = 100 的椭圆。

椭圆上端 −0.01 ≤ x ≤ +0.01 对应的部分缺失,这样光束可以从这部分进入或跳出。



此问题中的光束从点 (0.0,10.1)开始,光束与镜子的第一次接触发生在点 (1.4,-9.6)。

每次激光束与椭圆表面相交,遵循常规的”入射角等于反射角“物理规律。也就是说,入射激光束和反射激光束与在交汇点的法线成相同角度的角。

在上面左边的图中,红线显示了激光束与白格子的前两次交汇点;蓝线显示了第一次交汇点处的切线。

椭圆上任意一点 (x,y) 处切线的斜率 m 为:m = −4x/y。

法线与切线在相交点相互垂直。

上面右边的动画显示了激光束的前十次反射。

激光束在退出白格子之前一共和椭圆内部发生了多少次撞击?

jerryxjr1220 发表于 2017-1-7 12:34:51

高中的几何代数的综合运用{:5_109:}

思路看代码吧:
# -*- coding: utf-8 -*-
"""
Created on Sat Jan7 11:37:42 2017

@author: Jerry Xu
"""

def linesolve(k,b,p):
    x1 = (-k*b + (100*k*k-4*b*b+400)**0.5)/(4+k*k)
    y1 = k*x1 + b
    x2 = (-k*b - (100*k*k-4*b*b+400)**0.5)/(4+k*k)
    y2 = k*x2 + b
    if abs(x1-p) < 0.001 and abs(y1-p) < 0.001:
      return x2,y2
    else:
      return x1,y1

#初始化:
# 入射方程:y = k*x + b, 入射点p
k,b = -19.7/1.4,10.1
p = (0,10.1)
c = 0
while not (-0.01<=linesolve(k,b,p)<=0.01 and linesolve(k,b,p)>=(100-4*0.01*0.01)**0.5):
    c += 1
    point = linesolve(k,b,p) #直线与椭圆的另一焦点
    m = -4*point/point #法线斜率
    n = point -m*point
    # 法线方程: y = m*x + n
    # 入射点的镜像点坐标:(qx,qy)
    qx = (-m*m*p-2*m*n+2*m*p+p)/(m*m+1)
    qy = m*qx+p*m+2*n-p
    # 反射方程:y = k*x + b, 反射射点p,也是下一轮的入射方程和入射点
    k = (qy-point)/(qx-point)
    b = qy - k*qx
    p = point
print (c)
输出:
354
页: [1]
查看完整版本: 题目144:考查激光束的反射