未登录,请登录后再发表信息
最新评论 (0)
播放视频

滑块碰撞与镜面反射

How colliding blocks act like a beam of light...to compute pi.

You know that feeling you get when you have two mirrors facing each other,
你知道当两面镜子相对放置时
and it gives the illusion of there being an infinite tunnel of rooms?
会让人产生身处无限长隧道的错觉吗?
Or if they’re at an angle with each other,
而如果镜子按一定的角度放置
it makes you feel like you’re part of a strange kaleidoscopic world
会让你觉得置身于奇异的万花筒世界
with many copies of yourself
你的许多个身影
all separated by angled pieces of glass.
分散在按角度排列的镜面碎片中
What many people may not realize
许多人没意识到的是
is that the idea underlying this illusions
这些错觉背后的引申涵义
can be surprisingly helpful for solving serious problems in math.
对解决复杂的数学问题极有帮助
三蓝一棕
We have already seen two videos describing the block collision puzzle
我们看过了描述滑块碰撞问题的两个视频
with its a wonderfully surprising answer.
其答案非常让人意外
Big block comes in from the right,
大滑块从右边滑入
lots of clacks, the total number of clacks looks like π,
噼啪作响 响声的数目接近于π
and we want to know why.
我们想知道这是为什么
Here we see one more perspective explaining what’s going on.
今天我们再从另一个角度来解释一下
Where it’s connection to pi wasn’t surprising enough.
当我们把滑块问题和光学现象联系起来
we add one more unexpected connection to optics.
它和π的联系就没那么令人惊讶了
But we’re doing more than just
我们所做的不仅是
answering the same question twice.
再次解决同一个问题
This alternate solution gives a much
这一种解决方案能让你
richer understanding of the whole set up
更深刻地理解整个模型
and it makes it easier to answer the other questions
使得解决其它问题更加容易
And fun side note it happens to be core to
有趣的是 这恰好是
how I coded the accurate simulation of these blocks
我不需要用极短的时间步长
without requiring absurdly small time steps
和大量的计算时间
and huge computation time.
就能准确模拟碰撞问题的关键
The solution from last video involve a coordinate plane
上期节目的解法中用到一个坐标平面
where each point encodes a pair of velocities.
在该平面中 每个点都对应一对速度
Here we will do something similar
这里 我们的做法类似
but the points of our plane are going to encode
只不过这次 每一点对应的是
the pair of positions of both blocks.
两个滑块的位置
Again, the idea is that
总之 我们的想法是
by representing the states of a changing system
用某空间中的一个点
with individual points in some space,
来表示变化系统的状态
problems in dynamics turn into problems in geometry
使动力学问题转化为几何问题
which hopefully are more solvable
希望这样更容易解决问题
Specifically, let the x-coordinate of a 2D plane
具体来说 就是用二维坐标中的x坐标
represent the distance from the wall to the left edge of the first block,
代表墙面到第一个滑块左边缘的距离
what I’ll call d1.
我们称这个距离为d1
And let the y-coordinate represent the distance
用y坐标表示
from the wall to the right edge of the second block,
从墙到第二个滑块右边缘的距离
what we’ll call d2.
我们称这个距离为d2
That way, the line x=y
这样 直线x=y表示的
shows us where the two blocks clack into each other.
就是两个滑块碰撞的位置
since this happens whenever d1 is equal to d2
因为这种情况发生在d1=d2的时候
Here’s what it looks like for our scenario to play out.
下面是这种情况的场景演示
As the two distances of our blocks change,
当两个滑块离墙面的距离发生变化
the two-dimensional points of our configuration space move around,
在二维坐标系上的点也会跟着移动
with a position that always fully encode the information of those two distances.
这个点始终反映的是d1和d2的大小
You may notice that at the bottom there,
你可能注意到了底部这里
it’s bounded by the line where d2 is the same as the small block’s width,
它被限制在d2=小滑块宽度的直线之上
which, if you think about, it is what it means
想想你就知道
for the small block to hit the wall.
它代表小滑块与墙相撞的位置
You may be able to guess where we’re going with this.
你可能猜到了我们要说什么
The way this point bounces between the two bounding lines
这个点在两条边界线之间的弹跳方式
is a bit like a beam of light bouncing between two mirrors.
有点像光线在两面镜子之间反射
The analogy doesn’t quite work, though.
但是 这个类比也并不是很恰当
In the lingo of optics,
用光学术语来说
the angle of incidence doesn’t equal the angle of reflection.
这里的入射角并不等于反射角
Just think of that first collision:
仅考虑第一次碰撞
A beam of light coming in from the right
一束光线从右侧入射
would bounce off a 45-degree angled mirror
会与以直线x=y确定的镜面
this x=y line
夹角为45度的方向反射出去
in such a way that it ends up going straight down
这样最终光线会垂直向下方射出
which would mean that only the second block is moving
这就意味着只有第二个滑块在运动
This does happen in the simplest case,
最简单的的确是这种情况
where the second block has the same mass as the first
当第二个滑块与第一个滑块质量相同
and picks up all of the momentum like a croquet ball,
碰撞后它会像槌球一样获得所有动能
but the general case for other mass ratios
但一般情况下两个滑块的质量不同
that first block keeps much of its momentum,
第一个滑块保留了大部分动能
so the trajectory of our point in this configuration space
所以这个点在坐标系的轨迹
won’t be pointed straight down.
并不会垂直向下
It will be down into the left a bit
它会稍稍往左偏一点
And even if it’s not immediately clear
虽然你还不能马上明白
why this analogy with light would be actually helpful,
用光线反射做类比对这个问题有何帮助
and trust me it will be helpful in many ways,
请相信我 它在很多方面都是有用的
run with me here and see if we can fix this for the general case.
接下来我们看看它能否解释一般情况
Seeking analogies in math is very often a good idea.
在数学中 类比往往是个好办法
As with the last video, it’s helpful to rescale the coordinates.
在上期节目中 它有助于重置坐标
In fact, motivated by precisely what we did then
实际上 正是受到上期节目启发
you might think to rescale the coordinates
你可能会想到重置坐标这个步骤
so that x is not equal to d1₁
从而使得x不等于d1
but is equal to the square root of the first mass (m1) times d1.
而是等于第一个滑块质量的平方根乘d1
This has the effect of stretching our space horizontally,
这就产生了水平拉伸空间坐标系的效果
so changes to our big block’s position now result in
这样 大滑块位置的变化造成了
larger changes to the x-coordinate itself.
x坐标值更大的变化
And likewise let’s write the y-coordinate as
同样地 把y变成
square root of m2 times d2,
第二个滑块质量的平方根乘d2
even though in this particular case the second mass is 1
即使在第二个滑块质量为1的特殊情况下
so it doesn’t make a difference
这样做并没有什么不同
but let’s keep things symmetric
但是让我们保持对称
Maybe that strikes you as making things uglier
也许你觉得这么做没道理
and kind of a random thing to do,
有点太随机了
but as with last time,
但和上次一样
when we include square roots of masses like this,
当我们把质量的平方根考虑进去时
everything plays more nicely
这样更符合能量守恒定律
with the laws of conserving energy and momentum.
和动量守恒定律公式的形式
Specifically, the conservation of energy will translate into the fact
具体来说 能量守恒是通过
that our little point in the space is always moving at the same speed,
该点在坐标系内匀速运动来体现的
which in our analogy you might think of meaning there’s a constant speed of light.
在我们的类比中 可以理解为光速恒定
And the conservation of momentum will translate to the fact
动量守恒定律则体现在
that as our point bounces off the “ mirrors ” of our setup,
该点从我们放置的“镜子”上反弹回来时
so to speak, the angle of incidence equals the angle of reflection.
也就是说 入射角等于反射角
Doesn’t that seem bizarre in kind of a delightful way?
这方法是不是有种妙不可言的感觉呢?
That the laws of kinematics should translate to laws of optics like this?
运动学定律就这样转化为了光学定律?
To see why it’s true, let’s roll up our sleeves and work out the actual math.
为了确定这样是对的 我们来好好计算一下
Focus on the velocity vector of our point in the diagram,
注意图中点的速度矢量
it shows which direction it’s moving and how quickly.
它表示该点运动速度的方向和大小
Now, keep in mind this is not a physical velocity,
注意这不是物理学上的速度
like the velocities of the moving blocks,
比如滑块运动的速度
instead it’s a more abstract rate of change
而是在这个坐标系中
in the context of this configuration space,
该点变化的抽象速率
whose two dimensions worth of possible directions
它在两个方向上的二维矢量值
encode both velocities of the block.
分别表示两个滑块可能的速度方向
The x-component of this little vector is the rate of change of x.
x分量表示速度矢量沿x轴的变化率
Likewise, its y-component is the rate of change of y.
同样 y分量表示沿y轴的变化率
but what is that rate of change for the x-coordinate?
但是沿x轴的变化率是多少呢
Well, x is sqrt(m1)*d1,
x=(m1)½×d1
and the mass doesn’t change, so it depends only on how d1 changes.
由于质量不变 所以x值只取决于d1的变化
And what’s the rate at which d1 changes
d1变化的速率
well, that’s the velocity of the big block,
就是大滑块的速度
let’s go ahead and call that v1.
我们记为v1
Likewise, the rate of change for y is going to be sqrt(m2)*v2.
同样 y的变化率为(m2)½×v2
Now notice what the magnitude of our little configuration-space-changing-vector is:
现在来看看坐标系中矢量变化的值
Using the pythagorean theorem,
根据勾股定理
it’s the square root of the sum of each of these component rates of change squared,
可知它是根号下两分量变化率的平方和
which is the sqrt(m1*v1^2 + m2*v2^2).
也就是(m1×v1² + m2×v2²)½
This inner expression should look awfully familiar,
括号内的表达式看起来很熟悉
it’s exactly twice the kinetic energy of our system,
它实际上就是该系统动能的两倍
so the speed of our point in the configuration space
因此该点在坐标系内的移动速度
is some function of the total energy,
与系统总能量成函数关系
and that stays constant throughout the whole process.
而该函数关系在整个过程中保持不变
Remember, a core over idealizing assumption to this
记住 这里理想化的核心假设是
there’s no energy lost
在整个过程中
to friction or to any of the collisions.
没有因摩擦或碰撞而损失任何能量
All right. So that’s pretty cool.
看起来不错吧
with these rescaled coordinates
重置坐标后
our little point is always moving with a constant speed.
这个点就总是以匀速运动了
And i know it’s not obvious why you’d care,
我知道你不明白为什么要关注这一点
but among other things it’s important for the next step,
但这对于下一步来说至关重要
where the conservation of momentum implies
动量守恒应用在这里
that these two bounding lines act like mirrors.
表明这两条边界线犹如两面镜子
First, let’s understad this line d1=d2 a little bit better.
首先 我们来深入理解一下d1=d2这条线
in our new coordinates
在重置后的坐标内
it’s no longer that nice 45-degree x=y line.
它不再是那条与y轴成45度角的直线了
Instead, if we do a little algebraic manipulation here,
相反 我们只要做一些代数运算
we can see that that line is
就会发现这条直线是
x/sqrt(m1) equals y/sqrt(m2).
x/(m1)½ = y/(m2)½
rearranging a little bit more,
再稍微变一下形
we see that’s a line with a slope of sqrt (m2/m1)
就可以看出这是一条斜率为(m2/m1)½的直线
That’s a nice expression to tuck away in the back of your mind.
这么一变形 你就会豁然开朗
After the blocks collide,
在滑块碰撞后
meaning our point hits this line,
也就是图上的点触及这条直线时
the way to figure out how they move
我们计算其运动路径的方法
is to use the conservation of momentum,
就是利用动量守恒定律
which says the value m1*v1 + m2*v2
也就是说m1×v1+m2×v2的值
is the same both before and after the collision.
在碰撞前后都是一样的
Now notice, this looks like a dot product between two column vectors, [m1, m2], and [v1, v2].
这就像是列向量 [m1, m2] 点乘 [v1, v2]
Rewriting it slightly for our rescaled coordinates,
在新坐标系稍稍改写此式
the same thing could be written as a dot product
它又可以写成
between a column vector with the square roots of the masses
质量平方根构成的列向量
and one with the rates of change for x and y.
与x和y变化速率构成的列向量的点积
I know this probably seems like a complicated way to
我知道这样解释好像把
to talk about a comparatively simple momentum equation.
简单的动量守恒方程给复杂化了
but there is a good reason for shifting the language
但是在新坐标系中用点积概念
to one of the dot products in our new coordinates.
来解释这个理论是很有道理的
Notice that the second vector is simply the rate of changing vector
注意 第二个向量就是我们所观察的
for the point in our diagram that we’ve been looking at.
图中点的变化率向量
The key now is that this square-root-of-the-masses vector
现在的关键是 质量的平方根这个向量
points in the same direction as our collision line
指向与碰撞线相同的方向
Since the rise over run is sqrt(m2) over sqrt(m1).
因为点的竖直位移与水平位移比为 (m2)½/(m1)½
Now if you are unfamiliar with the dot product,
如果你不熟悉点积
there is another video on this channel describing it,
本频道还有另一期节目描述该问题
but real quick let’s go over what it means geometrically.
让我们先快速复习一下它的几何意义
The dot product of two vectors equals the length of the first one
两个向量的点积等于第一个向量模长
multiplied by the length of the projection of the second one on to that first
乘以第二个向量在第一个向量方向上的投影
where it’s considered negative if they point in opposite directions
如果它们方向相反 结果就是负数
You often see this written
常见的写法是
as the product of the lengths of the two vectors and the cosine of the angle between them
两个向量的模长和两向量间夹角的余弦值之积
so look back at this conservation of momentum expression,
现在回来看动量守恒表达式
telling us that the dot product between this square-roots-of-the-masses vector
它表明质量的平方根列向量
and our little change vector has to be the same both before and after the collision.
与变化率列向量的点积在碰撞前后是不变的
Since we just saw that this change vector has a constant magnitude,
因为我们知道变化率向量是一个常量
the only way for this dot product to stay the same is
所以唯一让点积保持不变的方法就是
if the angle that it makes with the collision line stays the same
该向量与碰撞线之间的夹角保持不变
In other words, again using the lingo of optics,
再来用光学术语换句话说
the angle of incidence and the angle of reflection of this collision line must be equal.
在这条碰撞线上 入射角和反射角必须相等
Similarly, when the small block bounces off the wall,
同样 当小滑块从墙面反弹时
our little vector gets reflected about the X direction.
这个变化率矢量在x轴上被反射
since only its y-coordinate changes,
既然只有y方向发生变化
So our configuration point is bouncing off that horizontal line
因此坐标中的点在水平线上反弹
as if it was a mirror.
就像在一面镜子上反弹
So step back a moment and think about what this means for our original question
那么回头想想我们最初的问题
of counting block collisions and trying to understand why on earth π would show up,
怎么计算碰撞次数以及怎么得出π值的
We can translate it to a completely different question:
我们可以将此转化成一个完全不同的问题
If you shine a beam of light at a pair of mirrors,
如果你向两面镜子射出一束光
meeting each other at some angle, let’s say theta,
两面镜子相交 夹角为θ
How many times would that light bounce off the mirrors as a function of that angle?
光的反射次数与θ成一个什么函数关系?
Remember, the mass ratio of our blocks
记住 滑块的质量比
completely determines this angle theta in the analogy.
完全决定了这个类比中θ角的大小
Now I can hear some of you complaining:
我知道有些人会抱怨
“ Haven’t we just replaced one tricky setup with another? ”.
“这不是用一个复杂模型代替另一个么?”
This might make for a cute analogy but how is it progress,
这个类比可能比较有趣 但它怎么说得通呢
It’s true that counting the number of light bounces is hard.
计算光的反弹次数确实很难
But now we have a helpful trick:
但现在我们有一个有用的窍门
When the beam of light hits the mirror,
当光束照射到镜面上时
instead of thinking of that beam as reflected about the mirror,
不要想着光束会在镜面上反射
Think of the beam is going straight
而是认为光束是直的
while the whole world gets flipped through the mirror,
当整个世界以镜子为轴发生翻转时
It’s as if the beam is passing through a piece of glass into an illusory looking glass universe.
就好像光束穿过一片玻璃进入一个假想的玻璃世界
Think of actual mirrors here.
想象一下真实的镜子
This wire on the left will represent a laser beam coming into the mirror,
左边的线将代表射入镜子的激光束
and the one on the right will represent its reflection.
右边的线则代表它的镜像
The illusion is that the beam goes straight through the mirror,
假想光束直接穿过镜子
as if passing through a window separating us from another room.
就像穿过一扇将我们与其它房间隔开的窗户
But notice, crucially
但是注意关键一点
For this illusion to work,
要产生这种错觉
The angle of incidence has to equal the angle of reflection
入射角就必须等于反射角
Otherwise the flipped copy of the reflected beam
否则 被反射光束的镜像
won’t line up with the first part.
将不会与入射光束在一条直线上
So all that work we did
所以我们做的一切
rescaling coordinates and futzing through the momentum equation
重置坐标以及改写动量方程
was certainly necessary.
是很有必要的
But now we get to enjoy the fruits of our labor,
不过现在我们可以享受劳动成果了
watch how this helps us elegantly solve the question of
看看这怎么帮我们完美解决
how many mirror bounces there will be,
光束在镜面反射几次的问题
which is also the question about how many block collisions there will be.
也就是滑块会碰撞多少次的问题
Everytime the beam hits a mirror,
每次光束到达镜面
don’t think of the beam as getting reflected,
不要想着光会反射
let it continue straight while the world gets reflected.
想象它继续直行 而整个世界发生了翻转
As this goes on,
随着这个继续
the illusion to the beam of light
给人的错觉就是
is that instead of getting bounced around between two angled mirrors many times
光束并非在相交的两面镜子间来回反射
it’s passing through a sequence of angled pieces glass
而是通过了一系列以相同角度
all the same angle apart.
分开排列的玻璃片
Right now I’m showing you all of the reflected copies of the bouncing trajectory,
现在给你展示的是所有镜像的反弹轨迹
which i think has a very striking beauty to it.
我觉得它有一种惊人的美
But for a clearer view, let’s just focus on the original bouncing beam
不过为了更容易看清 我们只关注第一束反射光
and the illusory straight one,
和这条假想的直线光束
The question of counting bounces
反射多少次的问题
turns into a question of how many pieces of glass this illusory beam crosses.
转化成了假想光线穿过了几片玻璃
how many reflected copies of the world does it pass into.
穿过了多少个翻转世界的问题
Well, calling the angle between the mirrors theta,
记镜子间的角度为θ的话
the answer here is however many times you can add theta to itself,
答案就是要使弧度大约跨越半个圆周
before you get more than half way around a circle,
你需要增加几个θ角
which is to say before you add up to more than π total radians.
也就是说整个弧度稍微大于π
Written as a formula,
写成一个公式
the answer to this question is the floor of pi divided by theta.
问题的答案就是π/θ
So, let’s review!
我们来回顾一下吧
We started by drawing a configuration space for our colliding blocks,
我们从为滑块碰撞设计坐标系开始
where the x and the y coordinates represented the two distances from the wall.
其中x和y坐标分别表示滑块与墙的距离
This kind of looked like light bouncing between two mirrors,
这有点像光在两面镜子之间反射
but to make the analogy work properly,
为了使类比更恰当
we needed to rescale the coordinates by the square roots of the masses.
我们用质量的平方根这个参数重置坐标
This made it so that the slope of one of lines was sqrt(m2) / sqrt(m1),
得到了斜率为(m2)½/(m1)½的直线
so the angle between those bounding lines
那么这两条边界线之间的夹角
will be the inverse tangent of that slope.
就等于斜率的反切值
To figure out how many bounces there are between two mirrors like this,
要算出光束在两面镜子间反射多少次
think of the illusion of the beam going straight through a sequence of looking-glass universes
假想一束光线直线穿过由一系列
separated by a semicircular fan of windows.
扇形窗户隔开的半圆形玻璃宇宙
The answer, then, comes down to how many times the value of this angle
那么 答案就归结为多少个θ角
fits into 180 degrees
才能组成这个180度角
which is pi radians.
也就是π弧度角
From here, to understand why exactly the digits of pi show up,
这里 想弄明白滑块质量比为100时
when the mass ratio is a power of 100,
是怎么得到π值的
it’s exactly what we did in the last video,
这刚好是上期节目的内容
so i won’t repeat myself here.
这里不再赘述
And finally, as we reflect on how absurd the initial appearance of pi seemed,
刚开始我们觉得得出π值很奇怪
and on the two solutions we’ve now seen,
现在再来看这两种解决方案
and on how unexpectedly helpful it can be
就可以看出用空间中的某个点
to represent the state of the system with points in some space,
来表示系统的状态对解决问题有多大帮助
I leave you with this quote from the computer scientist Alan Kay,
借用一句计算机大师阿伦·凯的名言
A change of perspective is worth 80 IQ points.
视角的改变堪比80个智商分

发表评论

译制信息
视频概述

两个滑块无摩擦碰撞问题和镜面反射还有联系?快来看看是怎么回事吧!

听录译者

收集自网络

翻译译者

ZTT

审核员

审核员XY

视频来源

https://www.youtube.com/watch?v=brU5yLm9DZM

相关推荐