<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://listenzcc.github.io/blog/feed.xml" rel="self" type="application/atom+xml" /><link href="https://listenzcc.github.io/blog/" rel="alternate" type="text/html" /><updated>2026-03-10T03:18:49+00:00</updated><id>https://listenzcc.github.io/blog/feed.xml</id><title type="html">Manuscripts with Web Supporting</title><subtitle>Since the web is a good place to share, I want to share my manuscripts with necessary web supporting. Like svg, canvas, webGL, and so on.</subtitle><entry><title type="html">Ant Simulation</title><link href="https://listenzcc.github.io/blog/2026-03-06/ant-simulation" rel="alternate" type="text/html" title="Ant Simulation" /><published>2026-03-06T00:00:00+00:00</published><updated>2026-03-06T00:00:00+00:00</updated><id>https://listenzcc.github.io/blog/2026-03-06/ant-simulation</id><content type="html" xml:base="https://listenzcc.github.io/blog/2026-03-06/ant-simulation"><![CDATA[<p>本文通过程序模拟解释 How do the ants work together? 这个问题。</p>

<p>这个好奇是源自于媳妇的一句话，她在试用LLM后，觉得这个东西的原理不可能是“预测后一个字符”，因为这太简单和短视了，无法产生实际上已经出现的有价值的对话。这让我想到了小小的蚂蚁，每只蚂蚁的视野都很小，但群体却极其高效和有序。</p>

<p>本文的代码实现了 <strong>双信息素蚁群系统</strong>。整体结构可以理解为一个离散空间上的 <strong>stochastic agent system</strong>，其行为机制接近经典的 <strong>Ant Colony Foraging Model</strong>。体现了小小的蚂蚁如何通过每个短视的行为构筑起群体的高效与智能。</p>

<table>
  <tbody>
    <tr>
      <td>您可以在我的在线笔记本 &lt;[Ant simulation / Chuncheng</td>
      <td>Observable](https://observablehq.com/@listenzcc/ant-simulation)&gt; 和博客 &lt;<a href="https://listenzcc.github.io/blog/2026-03-06/ant-simulation" title="gp-ant-simulation">gp-ant-simulation</a>&gt; 找到实时在线版本和源码。</td>
    </tr>
  </tbody>
</table>

<hr />

<ul id="markdown-toc">
  <li><a href="#从蚁群到优化算法" id="markdown-toc-从蚁群到优化算法">从蚁群到优化算法</a>    <ul>
      <li><a href="#路径选择模型" id="markdown-toc-路径选择模型">路径选择模型</a></li>
      <li><a href="#信息素更新机制" id="markdown-toc-信息素更新机制">信息素更新机制</a></li>
      <li><a href="#更短路径为何会自动出现" id="markdown-toc-更短路径为何会自动出现">更短路径为何会自动出现</a></li>
      <li><a href="#群体智能的一个重要特点" id="markdown-toc-群体智能的一个重要特点">群体智能的一个重要特点</a></li>
    </ul>
  </li>
  <li><a href="#实时模拟" id="markdown-toc-实时模拟">实时模拟</a></li>
  <li><a href="#蚁群与信息素" id="markdown-toc-蚁群与信息素">蚁群与信息素</a>    <ul>
      <li><a href="#永远能回家的策略" id="markdown-toc-永远能回家的策略">永远能回家的策略</a></li>
      <li><a href="#引导到食物的策略" id="markdown-toc-引导到食物的策略">引导到食物的策略</a></li>
      <li><a href="#群体模拟" id="markdown-toc-群体模拟">群体模拟</a></li>
    </ul>
  </li>
</ul>

<hr />

<p>[toc]</p>

<h2 id="从蚁群到优化算法">从蚁群到优化算法</h2>

<p>蚂蚁觅食行为不仅是一种有趣的群体行为模型，它实际上启发了一类重要的优化方法：
<strong>蚁群优化算法（Ant Colony Optimization, ACO）</strong>。</p>

<p>该算法最早由 Marco Dorigo 在 1990 年代提出，用于解决组合优化问题，例如旅行商问题。
其核心思想正是对前文模拟机制的抽象。</p>

<hr />

<h3 id="路径选择模型">路径选择模型</h3>

<p>在 ACO 中，问题通常表示为一张图：</p>

\[G = (V,E)\]

<p>其中</p>

<ul>
  <li>$V$ 为节点</li>
  <li>$E$ 为路径</li>
</ul>

<p>每条路径上存在信息素：</p>

\[\tau_{ij}\]

<p>表示从节点 $i$ 到节点 $j$ 的吸引程度。蚂蚁从节点 $i$ 选择下一个节点 $j$ 的概率为（当然，这只是理论式，实时并不会这么复杂）</p>

\[P_{ij} =
\frac{\tau_{ij}^{\alpha},\eta_{ij}^{\beta}}
{\sum_{k\in N(i)} \tau_{ik}^{\alpha},\eta_{ik}^{\beta}}\]

<p>其中</p>

<ul>
  <li>$\tau_{ij}$ —— 信息素强度</li>
  <li>$\eta_{ij}$ —— 启发式信息（例如距离倒数）</li>
  <li>$\alpha,\beta$ —— 权重参数</li>
</ul>

<p>简单来说：</p>

<ul>
  <li>信息素表示 <strong>群体经验</strong></li>
  <li>启发函数表示 <strong>局部理性</strong></li>
</ul>

<hr />

<h3 id="信息素更新机制">信息素更新机制</h3>

<p>当蚂蚁完成一次路径后，会对经过的边进行强化：</p>

\[\tau_{ij} \leftarrow (1-\rho)\tau_{ij} + \Delta\tau_{ij}\]

<p>其中</p>

<ul>
  <li>$\rho$ 为挥发率</li>
  <li>$\Delta\tau_{ij}$ 为新增信息素</li>
</ul>

<p>通常</p>

\[\Delta\tau_{ij} = \frac{Q}{L}\]

<p>其中</p>

<ul>
  <li>$L$ 为路径长度</li>
  <li>$Q$ 为常数</li>
</ul>

<p>因此：</p>

<p><strong>路径越短 → 信息素增长越快。</strong></p>

<p>这与自然界蚂蚁的行为完全一致。</p>

<hr />

<h3 id="更短路径为何会自动出现">更短路径为何会自动出现</h3>

<p>设两条路径长度分别为</p>

\[L_1 &lt; L_2\]

<p>单位时间往返次数近似为</p>

\[n \propto \frac{1}{L}\]

<p>因此沉积信息素速度</p>

\[\frac{d\tau}{dt} \propto \frac{1}{L}\]

<p>于是</p>

\[\tau_1 &gt; \tau_2\]

<p>更多蚂蚁会选择路径 1，形成 <strong>正反馈循环</strong>：</p>

<blockquote>
  <p>短路径 → 更多蚂蚁 → 更多信息素 → 更短路径</p>
</blockquote>

<p>同时挥发机制防止系统陷入旧路径。</p>

<hr />

<h3 id="群体智能的一个重要特点">群体智能的一个重要特点</h3>

<p>蚁群算法的特别之处在于：</p>

<p><strong>个体极其简单，但群体行为高度复杂。</strong></p>

<p>单个蚂蚁只具备一些极度短视的能力，包括：</p>

<ul>
  <li>随机探索</li>
  <li>信息素跟随</li>
  <li>信息素沉积</li>
</ul>

<p>整个种群却能产生种种智能体才能具备的行为，比如：</p>

<ul>
  <li>最短路径发现</li>
  <li>动态环境适应</li>
  <li>群体协作</li>
</ul>

<p>这种现象被称为 <strong>Emergent Intelligence（涌现智能）</strong>， 类似机制也出现在以下领域</p>

<ul>
  <li>鸟群模型（Boids）</li>
  <li>鱼群行为</li>
  <li>细菌趋化</li>
  <li>神经网络学习</li>
</ul>

<p>类似这样， <strong>局部规则 + 环境记忆 → 群体智能。</strong> 每只蚂蚁并不知道最短路径在哪里，但通过不断强化有效路径，整个系统像一台计算机一样，会通过不断试错“计算”出最优解。</p>

<p>换句话说， <strong>优化并不一定需要中央控制。</strong> 自然界通过极其简单的短视规则，就能完成复杂问题的求解。这与 LLM 是相近的，大量“预测下一个字”的小机制复合成具有智能的大系统。所以 LLM 表现出的智能是涌现出来的。</p>

<hr />

<h2 id="实时模拟">实时模拟</h2>

<link rel="stylesheet" href="/blog/src/simulation/2026-03-06-ant-simulation/style.css" />

<div class="card">
    <canvas id="antCanvas" width="1000" height="600"></canvas>

    <div class="stats-panel">
        <div class="stats">
            <div class="stat-item"><span class="stat-label">🐜 蚂蚁</span><span class="stat-value" id="antCounter">0</span></div>
            <div class="stat-item"><span class="stat-label">🍎 食物</span><span class="stat-value" id="foodCounter">2</span></div>
            <div class="stat-item"><span class="stat-label">🏠 回家中</span><span class="stat-value" id="returningCounter">0</span></div>
            <div class="stat-item"><span class="stat-label">帧耗时</span><span class="stat-value" id="fpsDisplay">0</span><span style="color:#7f92b0;">ms</span></div>
        </div>
        <div class="legend">
            <span><span class="dot-demo" style="background:#8aff8a;"></span>食物信息素</span>
            <span><span class="dot-demo" style="background:#5cc8ff;"></span>巢穴信息素</span>
            <span><span class="dot-demo" style="background:#ffe066;"></span>搬运工</span>
        </div>
    </div>

    <div class="control-bar">
        <div class="slider-item"><span>🎲 探索</span><input type="range" id="exploreRate" min="0.0" max="0.3" value="0.01" step="0.01" /></div>
        <span style="color:#a0e0d0; margin-left:auto;">点击画布加食物</span>
        <button id="resetButton">🌱 重置蚁群</button>
    </div>
    <footer>🪹 巢穴 · 双信息素独立叠加 · 超过阈值停止排放</footer>
</div>

<script src="/blog/src/simulation/2026-03-06-ant-simulation/ants.js">
</script>

<hr />

<h2 id="蚁群与信息素">蚁群与信息素</h2>

<p>自然界蚂蚁的协同行为主要依赖 <strong>信息素 (pheromone)</strong>。
单个蚂蚁几乎没有全局认知能力，但通过在环境中留下化学信号，可以形成一种 <strong>间接通信机制（stigmergy）</strong>。</p>

<p>在模拟中环境被离散为网格：</p>

\[G = {g_{i,j}}, \quad i=1..C, j=1..R\]

<p>每个格子记录两种信息素：</p>

<ol>
  <li>
    <p><strong>食物信息素</strong>(foodPheromone)</p>

\[P_f(i,j)\]

    <p>表示通往食物源的路径强度。</p>
  </li>
  <li>
    <p><strong>巢穴信息素</strong>(homePheromone)</p>

\[P_h(i,j)\]

    <p>表示通往巢穴的路径强度。</p>

    <p>蚂蚁在移动过程中会在当前位置沉积信息素：</p>

    <ul>
      <li>觅食蚂蚁留下 <strong>回巢路径</strong></li>
      <li>携带食物的蚂蚁留下 <strong>食物路径</strong></li>
    </ul>

    <p>信息素随时间挥发：</p>

\[P(t+1)=\max(0, P(t)-\lambda)\]

    <p>这保证旧路径会逐渐消失，系统能够适应新的食物源。</p>
  </li>
</ol>

<h3 id="永远能回家的策略">永远能回家的策略</h3>

<p>系统中每只蚂蚁具有两种状态：</p>

<ul>
  <li>觅食蚂蚁处于状态：STATE_FORAGING  (寻找食物)</li>
  <li>回巢蚂蚁处于状态：STATE_CARRYING  (携带食物回巢)</li>
</ul>

<p>觅食蚂蚁在移动时不断释放 <strong>home pheromone</strong>，并且强度随时间而减小</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>```javascript
homePheromone[idx] = deposit
```
</code></pre></div></div>

<p>当蚂蚁获得食物后，其行为策略发生反转：</p>

<ul>
  <li>不再跟随食物信息素</li>
  <li>改为跟随 <strong>home pheromone 梯度</strong></li>
</ul>

<p>在实现中，蚂蚁在 3×3 邻域寻找最大梯度方向， 这相当于执行一个离散梯度上升：</p>

\[v_{t+1} = v_t + \alpha (\nabla P - v_t)\]

<p>因此只要路径曾被探索过，回家的梯度就始终存在。
这就是蚂蚁“永远能回家”的机制。</p>

<h3 id="引导到食物的策略">引导到食物的策略</h3>

<p>我们的虚拟蚂蚁按照以下规则引导同伴找到食物</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>```javascript
// 当蚂蚁成功找到食物并开始返回巢穴时，它会留下 **food pheromone**：
// 这个值随着蚂蚁距离食物的距离增加而减小
foodPheromone[idx] = deposit

// 同时记录 **信息素寿命**
foodPheromoneAge[idx] = limit

// 当寿命结束后信息素快速衰减：
foodPheromone[i] -= fps
```
</code></pre></div></div>

<p>这种设计产生两个效果：</p>

<ol>
  <li><strong>新路径更强</strong></li>
  <li><strong>旧路径自动消失</strong></li>
</ol>

<p>因此系统会自动收敛到 <strong>最短路径</strong>。
原因很简单：
较短路径被距离食物的路程更近，因此容易标记成大值。</p>

<p>设路径长度为 (L)，单位时间往返次数约为</p>

\[n \propto \frac{1}{L}\]

<p>沉积速率</p>

\[\frac{dP}{dt} \propto \frac{1}{L}\]

<p>于是短路径的信息素浓度更高，蚂蚁更容易跟随它。
这就是经典 <strong>positive feedback + evaporation</strong> 机制。</p>

<h3 id="群体模拟">群体模拟</h3>

<p>整个系统是一个 <strong>agent-based simulation</strong>。
系统状态可以写为：</p>

\[S = (A, P_f, P_h)\]

<p>其中</p>

<ul>
  <li>$A$ 为所有蚂蚁状态</li>
  <li>$P_f$ 食物信息素场</li>
  <li>$P_h$ 巢穴信息素场</li>
</ul>

<p>每一帧执行以下步骤：</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>```javascript
// 1. 信息素挥发
updatePheromones()

// 2. 蚂蚁决策
applyAntDecision()

// 3. 移动
ant.x += vx
ant.y += vy

// 4. 沉积信息素
depositPheromone()

// 5. 环境交互
handleInteractions()
```
</code></pre></div></div>

<p>系统行为具有几个典型 emergent phenomena:</p>

<ol>
  <li>
    <p>路径自组织
 随机探索 → 信息素放大 → 稳定路径</p>
  </li>
  <li>
    <p>最短路径收敛
 由于短路径往返频率更高。</p>
  </li>
  <li>
    <p>动态适应
 当食物消失时，路径随时间而消失</p>

    <div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code> ```txt
 pheromone → evaporation → path vanish
 ```
</code></pre></div>    </div>

    <p>群体重新探索。</p>
  </li>
</ol>]]></content><author><name>Listenzcc</name></author><category term="Simulation" /><summary type="html"><![CDATA[本文通过程序模拟解释 How do the ants work together? 这个问题。]]></summary></entry><entry><title type="html">Grid in WebGL</title><link href="https://listenzcc.github.io/blog/2026-02-25/grid-in-webgl" rel="alternate" type="text/html" title="Grid in WebGL" /><published>2026-02-25T00:00:00+00:00</published><updated>2026-02-25T00:00:00+00:00</updated><id>https://listenzcc.github.io/blog/2026-02-25/grid-in-webgl</id><content type="html" xml:base="https://listenzcc.github.io/blog/2026-02-25/grid-in-webgl"><![CDATA[<p>Drawing the grid using the WebGL.</p>

<hr />

<ul id="markdown-toc">
  <li><a href="#使用-webgl-绘制可交互的网格" id="markdown-toc-使用-webgl-绘制可交互的网格">使用 WebGL 绘制可交互的网格</a></li>
  <li><a href="#程序概览" id="markdown-toc-程序概览">程序概览</a></li>
  <li><a href="#核心技术点" id="markdown-toc-核心技术点">核心技术点</a>    <ul>
      <li><a href="#1-webgl-上下文与画布适配" id="markdown-toc-1-webgl-上下文与画布适配">1. WebGL 上下文与画布适配</a></li>
      <li><a href="#2-着色器代码组织" id="markdown-toc-2-着色器代码组织">2. 着色器代码组织</a></li>
      <li><a href="#3-顶点着色器" id="markdown-toc-3-顶点着色器">3. 顶点着色器</a></li>
      <li><a href="#4-片段着色器与网格生成" id="markdown-toc-4-片段着色器与网格生成">4. 片段着色器与网格生成</a></li>
      <li><a href="#5-数据传递与-gui-控制" id="markdown-toc-5-数据传递与-gui-控制">5. 数据传递与 GUI 控制</a></li>
      <li><a href="#6-渲染循环" id="markdown-toc-6-渲染循环">6. 渲染循环</a></li>
    </ul>
  </li>
  <li><a href="#总结" id="markdown-toc-总结">总结</a></li>
</ul>

<h2 id="使用-webgl-绘制可交互的网格">使用 WebGL 绘制可交互的网格</h2>

<p>在前端图形编程中，网格是一种非常基础且常见的视觉元素。无论是作为坐标参考系，还是作为可视化背景，网格都能帮助我们更好地理解空间关系。本文将通过一个完整的 WebGL 示例，展示如何绘制一个动态的、可交互的网格，并且支持直角坐标和极坐标两种模式。</p>

<p>你将看到一个可交互的网格。直角网格下，背景为简单的红蓝渐变；极坐标模式下，背景变为色环，网格线沿角度和半径方向分布。通过调节参数，你可以直观地看到线条粗细、密度以及边缘柔和度的变化。</p>

<div>
    <canvas id="canvas"></canvas>
</div>
<script src="/blog/src/gui/dat.gui.min.js"></script>

<script src="/blog/src/webgl/2026-02-25-grid-in-webgl.js"></script>

<h2 id="程序概览">程序概览</h2>

<p>这个程序使用原生 WebGL 在画布上绘制网格，并通过 <code class="language-plaintext highlighter-rouge">dat.GUI</code> 提供了实时控制参数的面板。核心功能包括：</p>

<ul>
  <li>自适应画布尺寸（保持 16:9 比例）</li>
  <li>两种网格模式：直角坐标网格和极坐标网格</li>
  <li>可调节的网格密度、线宽、边缘羽化（feather）</li>
  <li>使用着色器中的 <code class="language-plaintext highlighter-rouge">wireframe</code> 函数实现平滑、抗锯齿的网格线</li>
</ul>

<h2 id="核心技术点">核心技术点</h2>

<h3 id="1-webgl-上下文与画布适配">1. WebGL 上下文与画布适配</h3>

<p>代码首先获取 canvas 元素，并设置其尺寸为父容器宽度的 16:9 比例。通过监听 <code class="language-plaintext highlighter-rouge">resize</code> 事件，画布可以在窗口大小改变时自适应调整。</p>

<div class="language-javascript highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">function</span> <span class="nx">resizeCanvas</span><span class="p">()</span> <span class="p">{</span>
  <span class="kd">const</span> <span class="nx">w</span> <span class="o">=</span> <span class="nx">main</span><span class="p">.</span><span class="nx">clientWidth</span><span class="p">;</span>
  <span class="nx">canvas</span><span class="p">.</span><span class="nx">width</span> <span class="o">=</span> <span class="nx">w</span><span class="p">;</span>
  <span class="nx">canvas</span><span class="p">.</span><span class="nx">height</span> <span class="o">=</span> <span class="nx">w</span> <span class="o">/</span> <span class="nx">ratio</span><span class="p">;</span>
  <span class="k">if</span> <span class="p">(</span><span class="nx">gl</span><span class="p">)</span> <span class="nx">gl</span><span class="p">.</span><span class="nx">viewport</span><span class="p">(</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="nx">canvas</span><span class="p">.</span><span class="nx">width</span><span class="p">,</span> <span class="nx">canvas</span><span class="p">.</span><span class="nx">height</span><span class="p">);</span>
<span class="p">}</span>
</code></pre></div></div>

<h3 id="2-着色器代码组织">2. 着色器代码组织</h3>

<p>为了保持代码清晰，作者将所有 GLSL 代码片段定义在一个 <code class="language-plaintext highlighter-rouge">glsl</code> 对象中，包括：</p>

<ul>
  <li><strong>标准导数扩展</strong> <code class="language-plaintext highlighter-rouge">OES_standard_derivatives</code>：用于 <code class="language-plaintext highlighter-rouge">fwidth</code> 函数，实现抗锯齿线条。</li>
  <li><strong>数学常量</strong> 如 PI、复数运算辅助函数。</li>
  <li><strong>HSV 转 RGB</strong> 函数，用于极坐标模式下生成彩色背景。</li>
  <li><strong>复数运算</strong> 函数集（虽然本示例中未直接使用，但为扩展留有余地）。</li>
  <li><strong>wireframe 函数</strong>：核心网格线算法，支持不同维度的参数。</li>
</ul>

<h3 id="3-顶点着色器">3. 顶点着色器</h3>

<p>顶点着色器非常简单：接收一个二维顶点位置（范围 -1 到 1），将其乘以宽高比 <code class="language-plaintext highlighter-rouge">u_ratio</code> 后传递给片段着色器。这样做是为了保持网格在不同屏幕比例下显示为均匀的方格。</p>

<div class="language-glsl highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="k">attribute</span> <span class="kt">vec2</span> <span class="n">position</span><span class="p">;</span>
<span class="k">uniform</span> <span class="kt">float</span> <span class="n">u_ratio</span><span class="p">;</span>
<span class="k">varying</span> <span class="kt">vec2</span> <span class="n">v_position</span><span class="p">;</span>

<span class="kt">void</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span>
    <span class="nb">gl_Position</span> <span class="o">=</span> <span class="kt">vec4</span><span class="p">(</span><span class="n">position</span><span class="p">,</span> <span class="mi">0</span><span class="p">.</span><span class="mi">0</span><span class="p">,</span> <span class="mi">1</span><span class="p">.</span><span class="mi">0</span><span class="p">);</span>
    <span class="n">v_position</span> <span class="o">=</span> <span class="kt">vec2</span><span class="p">(</span><span class="n">position</span><span class="p">.</span><span class="n">x</span> <span class="o">*</span> <span class="n">u_ratio</span><span class="p">,</span> <span class="n">position</span><span class="p">.</span><span class="n">y</span><span class="p">);</span>
<span class="p">}</span>
</code></pre></div></div>

<h3 id="4-片段着色器与网格生成">4. 片段着色器与网格生成</h3>

<p>片段着色器包含了两种网格模式的核心逻辑：</p>

<ul>
  <li><strong>直角坐标网格</strong>：直接使用 <code class="language-plaintext highlighter-rouge">v_position</code> 乘以网格密度因子 <code class="language-plaintext highlighter-rouge">u_gridSize</code>，然后通过 <code class="language-plaintext highlighter-rouge">wireframe</code> 函数计算该点是否靠近网格线。</li>
  <li><strong>极坐标网格</strong>：将坐标转换为极坐标形式 <code class="language-plaintext highlighter-rouge">(半径, 角度)</code>，角度归一化到 <code class="language-plaintext highlighter-rouge">[0,1)</code> 范围，同样使用 <code class="language-plaintext highlighter-rouge">wireframe</code> 函数绘制同心圆和径向线。</li>
</ul>

<h4 id="wireframe-函数解析">wireframe 函数解析</h4>

<p><code class="language-plaintext highlighter-rouge">wireframe</code> 函数是实现高质量网格的关键。它利用了导数的思想，根据屏幕空间的变化率自适应地调整线条宽度，从而避免锯齿。</p>

<p>核心思路：对输入的参数（如坐标）取小数部分，并计算到最近整数线的距离。通过 <code class="language-plaintext highlighter-rouge">fwidth</code> 获得该参数在屏幕上的变化率，结合线宽和羽化值，使用 <code class="language-plaintext highlighter-rouge">smoothstep</code> 生成平滑过渡的线条。</p>

<div class="language-glsl highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kt">float</span> <span class="nf">wireframe</span> <span class="p">(</span><span class="kt">vec2</span> <span class="n">parameter</span><span class="p">,</span> <span class="kt">float</span> <span class="n">width</span><span class="p">,</span> <span class="kt">float</span> <span class="n">feather</span><span class="p">)</span> <span class="p">{</span>
    <span class="kt">float</span> <span class="n">w1</span> <span class="o">=</span> <span class="n">width</span> <span class="o">-</span> <span class="n">feather</span> <span class="o">*</span> <span class="mi">0</span><span class="p">.</span><span class="mi">5</span><span class="p">;</span>
    <span class="kt">vec2</span> <span class="n">d</span> <span class="o">=</span> <span class="n">fwidth</span><span class="p">(</span><span class="n">parameter</span><span class="p">);</span>
    <span class="kt">vec2</span> <span class="n">looped</span> <span class="o">=</span> <span class="mi">0</span><span class="p">.</span><span class="mi">5</span> <span class="o">-</span> <span class="n">abs</span><span class="p">(</span><span class="n">mod</span><span class="p">(</span><span class="n">parameter</span><span class="p">,</span> <span class="mi">1</span><span class="p">.</span><span class="mi">0</span><span class="p">)</span> <span class="o">-</span> <span class="mi">0</span><span class="p">.</span><span class="mi">5</span><span class="p">);</span>
    <span class="kt">vec2</span> <span class="n">a2</span> <span class="o">=</span> <span class="n">smoothstep</span><span class="p">(</span><span class="n">d</span> <span class="o">*</span> <span class="n">w1</span><span class="p">,</span> <span class="n">d</span> <span class="o">*</span> <span class="p">(</span><span class="n">w1</span> <span class="o">+</span> <span class="n">feather</span><span class="p">),</span> <span class="n">looped</span><span class="p">);</span>
    <span class="k">return</span> <span class="n">min</span><span class="p">(</span><span class="n">a2</span><span class="p">.</span><span class="n">x</span><span class="p">,</span> <span class="n">a2</span><span class="p">.</span><span class="n">y</span><span class="p">);</span>
<span class="p">}</span>
</code></pre></div></div>

<h4 id="颜色混合">颜色混合</h4>

<p>在片段着色器中，首先根据模式计算基础颜色（直角坐标下为简单的渐变，极坐标下使用 HSV 生成色环），然后将网格因子与背景混合，使网格线呈现白色半透明效果。</p>

<div class="language-glsl highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="n">gridFactor</span> <span class="o">=</span> <span class="mi">1</span><span class="p">.</span><span class="mi">0</span> <span class="o">-</span> <span class="n">wireframe</span><span class="p">(...);</span>
<span class="nb">gl_FragColor</span> <span class="o">=</span> <span class="n">mix</span><span class="p">(</span><span class="kt">vec4</span><span class="p">(</span><span class="n">rgb</span><span class="p">,</span> <span class="mi">1</span><span class="p">.</span><span class="mi">0</span><span class="p">),</span> <span class="kt">vec4</span><span class="p">(</span><span class="kt">vec3</span><span class="p">(</span><span class="mi">1</span><span class="p">.</span><span class="mi">0</span><span class="p">),</span> <span class="n">gridFactor</span><span class="p">),</span> <span class="n">gridFactor</span><span class="o">*</span><span class="mi">0</span><span class="p">.</span><span class="mi">5</span><span class="p">);</span>
</code></pre></div></div>

<h3 id="5-数据传递与-gui-控制">5. 数据传递与 GUI 控制</h3>

<p>通过 <code class="language-plaintext highlighter-rouge">dat.GUI</code> 创建控制面板，调整以下参数：</p>

<ul>
  <li><strong>Grid Size</strong>：网格密度</li>
  <li><strong>Line Width</strong>：线条宽度</li>
  <li><strong>Line Feather</strong>：边缘羽化程度</li>
  <li><strong>Polar Grid</strong>：切换直角/极坐标模式</li>
</ul>

<p>每次参数改变时，更新对应的 uniform 值。</p>

<h3 id="6-渲染循环">6. 渲染循环</h3>

<p>使用 <code class="language-plaintext highlighter-rouge">requestAnimationFrame</code> 驱动持续渲染，保证画布实时更新。</p>

<h2 id="总结">总结</h2>

<p>这个示例展示了 WebGL 在绘制基本图形方面的灵活性。通过组合简单的顶点数据和强大的片段着色器，我们可以实现各种复杂的视觉效果。<code class="language-plaintext highlighter-rouge">wireframe</code> 函数的技巧尤其值得借鉴，它利用屏幕空间导数实现了设备无关的线条渲染，是抗锯齿线条的常用方法。</p>

<p>希望这篇文章能帮助你理解 WebGL 渲染管线以及如何利用着色器绘制高质量的网格。完整代码可以在文末找到，你也可以在此基础上扩展更多功能，比如动态动画、纹理映射等。</p>]]></content><author><name>Listenzcc</name></author><category term="WebGL" /><summary type="html"><![CDATA[Drawing the grid using the WebGL.]]></summary></entry><entry><title type="html">Welcome to Jekyll!</title><link href="https://listenzcc.github.io/blog/2026-02-24/welcome-to-jekyll" rel="alternate" type="text/html" title="Welcome to Jekyll!" /><published>2026-02-24T04:57:22+00:00</published><updated>2026-02-24T04:57:22+00:00</updated><id>https://listenzcc.github.io/blog/2026-02-24/welcome-to-jekyll</id><content type="html" xml:base="https://listenzcc.github.io/blog/2026-02-24/welcome-to-jekyll"><![CDATA[<p>You’ll find this post in your <code class="language-plaintext highlighter-rouge">_posts</code> directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run <code class="language-plaintext highlighter-rouge">jekyll serve</code>, which launches a web server and auto-regenerates your site when a file is updated.</p>

<h2 id="jekyll-intro">Jekyll Intro</h2>

<p>Jekyll requires blog post files to be named according to the following format:</p>

<p><code class="language-plaintext highlighter-rouge">YEAR-MONTH-DAY-title.MARKUP</code></p>

<p>Where <code class="language-plaintext highlighter-rouge">YEAR</code> is a four-digit number, <code class="language-plaintext highlighter-rouge">MONTH</code> and <code class="language-plaintext highlighter-rouge">DAY</code> are both two-digit numbers, and <code class="language-plaintext highlighter-rouge">MARKUP</code> is the file extension representing the format used in the file. After that, include the necessary front matter. Take a look at the source for this post to get an idea about how it works.</p>

<p>Jekyll also offers powerful support for code snippets:</p>

<figure class="highlight"><pre><code class="language-ruby" data-lang="ruby"><span class="k">def</span> <span class="nf">print_hi</span><span class="p">(</span><span class="nb">name</span><span class="p">)</span>
  <span class="nb">puts</span> <span class="s2">"Hi, </span><span class="si">#{</span><span class="nb">name</span><span class="si">}</span><span class="s2">"</span>
<span class="k">end</span>
<span class="n">print_hi</span><span class="p">(</span><span class="s1">'Tom'</span><span class="p">)</span>

<span class="c1"># =&gt; prints 'Hi, Tom' to STDOUT</span></code></pre></figure>

<p>Check out the <a href="https://jekyllrb.com/docs/home">Jekyll docs</a> for more info on how to get the most out of Jekyll. File all bugs/feature requests at <a href="https://github.com/jekyll/jekyll">Jekyll’s GitHub repo</a>. If you have questions, you can ask them on <a href="https://talk.jekyllrb.com/">Jekyll Talk</a>.</p>]]></content><author><name></name></author><category term="Jekyll" /><category term="Update" /><summary type="html"><![CDATA[You’ll find this post in your _posts directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run jekyll serve, which launches a web server and auto-regenerates your site when a file is updated.]]></summary></entry><entry><title type="html">Several Tests</title><link href="https://listenzcc.github.io/blog/2026-02-24/several-tests" rel="alternate" type="text/html" title="Several Tests" /><published>2026-02-24T00:00:00+00:00</published><updated>2026-02-24T00:00:00+00:00</updated><id>https://listenzcc.github.io/blog/2026-02-24/several-tests</id><content type="html" xml:base="https://listenzcc.github.io/blog/2026-02-24/several-tests"><![CDATA[<p>Several tests on jekyll formats.</p>

<h2 id="local-js-file-test">Local js File Test</h2>

<p>Test the local js file, which adds the svg to the <code class="language-plaintext highlighter-rouge">#svgDiv</code>.</p>

<div id="svgDiv">
</div>
<script src="/blog/src/default.js"></script>

<script src="/blog/src/add-svg.js"></script>

<h2 id="equation-test">Equation Test</h2>

<p>Inline equation $\beta=3$</p>

<p>Block equation</p>

\[\tag{1.1} \alpha = 3\]

<h2 id="table-test">Table Test</h2>

<p>Table 1</p>

<table>
  <thead>
    <tr>
      <th style="text-align: center">:    Easy Multiline   :</th>
      <th style="text-align: left"> </th>
      <th style="text-align: left"> </th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td style="text-align: center">Apple</td>
      <td style="text-align: left">Banana</td>
      <td style="text-align: left">Orange  \</td>
    </tr>
    <tr>
      <td style="text-align: center">Apple</td>
      <td style="text-align: left">Banana</td>
      <td style="text-align: left">Orange  \</td>
    </tr>
    <tr>
      <td style="text-align: center">Apple</td>
      <td style="text-align: left">Banana</td>
      <td style="text-align: left">Orange</td>
    </tr>
    <tr>
      <td style="text-align: center">Apple</td>
      <td style="text-align: left">Banana</td>
      <td style="text-align: left">Orange  \</td>
    </tr>
    <tr>
      <td style="text-align: center">Apple</td>
      <td style="text-align: left">Banana</td>
      <td style="text-align: left">Orange</td>
    </tr>
    <tr>
      <td style="text-align: center">Apple</td>
      <td style="text-align: left">Banana</td>
      <td style="text-align: left">Orange</td>
    </tr>
  </tbody>
</table>

<p>Table 2</p>

<table>
  <tbody>
    <tr>
      <td>♜</td>
      <td> </td>
      <td>♝</td>
      <td>♛</td>
      <td>♚</td>
      <td>♝</td>
      <td>♞</td>
      <td>♜</td>
    </tr>
    <tr>
      <td> </td>
      <td>♟</td>
      <td>♟</td>
      <td>♟</td>
      <td> </td>
      <td>♟</td>
      <td>♟</td>
      <td>♟</td>
    </tr>
    <tr>
      <td>♟</td>
      <td> </td>
      <td>♞</td>
      <td> </td>
      <td> </td>
      <td> </td>
      <td> </td>
      <td> </td>
    </tr>
    <tr>
      <td> </td>
      <td>♗</td>
      <td> </td>
      <td> </td>
      <td>♟</td>
      <td> </td>
      <td> </td>
      <td> </td>
    </tr>
    <tr>
      <td> </td>
      <td> </td>
      <td> </td>
      <td> </td>
      <td>♙</td>
      <td> </td>
      <td> </td>
      <td> </td>
    </tr>
    <tr>
      <td> </td>
      <td> </td>
      <td> </td>
      <td> </td>
      <td> </td>
      <td>♘</td>
      <td> </td>
      <td> </td>
    </tr>
    <tr>
      <td>♙</td>
      <td>♙</td>
      <td>♙</td>
      <td>♙</td>
      <td> </td>
      <td>♙</td>
      <td>♙</td>
      <td>♙</td>
    </tr>
    <tr>
      <td>♖</td>
      <td>♘</td>
      <td>♗</td>
      <td>♕</td>
      <td>♔</td>
      <td> </td>
      <td> </td>
      <td>♖</td>
    </tr>
  </tbody>
</table>]]></content><author><name></name></author><category term="Jekyll" /><category term="Tests" /><summary type="html"><![CDATA[Several tests on jekyll formats.]]></summary></entry><entry><title type="html">Sticky Posts</title><link href="https://listenzcc.github.io/blog/2021-05-03/sticky-posts" rel="alternate" type="text/html" title="Sticky Posts" /><published>2021-05-03T00:00:00+00:00</published><updated>2021-05-03T00:00:00+00:00</updated><id>https://listenzcc.github.io/blog/2021-05-03/sticky-posts</id><content type="html" xml:base="https://listenzcc.github.io/blog/2021-05-03/sticky-posts"><![CDATA[<p>Sticky, or pinned, posts are featured on the top of every page. Tale provides some flexibility when it comes to this feature.<!--more--> There is no limit on the number of sticky posts you can have. Although do note that each page will show all your sticky posts + the paginated posts. So if you have 4 sticky posts and 5 posts per page, each page can display up to 9 posts.</p>

<h2 id="making-a-post-sticky">Making a post “sticky”</h2>

<p>Add <code class="language-plaintext highlighter-rouge">sticky: true</code> to the frontmatter of your blog post.</p>

<h3 id="exclude-sticky-post-from-paginated-posts">Exclude sticky post from paginated posts</h3>

<p>By default, sticky posts are still included in the paginated posts. To exclude a sticky post from paginated posts, add <code class="language-plaintext highlighter-rouge">hidden: true</code> to the frontmatter of that blog post.</p>

<h2 id="example">Example</h2>

<p>See the <a href="https://github.com/chesterhow/tale/blob/master/_posts/2017-03-29-introducing-tale.md">“Introducing Tale” post</a>.</p>]]></content><author><name>Chester</name></author><category term="Tutorial" /><summary type="html"><![CDATA[Sticky, or pinned, posts are featured on the top of every page. Tale provides some flexibility when it comes to this feature.]]></summary></entry><entry><title type="html">Managing Excerpt</title><link href="https://listenzcc.github.io/blog/2021-04-30/managing-excerpt" rel="alternate" type="text/html" title="Managing Excerpt" /><published>2021-04-30T00:00:00+00:00</published><updated>2021-04-30T00:00:00+00:00</updated><id>https://listenzcc.github.io/blog/2021-04-30/managing-excerpt</id><content type="html" xml:base="https://listenzcc.github.io/blog/2021-04-30/managing-excerpt"><![CDATA[<p>You can customise the excerpt (the text displayed below each post on the homepage) using the <code class="language-plaintext highlighter-rouge">excerpt-separator</code>.<!--more--> Here’s how you can do so!</p>

<h2 id="steps">Steps</h2>

<ol>
  <li>
    <p>Add <code class="language-plaintext highlighter-rouge">excerpt_separator: &lt;!--more--&gt;</code> to the frontmatter of your blog post.</p>
  </li>
  <li>
    <p>Insert this <code class="language-plaintext highlighter-rouge">&lt;!--more--&gt;</code> at where you would like the excerpt to cut off in your blog post.</p>
  </li>
</ol>

<h3 id="note">Note</h3>

<p>This follows <a href="https://jekyllrb.com/docs/posts/#post-excerpts">Jekyll’s recommended way of managing excerpts</a>.</p>

<h2 id="example">Example</h2>

<p>See <a href="https://github.com/chesterhow/tale/blob/master/_posts/2021-04-30-managing-excerpt.md">this post</a> or the <a href="https://github.com/chesterhow/tale/blob/master/_posts/2017-03-29-introducing-tale.md">“Introducing Tale” post</a>.</p>]]></content><author><name>Chester</name></author><category term="Tutorial" /><summary type="html"><![CDATA[You can customise the excerpt (the text displayed below each post on the homepage) using the excerpt-separator.]]></summary></entry><entry><title type="html">Introducing Tale</title><link href="https://listenzcc.github.io/blog/2017-03-29/introducing-tale" rel="alternate" type="text/html" title="Introducing Tale" /><published>2017-03-29T00:00:00+00:00</published><updated>2017-03-29T00:00:00+00:00</updated><id>https://listenzcc.github.io/blog/2017-03-29/introducing-tale</id><content type="html" xml:base="https://listenzcc.github.io/blog/2017-03-29/introducing-tale"><![CDATA[<p>Tale is a minimal <a href="https://jekyllrb.com/">Jekyll</a> theme curated for storytellers. It is designed and developed by <a href="https://github.com/chesterhow/">myself</a> for a friend who writes short stories.<!--more--></p>

<h2 id="tale-features">Tale features</h2>

<ul>
  <li>Compatible with GitHub Pages</li>
  <li>Responsive design (looks just as good on mobile)</li>
  <li>Syntax highlighting, with the help of Pygments</li>
  <li>Markdown and HTML text formatting</li>
  <li>Pagination of posts</li>
  <li>Sticky posts</li>
  <li>Tags</li>
  <li>Excerpt management</li>
  <li>Disqus comments</li>
</ul>

<p>Head over to the <a href="/blog/2017-03-16/example-content">Example Content</a> post for a showcase of Tale’s text formatting features.</p>

<h2 id="browser-support">Browser Support</h2>

<p>Tale works on most if not all modern browsers, including Chrome, Safari and Firefox 👍🏼</p>

<h2 id="download-or-contribute">Download or Contribute</h2>

<p>Tale is publicly hosted on GitHub, so go ahead and download or fork it at the <a href="https://github.com/chesterhow/tale">GitHub repository</a>. If you spot any bugs or have any suggestions, feel free to create an issue or make a pull request.</p>

<p>Thanks for checking out Tale!</p>]]></content><author><name>Chester</name></author><category term="Tale" /><summary type="html"><![CDATA[Tale is a minimal Jekyll theme curated for storytellers. It is designed and developed by myself for a friend who writes short stories.]]></summary></entry><entry><title type="html">Example Content</title><link href="https://listenzcc.github.io/blog/2017-03-16/example-content" rel="alternate" type="text/html" title="Example Content" /><published>2017-03-16T00:00:00+00:00</published><updated>2017-03-16T00:00:00+00:00</updated><id>https://listenzcc.github.io/blog/2017-03-16/example-content</id><content type="html" xml:base="https://listenzcc.github.io/blog/2017-03-16/example-content"><![CDATA[<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas tincidunt ornare nibh, non elementum augue tempus eget. Pellentesque tempus scelerisque iaculis.<!--more--> Nullam interdum ultricies nibh quis sollicitudin. Donec ornare fermentum facilisis. Ut at sem ac sem imperdiet varius a eget tortor. Nam eu augue eget orci semper maximus in eget augue. Mauris ornare, nisl ut suscipit consectetur, mi quam interdum tellus, at rutrum quam eros ultrices mi.</p>

<h1 id="headers">Headers</h1>

<figure class="highlight"><pre><code class="language-markdown" data-lang="markdown"><span class="gh"># H1</span>
<span class="gu">## H2</span>
<span class="gu">### H3</span>
<span class="gu">#### H4</span>
<span class="gu">##### H5</span>
<span class="gu">###### H6</span></code></pre></figure>

<h1 id="h1">H1</h1>
<h2 id="h2">H2</h2>
<h3 id="h3">H3</h3>
<h4 id="h4">H4</h4>
<h5 id="h5">H5</h5>
<h6 id="h6">H6</h6>

<h1 id="text-formatting">Text formatting</h1>

<figure class="highlight"><pre><code class="language-markdown" data-lang="markdown"><span class="p">-</span> <span class="gs">**Bold**</span>
<span class="p">-</span> _Italics_
<span class="p">-</span> ~~Strikethrough~~
<span class="p">-</span> <span class="nt">&lt;ins&gt;</span>Underline<span class="nt">&lt;/ins&gt;</span>
<span class="p">-</span> <span class="nt">&lt;sup&gt;</span>Superscript<span class="nt">&lt;/sup&gt;</span>
<span class="p">-</span> <span class="nt">&lt;sub&gt;</span>Subscript<span class="nt">&lt;/sub&gt;</span>
<span class="p">-</span> Abbreviation: <span class="nt">&lt;abbr</span> <span class="na">title=</span><span class="s">"HyperText Markup Language"</span><span class="nt">&gt;</span>HTML<span class="nt">&lt;/abbr&gt;</span>
<span class="p">-</span> Citation: <span class="nt">&lt;cite&gt;</span><span class="ni">&amp;mdash;</span> Chester How<span class="nt">&lt;/cite&gt;</span></code></pre></figure>

<ul>
  <li><strong>Bold</strong></li>
  <li><em>Italics</em></li>
  <li><del>Strikethrough</del></li>
  <li><ins>Underline</ins></li>
  <li><sup>Superscript</sup></li>
  <li><sub>Subscript</sub></li>
  <li>Abbreviation: <abbr title="HyperText Markup Language">HTML</abbr></li>
  <li>Citation: <cite>— Chester How</cite></li>
</ul>

<h1 id="lists">Lists</h1>

<figure class="highlight"><pre><code class="language-markdown" data-lang="markdown"><span class="p">1.</span> Ordered list item 1
<span class="p">2.</span> Ordered list item 2
<span class="p">3.</span> Ordered list item 3
<span class="p">
*</span> Unordered list item 1
<span class="p">*</span> Unordered list item 2
<span class="p">*</span> Unordered list item 3</code></pre></figure>

<ol>
  <li>Ordered list item 1</li>
  <li>Ordered list item 2</li>
  <li>Ordered list item 3</li>
</ol>

<ul>
  <li>Unordered list item 1</li>
  <li>Unordered list item 2</li>
  <li>Unordered list item 3</li>
</ul>

<h1 id="links">Links</h1>

<figure class="highlight"><pre><code class="language-markdown" data-lang="markdown">Check out tale on <span class="p">[</span><span class="nv">GitHub</span><span class="p">](</span><span class="sx">https://github.com/chesterhow/tale</span><span class="p">)</span>.</code></pre></figure>

<p>Check out tale on <a href="https://github.com/chesterhow/tale">GitHub</a>.</p>

<h1 id="images">Images</h1>

<figure class="highlight"><pre><code class="language-markdown" data-lang="markdown"><span class="p">![</span><span class="nv">Placeholder image</span><span class="p">](</span><span class="sx">https://placehold.it/800x400</span> <span class="nn">"Placeholder image"</span><span class="p">)</span>

<span class="p">![</span><span class="nv">Image with caption</span><span class="p">](</span><span class="sx">https://placehold.it/700x400</span> <span class="nn">"Image with caption"</span><span class="p">)</span>
<span class="ge">_This is an image with a caption_</span></code></pre></figure>

<p><img src="https://placehold.it/800x400" alt="Placeholder image" title="Placeholder image" /></p>

<p><img src="https://placehold.it/700x400" alt="Image with caption" title="Image with caption" />
<em>This is an image with a caption</em></p>

<h1 id="code-and-syntax-highlighting">Code and Syntax Highlighting</h1>
<p>Use back-ticks for <code class="language-plaintext highlighter-rouge">inline code</code>. Multi-line code snippets are supported too through Pygments.</p>

<figure class="highlight"><pre><code class="language-js" data-lang="js"><span class="c1">// Sample javascript code</span>
<span class="kd">var</span> <span class="nx">s</span> <span class="o">=</span> <span class="dl">"</span><span class="s2">JavaScript syntax highlighting</span><span class="dl">"</span><span class="p">;</span>
<span class="nx">alert</span><span class="p">(</span><span class="nx">s</span><span class="p">);</span></code></pre></figure>

<figure class="highlight"><pre><code class="language-python" data-lang="python"><span class="c1"># Sample python code
</span><span class="n">s</span> <span class="o">=</span> <span class="s">"Python syntax highlighting"</span>
<span class="k">print</span> <span class="n">s</span></code></pre></figure>

<p>Adding <code class="language-plaintext highlighter-rouge">linenos</code> to the highlight tag enables line numbers.</p>

<figure class="highlight"><pre><code class="language-js" data-lang="js"><table class="rouge-table"><tbody><tr><td class="gutter gl"><pre class="lineno">1
2
3
</pre></td><td class="code"><pre><span class="c1">// Sample javascript code</span>
<span class="kd">var</span> <span class="nx">s</span> <span class="o">=</span> <span class="dl">"</span><span class="s2">JavaScript syntax highlighting</span><span class="dl">"</span><span class="p">;</span>
<span class="nx">alert</span><span class="p">(</span><span class="nx">s</span><span class="p">);</span>
</pre></td></tr></tbody></table></code></pre></figure>

<h1 id="blockquotes">Blockquotes</h1>

<figure class="highlight"><pre><code class="language-markdown" data-lang="markdown"><span class="gt">&gt; Curabitur blandit tempus porttitor. Nullam quis risus eget urna mollis ornare vel eu leo. Nullam id dolor id nibh ultricies vehicula ut id elit.</span></code></pre></figure>

<blockquote>
  <p>Curabitur blandit tempus porttitor. Nullam quis risus eget urna mollis ornare vel eu leo. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
</blockquote>

<h1 id="horizontal-rule--line-break">Horizontal Rule &amp; Line Break</h1>

<figure class="highlight"><pre><code class="language-markdown" data-lang="markdown">Use <span class="sb">`&lt;hr&gt;`</span> for horizontal rules

<span class="nt">&lt;hr&gt;</span>

and <span class="sb">`&lt;br&gt;`</span> for line breaks.

<span class="nt">&lt;br&gt;</span></code></pre></figure>

<p>Use <code class="language-plaintext highlighter-rouge">&lt;hr&gt;</code> for horizontal rules</p>

<hr />

<p>and <code class="language-plaintext highlighter-rouge">&lt;br&gt;</code> for line breaks.</p>

<p><br /></p>

<p><em>The end</em></p>]]></content><author><name>Chester</name></author><category term="Example" /><summary type="html"><![CDATA[Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas tincidunt ornare nibh, non elementum augue tempus eget. Pellentesque tempus scelerisque iaculis.]]></summary></entry><entry><title type="html">Welcome to Jekyll!</title><link href="https://listenzcc.github.io/blog/2017-03-10/welcome-to-jekyll" rel="alternate" type="text/html" title="Welcome to Jekyll!" /><published>2017-03-10T00:00:00+00:00</published><updated>2017-03-10T00:00:00+00:00</updated><id>https://listenzcc.github.io/blog/2017-03-10/welcome-to-jekyll</id><content type="html" xml:base="https://listenzcc.github.io/blog/2017-03-10/welcome-to-jekyll"><![CDATA[<p>You’ll find this post in your <code class="language-plaintext highlighter-rouge">_posts</code> directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run <code class="language-plaintext highlighter-rouge">jekyll serve</code>, which launches a web server and auto-regenerates your site when a file is updated.</p>

<p>To add new posts, simply add a file in the <code class="language-plaintext highlighter-rouge">_posts</code> directory that follows the convention <code class="language-plaintext highlighter-rouge">YYYY-MM-DD-name-of-post.ext</code> and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works.</p>

<p>Jekyll also offers powerful support for code snippets: like these</p>

<figure class="highlight"><pre><code class="language-ruby" data-lang="ruby"><span class="k">def</span> <span class="nf">print_hi</span><span class="p">(</span><span class="nb">name</span><span class="p">)</span>
  <span class="nb">puts</span> <span class="s2">"Hi, </span><span class="si">#{</span><span class="nb">name</span><span class="si">}</span><span class="s2">"</span>
<span class="k">end</span>
<span class="n">print_hi</span><span class="p">(</span><span class="s1">'Tom'</span><span class="p">)</span>
<span class="c1">#=&gt; prints 'Hi, Tom' to STDOUT.</span></code></pre></figure>

<p>Check out the <a href="https://jekyllrb.com/docs/home">Jekyll docs</a> for more info on how to get the most out of Jekyll. File all bugs/feature requests at <a href="https://github.com/jekyll/jekyll">Jekyll’s GitHub repo</a>. If you have questions, you can ask them on <a href="https://talk.jekyllrb.com/">Jekyll Talk</a>.</p>]]></content><author><name>Jekyll</name></author><category term="Jekyll" /><summary type="html"><![CDATA[You’ll find this post in your _posts directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run jekyll serve, which launches a web server and auto-regenerates your site when a file is updated.]]></summary></entry><entry><title type="html">The Case of the Missing Post</title><link href="https://listenzcc.github.io/blog/2017-03-07/the-case-of-the-missing-post" rel="alternate" type="text/html" title="The Case of the Missing Post" /><published>2017-03-07T00:00:00+00:00</published><updated>2017-03-07T00:00:00+00:00</updated><id>https://listenzcc.github.io/blog/2017-03-07/the-case-of-the-missing-post</id><content type="html" xml:base="https://listenzcc.github.io/blog/2017-03-07/the-case-of-the-missing-post"><![CDATA[<p>Kitty power! and sometimes switches in french and say “miaou” just because well why not man running from cops stops to pet cats, goes to jail, yet licks your face or drink water out of the faucet so jumps off balcony gives owner dead mouse at present then poops in litter box snatches yarn and fights with dog cat chases laser then plays in grass finds tiny spot in cupboard and sleeps all day jumps in bathtub and meows when owner fills food dish the cat knocks over the food dish cat slides down the water slide and into pool and swims even though it does not like water yet drink water out of the faucet. Pelt around the house and up and down stairs chasing phantoms.</p>

<p>Sit in window and stare ooo, a bird! yum. Sit and stare. Sweet beast loves cheeseburgers. Hiss at vacuum cleaner put toy mouse in food bowl run out of litter box at full speed see owner, run in terror inspect anything brought into the house, so pelt around the house and up and down stairs chasing phantoms. Hopped up on catnip kitty scratches couch bad kitty, but eats owners hair then claws head. Lie on your belly and purr when you are asleep kitty power! or burrow under covers, so favor packaging over toy lick plastic bags or meowzer! yet unwrap toilet paper.</p>

<p><a href="http://www.catipsum.com/">Cat Ipsum</a></p>]]></content><author><name>Chester</name></author><category term="Tale" /><summary type="html"><![CDATA[Kitty power! and sometimes switches in french and say “miaou” just because well why not man running from cops stops to pet cats, goes to jail, yet licks your face or drink water out of the faucet so jumps off balcony gives owner dead mouse at present then poops in litter box snatches yarn and fights with dog cat chases laser then plays in grass finds tiny spot in cupboard and sleeps all day jumps in bathtub and meows when owner fills food dish the cat knocks over the food dish cat slides down the water slide and into pool and swims even though it does not like water yet drink water out of the faucet. Pelt around the house and up and down stairs chasing phantoms.]]></summary></entry></feed>