0

I am currently working with p adic solenoids for a paper, and I am trying to draw (either of) these pictures in TikZ:

Note that this is not my own, and details of its construction digitally can be found here: https://arxiv.org/abs/math/0202089. I only seek to reference this image. I only have basic knowledge of TikZ and drawing this to a reasonable level of presentability/professionalism seems to be quite a challenge. I normally would post code as a reference, but I don't even know where to start with something like this without writing terrible code.

Could I get some help to figure out how to draw this in TikZ or some other format? Preferably, I would like this drawing to be in color, looking something like this (in terms of color pallet):

enter image description here

I appreciate any help that you all can provide, thank you!

  • 4
    From my point of view, it could be nice for helpers if you included formulae / source code for the solenoids to be generated. In addition, it is possible to let Octave / Matlab work for you and export the colorful result as LaTeX source code or simply include it as vector graphic? – user7427029 Jul 12 '22 at 15:03
  • 4
    this really isn't a site for asking people to draw things. Show your tex code so far, and if it generates an error ask about the error. Why not use an image as in your question, why draw it? – David Carlisle Jul 12 '22 at 15:05
  • David Carlisle: Well, I would normally show my TeX code if I knew how to draw something such as this in TikZ, but I do not. You're right, I could use the photo attached but I would prefer for it to be drawn in TikZ or some other format as a stylistic choice. Is there another stack exchange server that I could post this so I could get adequate help on my question? – Nicholas James Jul 12 '22 at 15:10
  • 1
    My suggestion is to extract the mathematical information for the linked article, and then use for example https://tex.stackexchange.com/questions/159445/draw-in-cylindrical-and-spherical-coordinates to plot it. But anyway, expect to have problems; TeX is not at all optimized for complex function graph like those. I advise using more specific application (Gnuplot/Octave) for this task. – Rmano Jul 12 '22 at 16:50
  • You should consider to work with efficient tools. There is https://github.com/taichi-dev/taichi which seems to be very efficient. – projetmbc Jul 12 '22 at 17:06

1 Answers1

3

As you do not supply any formula for the curve(in a form I am willing to read), I had to make a dummy formula

\documentclass[tikz, border=1cm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
axis lines=none, 
colormap={CM}{
color=(purple)
color=(blue!50!white)
color=(teal!50!white)
color=(orange!50!white)
color=(red)
},]
\addplot[
mesh,
domain=0:8*360,
variable=t,
samples=1000,
point meta=sin(t)+0.5*sin(t/8),
] ( {-1*(0.8+0.2*cos(t))*cos(2*t)-0.1*sin(t)+0.02*sin(t/4)} , {0.5*(0.8+0.2*cos(t))*sin(2*t)+0.2*sin(t)+0.08*sin(t/8)} );
\end{axis}
\end{tikzpicture}
\end{document}

Colored looping curve