3

This is my curve

enter image description here

My LaTeX code is

\documentclass{standalone}
\usepackage{tikz}
%\usetikzlibrary{decorations.pathmorphing}
\begin{document}
\begin{tikzpicture}
%\pgfmathsetseed{666666}

\node (Koo) at (1.5,2) {$K_{\infty}$};
\node (S-) at (-0.6,5.1) {$S_-$};
\node (S+) at (0.6,4) {$S_+$};
\node (r) at (1.2,3) {$r$};
\node (l) at (-1.59,4.2) {$\ell$};
\node (e) at (0.2,6.2) {$e$};

\draw (0,0)node[right] {$A$} -- (2,6) node[right] {$B$} -- (-2,6) node[left] {$C$} -- (0,0) ;

%\draw[red,->, decorate, decoration={random steps, segment length=2cm, amplitude=2cm}]
\draw[red,->]
plot [smooth, tension=0.6] coordinates
{ (0,0.02) (0,0.35) (0.1,0.6) (-0.15,1) (0.1,1.1) (-0.2,1.25) (0.56,1.8)
  (-0.85,2.6)
  (0.98,3)
  (-1.39,4.2)
  (0.7,4.75) (0.2,6)
};
\end{tikzpicture}

\end{document} 

I want this curve moves like a complex Brownian motion,

so I add decorate, decoration={random steps,segment length=2pt,amplitude=2pt} (the comment in the above code).

But no matter what the value of length and amplitude, there is always a bug: Dimension too large.


I fix this by enlarging all coordinates in the above LaTeX Code, and the following image is the result.

enter image description here

The notations A,B,C, ..., width of the curve, and the arrow of red curve are too small.

Is it possible to make the curve be a fractal curve like complex Brownian motion?

2
  • Welcome to TeX.SE!
    – Mensch
    Commented Apr 28, 2022 at 15:51
  • Hello! @Mensch. Commented Apr 29, 2022 at 4:24

1 Answer 1

4

Not a perfect solution but maybe you can use it. You can make everything larger:

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows.meta}
\usetikzlibrary{decorations.pathmorphing}

\begin{document}
\begin{tikzpicture}[scale=3, very thick, font=\huge]
    \pgfmathsetseed{666666}
    \node (Koo) at (1.5,2) {$K_{\infty}$};
    \node (S-) at (-0.6,5.1) {$S_-$};
    \node (S+) at (0.6,4) {$S_+$};
    \node (r) at (1.2,3) {$r$};
    \node (l) at (-1.59,4.2) {$\ell$};
    \node (e) at (0.2,6.2) {$e$};

    \draw (0,0) node[right] {$A$} -- (2,6) node[right] {$B$} -- (-2,6) node[left] {$C$} -- cycle;

    \draw[red,arrows={->[length=10pt]}, decorate, decoration={random steps, segment length=2pt, amplitude=2pt}]
        plot [smooth] coordinates {
            (0,0.02) (0,0.35) (0.1,0.6) (-0.15,1) (0.1,1.1) (-0.2,1.25) (0.56,1.8)
            (-0.85,2.6)
            (0.98,3)
            (-1.39,4.2)
            (0.7,4.75) (0.2,6)
        };
\end{tikzpicture}
\end{document} 

Fractal Curve

1
  • Thanks! This fits my needs. Commented Apr 29, 2022 at 4:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .