Skip to content

Commit

Permalink
Site updated: 2024-02-13 10:02:25
Browse files Browse the repository at this point in the history
  • Loading branch information
neozhaoliang committed Feb 13, 2024
1 parent ede8497 commit 9ac9f28
Show file tree
Hide file tree
Showing 40 changed files with 161 additions and 166 deletions.
2 changes: 1 addition & 1 deletion archives/2009/03/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(分类目录</span>
<span class="breadcrumb">当前位置(归档</span>



Expand Down
2 changes: 1 addition & 1 deletion archives/2009/05/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(分类目录</span>
<span class="breadcrumb">当前位置(归档</span>



Expand Down
2 changes: 1 addition & 1 deletion archives/2009/06/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(分类目录</span>
<span class="breadcrumb">当前位置(归档</span>



Expand Down
2 changes: 1 addition & 1 deletion archives/2009/07/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(分类目录</span>
<span class="breadcrumb">当前位置(归档</span>



Expand Down
2 changes: 1 addition & 1 deletion archives/2009/12/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(分类目录</span>
<span class="breadcrumb">当前位置(归档</span>



Expand Down
2 changes: 1 addition & 1 deletion archives/2010/03/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(分类目录</span>
<span class="breadcrumb">当前位置(归档</span>



Expand Down
2 changes: 1 addition & 1 deletion archives/2010/10/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(分类目录</span>
<span class="breadcrumb">当前位置(归档</span>



Expand Down
2 changes: 1 addition & 1 deletion archives/2010/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(分类目录</span>
<span class="breadcrumb">当前位置(归档</span>



Expand Down
2 changes: 1 addition & 1 deletion archives/2011/04/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(分类目录</span>
<span class="breadcrumb">当前位置(归档</span>



Expand Down
2 changes: 1 addition & 1 deletion archives/2011/06/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(分类目录</span>
<span class="breadcrumb">当前位置(归档</span>



Expand Down
2 changes: 1 addition & 1 deletion archives/2011/08/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(分类目录</span>
<span class="breadcrumb">当前位置(归档</span>



Expand Down
2 changes: 1 addition & 1 deletion archives/2011/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(分类目录</span>
<span class="breadcrumb">当前位置(归档</span>



Expand Down
2 changes: 1 addition & 1 deletion archives/2012/07/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(分类目录</span>
<span class="breadcrumb">当前位置(归档</span>



Expand Down
2 changes: 1 addition & 1 deletion archives/2012/10/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(分类目录</span>
<span class="breadcrumb">当前位置(归档</span>



Expand Down
2 changes: 1 addition & 1 deletion archives/2012/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(分类目录</span>
<span class="breadcrumb">当前位置(归档</span>



Expand Down
2 changes: 1 addition & 1 deletion archives/2013/04/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(分类目录</span>
<span class="breadcrumb">当前位置(归档</span>



Expand Down
2 changes: 1 addition & 1 deletion archives/2013/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(分类目录</span>
<span class="breadcrumb">当前位置(归档</span>



Expand Down
2 changes: 1 addition & 1 deletion archives/2016/07/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(分类目录</span>
<span class="breadcrumb">当前位置(归档</span>



Expand Down
2 changes: 1 addition & 1 deletion archives/2016/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(分类目录</span>
<span class="breadcrumb">当前位置(归档</span>



Expand Down
2 changes: 1 addition & 1 deletion archives/2017/03/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(分类目录</span>
<span class="breadcrumb">当前位置(归档</span>



Expand Down
2 changes: 1 addition & 1 deletion archives/2017/10/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(分类目录</span>
<span class="breadcrumb">当前位置(归档</span>



Expand Down
2 changes: 1 addition & 1 deletion archives/2017/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(分类目录</span>
<span class="breadcrumb">当前位置(归档</span>



Expand Down
2 changes: 1 addition & 1 deletion archives/2018/05/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(分类目录</span>
<span class="breadcrumb">当前位置(归档</span>



Expand Down
2 changes: 1 addition & 1 deletion archives/2018/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(分类目录</span>
<span class="breadcrumb">当前位置(归档</span>



Expand Down
2 changes: 1 addition & 1 deletion archives/2021/05/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(分类目录</span>
<span class="breadcrumb">当前位置(归档</span>



Expand Down
2 changes: 1 addition & 1 deletion archives/2021/08/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(分类目录</span>
<span class="breadcrumb">当前位置(归档</span>



Expand Down
2 changes: 1 addition & 1 deletion archives/2021/09/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(分类目录</span>
<span class="breadcrumb">当前位置(归档</span>



Expand Down
2 changes: 1 addition & 1 deletion archives/2021/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(分类目录</span>
<span class="breadcrumb">当前位置(归档</span>



Expand Down
2 changes: 1 addition & 1 deletion archives/2022/05/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(分类目录</span>
<span class="breadcrumb">当前位置(归档</span>



Expand Down
2 changes: 1 addition & 1 deletion archives/2022/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(分类目录</span>
<span class="breadcrumb">当前位置(归档</span>



Expand Down
2 changes: 1 addition & 1 deletion archives/2024/02/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(标签</span>
<span class="breadcrumb">当前位置(分类目录</span>



Expand Down
2 changes: 1 addition & 1 deletion archives/2024/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@

<nav class="page-nav hide-on-small-only">
<div class="nav-wrapper indigo">
<span class="breadcrumb">当前位置(分类目录</span>
<span class="breadcrumb">当前位置(归档</span>



Expand Down
6 changes: 3 additions & 3 deletions atom.xml

Large diffs are not rendered by default.

Binary file modified drafts.zip
Binary file not shown.
13 changes: 6 additions & 7 deletions envelope-and-caustics/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -415,15 +415,14 @@ <h1>咖啡杯中的焦散线</h1>
\widetilde{\bf r}_x') &amp;=0.\end{align*}\]</span> 然后解出 <span class="math inline">\(X,Y\)</span>
得到。(现在你知道为什么不把内积展开了吧?)</p>
<p>按照上面的方法,我写了一个小脚本,用 <code>sympy</code>
来计算圆的焦散线。其中圆的中心在原点,半径为 1,光源在 <span class="math inline">\((1,0)\)</span> 处。</p>
<figure class="highlight python"><table><tbody><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><code class="hljs python"><span class="hljs-keyword">from</span> sympy <span class="hljs-keyword">import</span> *<br><br>t, X, Y = symbols(<span class="hljs-string">"t X Y"</span>)<br>x = cos(t)<br>y = sin(t)<br>curve = Matrix([x, y])<br>light_source = Matrix([<span class="hljs-number">1</span>, <span class="hljs-number">0</span>])<br>ray = curve - light_source<br>dx = diff(x, t)<br>dy = diff(y, t)<br>n = Matrix([dy, -dx])<br>reflected_ray = simplify(ray - <span class="hljs-number">2</span> * ray.dot(n) * n / n.dot(n))<br>F = (Y - y) * reflected_ray[<span class="hljs-number">0</span>] - (X - x) * reflected_ray[<span class="hljs-number">1</span>]<br>dF = diff(F, t)<br>result = solve((F, dF), X, Y)<br>print(<span class="hljs-string">f"X(t)=<span class="hljs-subst">{simplify(result[X])}</span>"</span>)<br>print(<span class="hljs-string">f"Y(t)=<span class="hljs-subst">{simplify(result[Y])}</span>"</span>)<br></code></pre></td></tr></tbody></table></figure>
(version=1.12) 来计算圆的焦散线。其中圆的中心在原点,半径为 1,光源在
<span class="math inline">\((1,0)\)</span> 处。</p>
<figure class="highlight python"><table><tbody><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><code class="hljs python"><span class="hljs-keyword">from</span> sympy <span class="hljs-keyword">import</span> *<br><br>t, X, Y = symbols(<span class="hljs-string">"t X Y"</span>)<br>x = cos(t)<br>y = sin(t)<br>curve = Matrix([x, y])<br>light_source = Matrix([<span class="hljs-number">1</span>, <span class="hljs-number">0</span>])<br>ray = curve - light_source<br>dx = diff(x, t)<br>dy = diff(y, t)<br>n = Matrix([dy, -dx])<br>reflected_ray = simplify(ray - <span class="hljs-number">2</span> * ray.dot(n) * n / n.dot(n))<br>F = (Y - y) * reflected_ray[<span class="hljs-number">0</span>] - (X - x) * reflected_ray[<span class="hljs-number">1</span>]<br>dF = diff(F, t)<br>result = solve((F, dF), X, Y)<br>print(<span class="hljs-string">f"X(t)=<span class="hljs-subst">{trigsimp(result[X], method=<span class="hljs-string">'groebner'</span>)}</span>"</span>)<br>print(<span class="hljs-string">f"Y(t)=<span class="hljs-subst">{trigsimp(result[Y], method=<span class="hljs-string">'groebner'</span>)}</span>"</span>)<br></code></pre></td></tr></tbody></table></figure>
<p><code>sympy</code> 给出的结果如下:</p>
<figure class="highlight python"><table><tbody><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs python">X(t)=(-<span class="hljs-number">3</span>*cos(t) + cos(<span class="hljs-number">3</span>*t) + <span class="hljs-number">2</span>)/(<span class="hljs-number">6</span>*(cos(t) - <span class="hljs-number">1</span>))<br>Y(t)=<span class="hljs-number">2</span>*sin(t)**<span class="hljs-number">3</span>/(<span class="hljs-number">3</span> - <span class="hljs-number">3</span>*cos(t))<br></code></pre></td></tr></tbody></table></figure>
<p>虽然这确实是心脏线的一种参数表示,但不是我想要的。这可能和
<code>sympy</code>
对三角函数的除法简化不够有关。可以验证它其实和另一种常用的参数表示 <span class="math display">\[\left\{\begin{align*}x(t)&amp;=\frac{\cos(2t) +
<figure class="highlight python"><table><tbody><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs python">X(t)=<span class="hljs-number">2</span>*cos(t)/<span class="hljs-number">3</span> + cos(<span class="hljs-number">2</span>*t)/<span class="hljs-number">3</span><br>Y(t)=<span class="hljs-number">2</span>*sin(t)/<span class="hljs-number">3</span> + sin(<span class="hljs-number">2</span>*t)/<span class="hljs-number">3</span><br></code></pre></td></tr></tbody></table></figure>
<p>这正是我们喜闻乐见的心脏线的参数表示: <span class="math display">\[\left\{\begin{align*}x(t)&amp;=\frac{\cos(2t) +
2\cos(t)}{3}\\ y(t)&amp;=\frac{\sin(2t) +
2\sin(t)}{3}\end{align*}\right.\]</span> 是相等的。</p>
2\sin(t)}{3}\end{align*}\right.\]</span></p>



Expand Down
Binary file modified layout.zip
Binary file not shown.
Loading

0 comments on commit 9ac9f28

Please sign in to comment.