0

I am trying to draw a Z-order curve witz TikZ using the Lindenmayer systems. This is kind of hard since this curve consists of paths with changing angels. And it seems to me, that the only angle I can change is angle=135. So I did not find a way to draw a Z-order curve. Here is what I have so far:

\documentclass{article}
\usepackage{tikz}

\usetikzlibrary{lindenmayersystems}
\usetikzlibrary[shadings]

\begin{document}
\pgfdeclarelindenmayersystem{Lebesgue curve}{
  \rule{L -> F+F-FR}
  \rule{R -> F+F-F}}

\begin{tikzpicture}
\shadedraw [bottom color=white, top color=white, draw=black]
[l-system={Lebesgue curve, step=20pt, angle=135, axiom=L, order=2}]
lindenmayer system;
\end{tikzpicture}
\end{document}

What I get is this:

enter image description here

Does not really looks like a Z-order curve. I really want to use \usetikzlibrary{lindenmayersystems}. Any ideas how it can be done?

5
  • Probably there is the same question at your site tex.stackexchange.com/questions/347601/….
    – Sebastiano
    Commented Jan 11, 2017 at 22:19
  • @Sebastiano: Right, but this here is an other way to do it and probably much easier once there is a good solution.
    – Gilfoyle
    Commented Jan 11, 2017 at 22:30
  • 1
    Those angels - if only they'd stay put a minute, you might be able to tell your archangels from your heralds. It just isn't fair.
    – cfr
    Commented Jan 12, 2017 at 0:03
  • How does this differ from your earlier question at tex.stackexchange.com/q/347601, which has an answer from Mark Wibrow using the library you specify in your desiderata here?
    – cfr
    Commented Jan 12, 2017 at 0:21
  • I say duplicate. If the answer in your first question is not satisfaying to you, edit the question and then open up a bounty and check if anyone is interested in providing another answer. As this question stands I believe it to be a dead on duplicate. Commented Jan 12, 2017 at 8:32

0

Browse other questions tagged .