隐藏在素数规律中的 $\pi$

问题: 证明 $\dfrac{\pi}{4} = 1-\dfrac{1}{3}+\dfrac{1}{5}-\dfrac{1}{7}+\dfrac{1}{9}-\cdots$ $$ \begin{split} 1-\dfrac{1}{3}+\dfrac{1}{5}-\dfrac{1}{7}+\cdots &= \int_0^1 (1-x^2+x^4-\cdots)dx \\ &= \int_0^1 \frac{1}{1+x^2}dx \\ &= \tan^{-1}(1) \\ &= \frac{\pi}{4} \end{split} $$ 我们选择从另外一种方式来得出这个等式,从圆的定义开始。 计算圆内格点数目 如果将二维平面划分为网格,并画出半径为 $r$ 的圆,圆内包含的格点数应该大约等于 $\pi r^2$,并且当 $r\to+\infty$ 时,两者应该无限接近,这即给出了一个计算 $\pi$ 的方法。 ...

August 8, 2018 · 2 min

最速降线问题

问题: 在只考虑重力作用的情况下,一质点从点 A 沿某条曲线到点 B,问怎样的曲线能使所需时间最短? 这一问题被称为最速降线问题(Brachistochrone),由约翰·伯努利在 1696 年提出。 ...

August 7, 2018 · 2 min

用莫比乌斯带巧解内接矩形问题

问题: 对于任意的闭合连续曲线,是否总能在其上找到四个点形成一个矩形? 首先我们不再关注单个而是成对的点,并利用矩形的性质:对于平面上任意两对不同的点 $a, c$ 和 $b, d$,只需确保它们有相同的中点,且 $a, c$ 间的距离等于 $b, d$ 点的距离,那么即可以保证这四个点可以组成矩形。这样寻找内接矩形问题就转化为了寻找两对点的问题。 ...

August 7, 2018 · Updated: Jan 6, 2025 · 3 min

发明新数学是怎样一种体验

问题: 如何使 $1+2+2^2+\cdots=-1$?从已知的数学中拓展至新数学。 $$ \sum_{n=1}^{\infty} \frac{1}{2^n} = 1 $$$$ \begin{align*} &(1-p) + p(1-p) + p^2(1-p) \cdots = 1 \\ \implies & \sum_{n=0}^\infty p^n = \frac{1}{1-p} \end{align*} $$ 该式只在 $0...

August 5, 2018 · Updated: Jan 5, 2025 · 1 min

音乐与测度论有什么关系

问题: 假设一位音乐天才,对任何频率之比为有理数的一对音符都觉得悦耳,那么他是否会觉得所有的音符都是悦耳的? 详细说明:当一对音符的频率比为有理数且分母较小时,这样的音符称为「协和的」,会使我们觉得悦耳,当分母较大时,其中的规律便不容易被发现。我们假设一位音乐奇才可以听出任何频率之比为有理数的音符。由于对于无理数,总存在一个有理数无限接近于它,那么频率之比为无理数的音符对于他来说是否仍然悦耳呢? ...

August 5, 2018 · Updated: Jan 5, 2025 · 1 min

Linux

Linux 的基础知识 Linux 简介 Linux 分为内核版本和发行版本。发行版本在内核基础上增加各种功能。在服务器领域使用 redhat,ubuntu 具有图形界面偏向个人应用。 Linux 严格区分大小写;所有内容以文件形式保存,包括硬件。 Linux 不靠扩展名区分文件类型,但为使用方便,有一些约定俗成的扩展名。 安装: ...

April 21, 2018 · Updated: Feb 18, 2020 · 6 min

Particle and Rigid Body Dynamics

The course notes give detailed code implementation and mathematical derivation. Newton Method $$ \begin{gather*} f(x)\approx f(x_n)+f'(x_n)\Delta x+\frac{1}{2}f''(x_n)\Delta x^2 \\ 0=\frac{d}{d\Delta x}\left(f(x_n)+f'(x_n)\Delta x+\frac{1}{2}f''(x_n)\Delta x^2\right)=f'(x_{n})+f''(x_{n})\Delta x \end{gather*} $$so $$ x_{n+1}=x_n-H^{-1}\nabla f(x_n) $$where $H=\nabla^2f$ is the Hessian matrix Euler Method $$ \mathbf{x}(t_0 + h) = \mathbf{x}_0+h \dot{\mathbf{x}}(t_0) $$Euler Method is the simplest numerical method and achieve $O(h^2)$ accuracy. But it has many disadvantages. It will produce outward drift when evaluating an orbiting movement so it is not accurate. It is also unstable when the stepsize is large. ...

March 20, 2018 · 7 min

Projective Dynamics

Paper Reading Note Implicit Euler Solver $$ \begin{gather*} \mathbf{q}_{n+1}=\mathbf{q}_n+h\mathbf{v}_{n+1} \\ \mathbf{v}_{n+1}=\mathbf{v}_n+h\mathbf{M}^{-1}(\mathbf{f}_{\text{int}}(\mathbf{q}_{n+1})+\mathbf{f}_{\text{ext}}) \end{gather*} $$$$ \require{mathtools} \DeclarePairedDelimiters\norm{\lVert}{\rVert} \min_{\mathbf{q}_{n+1}} \dfrac{1}{2h^2} \norm*{\mathbf{M}^{\frac{1}{2}} (\mathbf{q}_{n+1} - \mathbf{s}_n)}_F^2 + \sum_i W_i(\mathbf{q}_{n+1}) $$ where $\mathbf{s}_n = \mathbf{q}_n + h\mathbf{v}_n + h^2\mathbf{M}^{-1}\mathbf{f}_{\text{ext}}$ and $W_i(\mathbf{q})$ is a scalar potential energy function. $$ \begin{equation}\label{potential} \dfrac{1}{2h^2} \norm*{\mathbf{M}^{\frac{1}{2}} (\mathbf{q}_{n+1} - \mathbf{s}_n)}_F^2 \end{equation} $$ which states that the solution should follow its momentum (plus external forces), and the elastic potential, that requires the solution to minimize the elastic deformation. The corresponding weighting terms, i.e. the mass distribution in $M$, the time step $h$ and the material stiffness of $W$, determine which potential has more importance in this balance. ...

March 17, 2018 · 4 min

Position Based Dynamics

This paper Position-Based Simulation Methods in Computer Graphics introduces position-based methods and its differences from other methods. Moreover, it presents the algorithm and several solvers. Specific constraints are also discussed in detail. Finally, Implementation and application are briefly presented. Constraints Constraints are kinematic restrictions in the form of equations and inequalities that constrain the relative motion of bodies. Equality and inequality constraints are referred to as bilateral and unilateral constraints, respectively. ...

March 16, 2018 · 5 min

Physically Based Deformable Models

This paper presents the most important methods used in computer graphics to produce realistic animations and simulations: finite element/difference/volume methods, mass-spring systems, meshfree methods, coupled particle systems and reduced deformable models based on modal analysis. Also, it discusses the benefits and drawbacks of each method, reports the improvement that made in other papers. Time Integration Time integration schemes are evaluated by two main criteria, their stability and their accuracy. In the field of physically based animation in Computer Graphics, stability is often much more important than accuracy. ...

March 15, 2018 · 9 min