TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Dragon Curve fractals in LaTeX

17 点作者 JohnHammersley超过 9 年前

4 条评论

leni536超过 9 年前
Well TikZ&#x2F;PGF is really capable and &quot;lindenmayersystems&quot; is simply a library feature. TikZ can even have a custom shading for the Mandelbrot set (page 688. in [1]). Note that even though it&#x27;s a baked in TikZ shading it uses a single function shading PDF element, kind of neat.<p>[1] <a href="http:&#x2F;&#x2F;ctan.ijs.si&#x2F;tex-archive&#x2F;graphics&#x2F;pgf&#x2F;base&#x2F;doc&#x2F;pgfmanual.pdf" rel="nofollow">http:&#x2F;&#x2F;ctan.ijs.si&#x2F;tex-archive&#x2F;graphics&#x2F;pgf&#x2F;base&#x2F;doc&#x2F;pgfmanu...</a>
DerekL超过 9 年前
This is also related to the binary complex number format discussed here: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=10648847" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=10648847</a><p>The set of complex numbers with all zeroes to the left of the radix point forms a fractal that is two dragon curves joined together: <a href="https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Complex_base_systems#Base_.E2.88.921.C2.B1i" rel="nofollow">https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Complex_base_systems#Base_.E...</a>
trurl42超过 9 年前
Without redundant code:<p><pre><code> \documentclass[border=3pt]{standalone} \usepackage{tikz} \usetikzlibrary{lindenmayersystems} \begin{document} \begin{tikzpicture}[line width=1pt, rounded corners=4pt, l-system={ rule set={X -&gt; X+YF+,Y-&gt;-FX-Y}, axiom=FX, angle=90, order=11, step=10pt } ] \foreach \c&#x2F;\r in {green&#x2F;0, red&#x2F;90, blue&#x2F;180, orange&#x2F;270} \draw[\c, rotate=\r] l-system; \end{tikzpicture} \end{document}</code></pre>
DerekL超过 9 年前
It&#x27;s unreadable on the iPad. The text is gigantic, and it won&#x27;t let me pinch to zoom out.