开放/封闭超弦宇宙表面

开放/封闭超弦宇宙表面

我正在尝试在 tikz 中转换下图:

在此处输入图片描述

到目前为止我能做的最好的事情是(...):

% Pattern Info
 
\tikzset{
pattern size/.store in=\mcSize, 
pattern size = 5pt,
pattern thickness/.store in=\mcThickness, 
pattern thickness = 0.3pt,
pattern radius/.store in=\mcRadius, 
pattern radius = 1pt}
\makeatletter
\pgfutil@ifundefined{pgf@pattern@name@_yiqg05m24}{
\pgfdeclarepatternformonly[\mcThickness,\mcSize]{_yiqg05m24}
{\pgfqpoint{-\mcThickness}{-\mcThickness}}
{\pgfpoint{\mcSize}{\mcSize}}
{\pgfpoint{\mcSize}{\mcSize}}
{
\pgfsetcolor{\tikz@pattern@color}
\pgfsetlinewidth{\mcThickness}
\pgfpathmoveto{\pgfpointorigin}
\pgfpathlineto{\pgfpoint{0}{\mcSize}}
\pgfusepath{stroke}
}}
\makeatother

% Pattern Info
 
\tikzset{
pattern size/.store in=\mcSize, 
pattern size = 5pt,
pattern thickness/.store in=\mcThickness, 
pattern thickness = 0.3pt,
pattern radius/.store in=\mcRadius, 
pattern radius = 1pt}
\makeatletter
\pgfutil@ifundefined{pgf@pattern@name@_2kd5sgbgj}{
\pgfdeclarepatternformonly[\mcThickness,\mcSize]{_2kd5sgbgj}
{\pgfqpoint{-\mcThickness}{-\mcThickness}}
{\pgfpoint{\mcSize}{\mcSize}}
{\pgfpoint{\mcSize}{\mcSize}}
{
\pgfsetcolor{\tikz@pattern@color}
\pgfsetlinewidth{\mcThickness}
\pgfpathmoveto{\pgfpointorigin}
\pgfpathlineto{\pgfpoint{0}{\mcSize}}
\pgfusepath{stroke}
}}
\makeatother
\tikzset{every picture/.style={line width=0.75pt}} %set default line width to 0.75pt        

\begin{tikzpicture}[x=0.75pt,y=0.75pt,yscale=-1,xscale=1]
%uncomment if require: \path (0,592); %set diagram left start at 0, and has height of 592

%Shape: Axis 2D [id:dp8359555790214572] 
\draw  (198,231.2) -- (533.3,231.2)(243.3,37) -- (243.3,275.2) (526.3,226.2) -- (533.3,231.2) -- (526.3,236.2) (238.3,44) -- (243.3,37) -- (248.3,44)  ;
%Straight Lines [id:da309853468854951] 
\draw    (275.3,205.2) -- (141.56,312.75) ;
\draw [shift={(140,314)}, rotate = 321.2] [color={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=0.75]    (10.93,-4.9) .. controls (6.95,-2.3) and (3.31,-0.67) .. (0,0) .. controls (3.31,0.67) and (6.95,2.3) .. (10.93,4.9)   ;
%Shape: Polygon Curved [id:ds8493140407917537] 
\draw  [pattern=_yiqg05m24,pattern size=3.2249999999999996pt,pattern thickness=0.75pt,pattern radius=0pt, pattern color={rgb, 255:red, 0; green, 0; blue, 0}] (255.3,114.2) .. controls (255.3,115.2) and (293.3,127.2) .. (313.44,105.55) .. controls (333.57,83.9) and (363.3,100.2) .. (364.3,102.2) .. controls (365.3,104.2) and (365.3,287.2) .. (367.3,287.2) .. controls (369.3,287.2) and (340.3,267.2) .. (319.3,294.2) .. controls (298.3,321.2) and (254.3,303.2) .. (255.3,303.2) .. controls (256.3,303.2) and (255.3,113.2) .. (255.3,114.2) -- cycle ;
%Shape: Polygon Curved [id:ds2854957461640817] 
\draw  [pattern=_2kd5sgbgj,pattern size=3.2249999999999996pt,pattern thickness=0.75pt,pattern radius=0pt, pattern color={rgb, 255:red, 0; green, 0; blue, 0}] (388.3,118.2) .. controls (388.3,119.2) and (431.3,102.2) .. (446.44,109.55) .. controls (461.57,116.9) and (496.3,104.2) .. (497.3,106.2) .. controls (498.3,108.2) and (498.3,291.2) .. (500.3,291.2) .. controls (502.3,291.2) and (467.3,306.2) .. (452.3,298.2) .. controls (437.3,290.2) and (387.3,307.2) .. (388.3,307.2) .. controls (389.3,307.2) and (388.3,117.2) .. (388.3,118.2) -- cycle ;
%Shape: Polygon Curved [id:ds9662253812544976] 
\draw   (445.3,76.2) .. controls (465.3,77.2) and (529.3,97.2) .. (497.3,106.2) .. controls (465.3,115.2) and (465.3,114.2) .. (446.44,109.55) .. controls (427.57,104.9) and (394.3,114.2) .. (388.3,118.2) .. controls (382.3,122.2) and (378.3,113.2) .. (392.3,100.2) .. controls (406.3,87.2) and (425.3,75.2) .. (445.3,76.2) -- cycle ;

% Text Node
\draw (238,17.4) node [anchor=north west][inner sep=0.75pt]    {$ct$};
% Text Node
\draw (520,212.4) node [anchor=north west][inner sep=0.75pt]    {$x^{2}$};
% Text Node
\draw (136,326.4) node [anchor=north west][inner sep=0.75pt]    {$x^{1}$};
% Text Node
\draw (227,212) node [anchor=north west][inner sep=0.75pt]   [align=left] {O};


\end{tikzpicture}

这导致...(忽略背景中的网格):

在此处输入图片描述

非常感谢任何帮助,使它看起来更专业(我会在教科书中引用你)。

答案1

在此处输入图片描述

我使用装饰器来定义水平面上曲线上的点;它需要一个参数,即点的数量。然后,使用这些点,使用循环绘制垂直轨迹。在垂直轨迹之上再次绘制曲线。

评论有一个名为view“设置视点”的键。我不喜欢 3D 绘图的默认视点。

代码

\documentclass[11pt, margin=.5cm]{standalone}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\usetikzlibrary{math, calc, decorations.markings}

\begin{document}
\tikzset{%
  view/.style 2 args={%  long, latitude
    z={({-sin(#1)}, {-cos(#1)*sin(#2)})},
    x={({cos(#1)}, {-sin(#1)*sin(#2)})},
    y={(0, {cos(#2)})},
    evaluate={%
      \tox={sin(#1)*cos(#2)};
      \toy={sin(#2)};
      \toz={cos(#1)*cos(#2)};
    }
  },
  strings/.style={% nb of steps
    decoration={%
      markings,
      mark=between positions 0 and 1 step 1/#1 with {
        \tikzmath{%
          {
            \path (0, 0) coordinate[name=P_\pgfkeysvalueof{%
              /pgf/decoration/mark info/sequence number}];
          };
        }
      }
    },
    postaction=decorate
  },  
}

\tikzmath{%
  integer \N;
  \N = 150;
  real \a;
  \a = 3;
}
\begin{tikzpicture}[every node/.style={scale=.8}, view={20}{20}]
  \draw[very thin, ->] (0, 0, 0) -- (\a +3, 0, 0)  node[pos=1.05] {$x^2$};
  \draw[very thin, ->] (0, 0, 0) -- (0, \a +1, 0)  node[pos=1.05] {$ct$};
  \draw[very thin, ->] (0, 0, 0) -- (0, 0, \a +4)  node[pos=1.05] {$x^1$};

  % first drawing
  \draw[strings=\N, canvas is xz plane at y=0]
  (2.5, 2) to[out=90, in=180] ++(1, 2)
  to[out=0, in=180] ++(1, 1)
  to[out=0, in=100] ++(2, -1)
  to[out=-80, in=0] ++(-2, -.5)
  to[out=180, in=-90] cycle;
  \foreach \i [parse=true] in {1, ..., \N+1}{%
    \draw[blue] (P_\i) -- ++(0, 1.5*\a, 0);
  }
  \draw[canvas is xz plane at y={1.5*\a}]
  (2.5, 2) to[out=90, in=180] ++(1, 2)
  to[out=0, in=180] ++(1, 1)
  to[out=0, in=100] ++(2, -1)
  to[out=-80, in=0] ++(-2, -.5)
  to[out=180, in=-90] cycle;  
  \draw[thick, canvas is xz plane at y=0]
  (2.5, 2) ++(1, 2)% to[out=90, in=180] ++(1, 2)
  to[out=0, in=180] ++(1, 1)
  to[out=0, in=100] ++(2, -1);

  % second drawing
   \draw[strings=50, canvas is xz plane at y=0]
  (.5, 5) to[out=0, in=-180] ++(1, -1)
  to[out=0, in=100] ++(1, 1)
  to[out=-80, in=180] ++(1, 1);
  \foreach \i [parse=true] in {1, ..., 51}{%
    \draw[blue!60!black] (P_\i) -- ++(0, 1.5*\a, 0);
  }
   \draw[canvas is xz plane at y={1.5*\a}]
  (.5, 5) to[out=0, in=-180] ++(1, -1)
  to[out=0, in=100] ++(1, 1)
  to[out=-80, in=180] ++(1, 1); 
\end{tikzpicture}
\end{document}

相关内容