-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.xml
46 lines (21 loc) · 8.89 KB
/
search.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?xml version="1.0" encoding="utf-8"?>
<search>
<entry>
<title>manim 学习记录</title>
<link href="2020/11/25/manim__learn_notes/"/>
<url>2020/11/25/manim__learn_notes/</url>
<content type="html"><![CDATA[<p>近日一名老师雇我为他新开的一门线上课《线性代数的几何意义》制作动画,并且要求使用 3b1b 所采用的 manim 动画引擎。在此之前,我对 manim 了解甚少,故利用此次机会学习一下 manim 相关的知识。</p><h1 id="什么是-Manim"><a href="#什么是-Manim" class="headerlink" title="什么是 Manim?"></a>什么是 Manim?</h1><p><img src="/.com//cropped.png" class="lazyload" data-srcset="/.com//cropped.png" srcset="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAABGdBTUEAALGPC/xhBQAAADhlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAAqACAAQAAAABAAAAAaADAAQAAAABAAAAAQAAAADa6r/EAAAAC0lEQVQIHWNgAAIAAAUAAY27m/MAAAAASUVORK5CYII=" alt="avatar"></p><p>根据维基百科关于 3Blue1Brown 的词条,Grant Sanderson 是斯坦福大学的数学研究生。从 2015 年初,3Blue1Brown 作为编程方面的个人兴趣项目诞生。在播客节目 Showmaker 中,他透露到他最初为练习他的编程技能,决定用 Python 制作一个计算机图形软件,这便是开源项目”Manim”的由来。他使用该动画引擎制作了许多视频上传到 3Blue1Brown 频道,3Blue1Brown 还在中国大陆 Bilibili 弹幕视频网站建有“中国官方账号”,转载其 Youtube 视频并配中文字幕。<br> 按照 Manim 的 github 仓库上的说法:Manim is an animation engine for explanatory math videos. It’s used to create precise animations programmatically, as seen in the videos at 3Blue1Brown。大致意思是说 Manim 是一个用于制作解释性数学视频的动画引擎。</p><h1 id="安装-Manim"><a href="#安装-Manim" class="headerlink" title="安装 Manim"></a>安装 Manim</h1><p>在安装 Manim 前,要先安装好一些依赖 (Cairo,ffmpeg,Sox,latex)</p><h2 id="源码安装"><a href="#源码安装" class="headerlink" title="源码安装"></a>源码安装</h2><p>如果想要对 manim 项目的源代码进行一些个性化的修改,可以直接克隆 manim 的 github 仓库,进行安装</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">git <span class="built_in">clone</span> https://github.com/3b1b/manim.git</span><br><span class="line"><span class="built_in">cd</span> manim</span><br><span class="line">python3 -m install -r requirements.txt</span><br></pre></td></tr></table></figure><p>这种安装方式下,文件夹下除了关键的<code>manimlib</code>和<code>manim.py</code>文件外,值得注意的还有一个<code>docs</code>文件夹。在<code>docs</code>文件夹下<code>make</code>操作,可以生成 manim 相关的文档,格式可以选择。(需要提前安装好<code>sphnix</code>,安装方式<code>pip install sphnix</code>)</p><h2 id="pip-安装"><a href="#pip-安装" class="headerlink" title="pip 安装"></a>pip 安装</h2><p>manim 需要 python3.6 或者更高的版本,可以通过 pip 安装</p><figure class="highlight zsh"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">pip3 install manimlib</span><br></pre></td></tr></table></figure><h1 id="初识-Manim"><a href="#初识-Manim" class="headerlink" title="初识 Manim"></a>初识 Manim</h1><p>在使用源码安装的情况下,在项目根目录下会附带一个<code>example_scenes.py</code>,其作为样例代码,里面包含了许多简单场景,使用如下命令后选择需要生成的场景,可以观看效果:</p><figure class="highlight zsh"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">python3 manim.py example_scenes.py -pl</span><br></pre></td></tr></table></figure><video id="video" width="100%" controls preload="none"><source id="mp4" src="https://manim.ml/_static/example/SquareToCircle.mp4" type="video/mp4"></video>]]></content>
</entry>
<entry>
<title>hexo 框架下的 NexT 主题使用</title>
<link href="2020/11/11/hexo%E6%A1%86%E6%9E%B6%E4%B8%8B%E7%9A%84NexT%E4%B8%BB%E9%A2%98%E4%BD%BF%E7%94%A8/"/>
<url>2020/11/11/hexo%E6%A1%86%E6%9E%B6%E4%B8%8B%E7%9A%84NexT%E4%B8%BB%E9%A2%98%E4%BD%BF%E7%94%A8/</url>
<content type="html"><![CDATA[<p>NexT 作为 hexo 框架下一个十分热门的主题,成为了我使用 hexo 博客框架后所采用主题的第一选择。</p><h2 id="格式约定"><a href="#格式约定" class="headerlink" title="格式约定"></a>格式约定</h2><ul><li>使用 /blog 指代 hexo 环境的根目录</li></ul><h1 id="Installation"><a href="#Installation" class="headerlink" title="Installation"></a>Installation</h1><p>NexT 作为 hexo 框架的一款主题,安装方式和其他诸如 jacman、Hueman 等主题基本一致。</p><ol><li><p>将主题文件夹拷贝到 /blog/themes 下</p><figure class="highlight zsh"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /blog</span><br><span class="line">git <span class="built_in">clone</span> https://github.com/iissnan/hexo-theme-next themes/next</span><br></pre></td></tr></table></figure></li><li><p>修改 /blog 下的<code>_config.yml</code>文件,找到<code>theme</code>字段,修改如下:</p><figure class="highlight yaml"><table><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></pre></td><td class="code"><pre><span class="line"><span class="comment"># Extensions</span></span><br><span class="line"><span class="comment">## Plugins: https://hexo.io/plugins/</span></span><br><span class="line"><span class="comment">## Themes: https://hexo.io/themes/</span></span><br><span class="line"><span class="comment">#theme: landscape</span></span><br><span class="line"><span class="attr">theme:</span> <span class="string">next</span></span><br><span class="line"></span><br></pre></td></tr></table></figure></li><li><p>启动 hexo 服务器,验证 NexT 主题是否安装成功</p></li></ol>]]></content>
</entry>
<entry>
<title>Hello World</title>
<link href="2020/11/09/hello-world/"/>
<url>2020/11/09/hello-world/</url>
<content type="html"><![CDATA[<p>Welcome to <a href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues">GitHub</a>.</p><h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo new <span class="string">"My New Post"</span></span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p><h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p><h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p><h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>]]></content>
</entry>
</search>