Why

\documentclass[tikz,border=10pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{
  width  = 7cm,
  compat = 1.11,
  /pgf/declare function = {
    bx(\a,\b,\c,\d,\e) = tanh(\d*(\a-\b)) + tanh(-1*\e*(\a-\c));
    ex(\x,\y,\z)       = exp(-1*(\x-\y)^2/\z);
    ra(\x,\y)          = 0.4*(1-0.4*ex(\x,0.8,0.15) + sin(2*pi*\y)^2
       + 0.6*ex(\x,0.8,0.25)*cos(2*pi*\y)^2
       + 0.3*cos(2*pi*\y))*0.5*(1+tanh(4*\x))
       + (1-0.2*ex(\x,-1.3,0.9))*0.5*(1+tanh(-4*\x))*(0.5*(1+sin(2*pi*\y)^2
       + 0.3*cos(2*pi*\y))*((abs(sin(2*pi*\y)))^1.3+0.08*(1+tanh(4*\x))))
       + 0.13*bx(cos(pi*\y),-0.45,0.45,5,5)*bx(\x,-0.5,0.2,4,2)
       - 0.1*bx(cos(pi*\y),-0.008,0.008,30,30)*bx(\x,-0.4,0.25,8,6)
       - 0.05*sin(pi*\y)^16*bx(\x,-0.55,-0.35,8,18);
  }
}
\begin{document}
\begin{tikzpicture}
  \begin{axis}[
      small,
      trig format plots = rad,% radian instead of deg
      grid              = major,% thin gray grid lines 
      z post scale      = 3,% scaling height
      samples           = 20,% use 20 for low res quicker compiling
                             % I chose 100 for high resolution
      samples y         = 20,% use 20 for low res quicker compiling
                             % I chose 30 for high resolution  
      z buffer          = sort,% sort according to depth of point
      zmax              = 2,
      colormap          = {skin}{rgb255=(255,105,180) rgb255=(255,240,245)},
      draw              = mapped color!95!black,% lighter mesh lines
      view              = {-45}{10},
      %view             = {45}{15},% different view
    ]
    \addplot3[
      surf,
      shader   = faceted interp,
      domain   = 0:1,
      domain y = -1.5:1.5,
    ] 
    ( { 0.1*exp(-1*(y-0.8)^2/0.6)-0.18*exp(-1*(y-0.1)^2/0.4) +
        ra(y,x)*cos(2*pi*x) },
      { ra(y,x)*sin(2*pi*x) },
      { y } );
  \end{axis}
\end{tikzpicture}
\end{document}

plot

Leave a Reply

Your email address will not be published. Required fields are marked *