1

Is possible to draw a "random" path in a surface like those Callen's graph? Have a library on tikz to do this?

Like draw a surface with tikz-3dplot and draw a line, or a curve, in this surface.

Example: enter image description here

Stefan Pinnow
  • 29,535
Jean Pimenta
  • 617
  • 5
  • 9
  • 1
    This is not drawn like you think, in my opinion. It's a 3D mock up, drawn in 2D. At least, it's not even conceivable to draw an actual path like this on the surface in 3D. But it's fairly easy to draw a curve that seems to lay on the surface. – SebGlav Sep 20 '21 at 20:03
  • 1
    If I understand you correctly, You can Try to look here – WinnieNotThePooh Sep 20 '21 at 20:34
  • Thanks @AntonMn, this give some ideas. I show a beggining steps in a "answer" – Jean Pimenta Sep 20 '21 at 21:34

2 Answers2

4
\documentclass[tikz,border=1 cm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\usepgfplotslibrary{patchplots} 
\begin{document}
\begin{tikzpicture}[declare function={%
f(\x,\y)=100-(\x-20)^2-(\y)^2;
rndx(\t,\random)=21+\random+2*sin(720*\t)+\random;
rndy(\t,\random)=9.3-7*\t;
}]
\begin{axis}[
  view={50}{30},
  colormap/cool,
  axis lines=center,
  xmin=0, xmax=50,
  ymin=0, ymax=30,
  zmin=0, zmax=120,
  y dir=reverse,
  ticks=none,
  ]
\addplot3[
    mesh, patch refines=1,
    domain=9:31, samples=17,
    domain y=0:10, samples y=11,
    z filter/.expression={z<-15?nan:z}, unbounded coords=jump,
    ultra thin,
] {(f(x,y)};
\addplot3[densely dashed, domain=20:10,samples y=1, smooth]  {(f(x,0)};
\addplot3[domain=20:30, samples y=1, smooth]  {(f(x,0)};
\addplot3[densely dashed, variable=\t, domain=-90:-30, smooth, samples y=1]  ({10*sin(t)+20}, {10*cos(t)}, 0);
\addplot3[variable=\t, domain=-30:90, smooth, samples y=1]  ({10*sin(t)+20}, {10*cos(t)}, 0);
\addplot3[variable=\t, domain=0:10,  samples y=1]  ({20+t*sin(-30)},{t*cos(-30)},{f({20+t*sin(-30)},{t*cos(-30)})});
\addplot3[red,     variable=\t, domain=0:1, samples=30,  samples y=1, point meta=rnd]  ( {rndx(t,meta)}, {rndy(t,meta)}, {f({rndx(t,meta)}, {rndy(t,meta)})} );
\addplot3[magenta, variable=\t, domain=0:1, samples=30,  samples y=1, point meta=rnd]  ( {rndx(t,meta)}, {rndy(t,meta)}, {f({rndx(t,meta)}, {rndy(t,meta)})} );
\addplot3[blue,    variable=\t, domain=0:1, samples=30,  samples y=1, point meta=rnd]  ( {rndx(t,meta)}, {rndy(t,meta)}, {f({rndx(t,meta)}, {rndy(t,meta)})} );
\end{axis}
\end{tikzpicture}
\end{document}

Paraboloid with three random paths

1

Some initial steps... if anyone already sees if it is possible to go in this direction or not, please leave it indicated.

\documentclass[tikz,border=3.14mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\begin{document}
\begin{tikzpicture}[scale=2,declare function={f(\x,\y)=-1*((\x*\x)+((\y*\y+100)));}]
\begin{axis}[
    title={Título qualquer}, 
    xlabel=$\mu_2$, ylabel=$\mu_1$,
    small,
    x dir=reverse
]
\addplot3[
    surf,
    domain=-40:40,
    domain y=-30:30,
] 
    {(f(x,y)};
\addplot3[mesh,domain=0:10,color=green] ({2*(x+10)},{x+10}, {(f(2*(x+10),x+10)});
\addplot3[mesh,domain=0:10,color=black] ({2*(10-x)},{x}, {(f(2*(10-x),x)});
\end{axis}
\end{tikzpicture}
\end{document}

Result in this: enter image description here

Now it's a question to make a surface looks like that one, and use what Anton Mn indicated in comment.

Jean Pimenta
  • 617
  • 5
  • 9