解释

解释

我正在尝试弄清楚如何在 tikz 中生成此内容,以便可以嵌入到我的 LaTeX 文档中。我拥有的大多数绘图都遵循主题的变化。对于实际文本,我在 TeX 文档中使用印度语。见下文:

模式

更多图案

其他形状的一些早期尝试:

    % circle 4: The Hexad

  \coordinate (O6) at (4,0);
  \def\rad{1.5}
  \def\radi{0.75}
  \node (origin) at (4,0) []{};
  \draw[line width=1pt] (origin) circle (\rad);
  \draw[line width=1pt] (origin) circle (\radi);

  \pgfmathsetmacro{\HexA}{90}
  \pgfmathsetmacro{\HexB}{30}
  \pgfmathsetmacro{\HexC}{330}
  \pgfmathsetmacro{\HexD}{270}
  \pgfmathsetmacro{\HexE}{210}
  \pgfmathsetmacro{\HexF}{150}
  \path (O6) +(\HexA:\rad) coordinate (A6);
  \path (O6) +(\HexB:\rad) coordinate (B6);
  \path (O6) +(\HexC:\rad) coordinate (C6);
  \path (O6) +(\HexD:\rad) coordinate (D6);
  \path (O6) +(\HexE:\rad) coordinate (E6);
  \path (O6) +(\HexF:\rad) coordinate (F6);

  \path (O6) +(\HexA:\radi) coordinate (A61);
  \path (O6) +(\HexB:\radi) coordinate (B61);
  \path (O6) +(\HexC:\radi) coordinate (C61);
  \path (O6) +(\HexD:\radi) coordinate (D61);
  \path (O6) +(\HexE:\radi) coordinate (E61);
  \path (O6) +(\HexF:\radi) coordinate (F61);

  \fill[black] (A6) circle[radius=0pt] ++(\HexA:2mm) node {\large \sanskritunicode pe};
  \fill[black] (B6) circle[radius=0pt] ++(\HexB:2mm) node {\large \sanskritunicode śa};
  \fill[black] (C6) circle[radius=0pt] ++(\HexC:2mm) node {\large \sanskritunicode ce};
  \fill[black] (D6) circle[radius=0pt] ++(\HexD:2mm) node {\large \sanskritunicode mo};
  \fill[black] (E6) circle[radius=0pt] ++(\HexE:2mm) node {\large \sanskritunicode na};
  \fill[black] (F6) circle[radius=0pt] ++(\HexF:2mm) node {\large \sanskritunicode cū};

  \draw[line width=1pt] (A6) -- (A61);
  \draw[line width=1pt] (B6) -- (B61);
  \draw[line width=1pt] (C6) -- (C61);
  \draw[line width=1pt] (D6) -- (D61);
  \draw[line width=1pt] (E6) -- (E61);
  \draw[line width=1pt] (F6) -- (F61);

答案1

这是第一个形状的一种可能性:

\documentclass{article}
\usepackage{tikz}

\newcommand\FirstShape[2]{%
% The basic shape
\draw 
  (70:4) arc(70:275:4) -- 
  (270:3) arc(270:75:3) -- 
  (70:4) to[out=-90,in=110] 
  (45:2) to[out=-120,in=110]
  (0:1.5) to[out=-120,in=110]
  (-50:2) to[out=-130,in=80]
  (275:4) --
  (270:3) to[out=80,in=-130]
  (-60:1.3) to[out=110,in=-120]
  (20:0.85) to[out=110,in=-120]
  (60:1.8) to[out=110,in=-90]
  (75:3)
  (45:2) -- (60:1.8)
  (0:1.5) -- (20:0.85)
  (-50:2) -- (-60:1.3);
% The numbers inside
\foreach \Value [evaluate=\Value as \Step using {\Value*200/#1} ] in  {1,...,#1}
  { 
    \ifdim\dimexpr275pt-\Step pt\relax=75 pt\relax
    \else
      \draw  ({275-\Step}:4) -- ++(275-\Step:-1);
      \node at ({275-\Step}:2.7) {\the\numexpr\Value+1\relax};
    \fi
  }  
\node[left] at (270:2.7) {1};
\node[left] at (73:2.7) {\the\numexpr#1+1\relax};
\node[left=2pt] at (60:1.8) {\the\numexpr#1+2\relax};
\node[left=2pt] at (20:0.85) {\the\numexpr#1+3\relax};
\node[left=2pt] at (-60:1.3) {\the\numexpr#1+4\relax};
% The texts outside
\foreach \Text [count=\Value,evaluate=\Value as \Step using {\Value*200/#1} ] in  {#2}
  \node at ({275-\Step}:4.5) {\Text}; 
\foreach \Text [
  count=\Value,
  evaluate=\Value as \Step using {\Value*200/#1} 
  ] in  {#2}
  {
    \node at ({275-\Step}:4.5) {\Text};
  }
% The constant texts in the right part
\node[right=2pt] at (70:4) {text1};
\node[right=2pt] at (45:2) {text2};
\node[right=2pt] at (0:1.5) {text3};
\node[right=2pt] at (-50:2) {text4};
\node[below=2pt] at (270:4) {text5};
}

\begin{document}

\begin{tikzpicture}
\FirstShape{2}{texta}
\end{tikzpicture}\qquad
%
\begin{tikzpicture}
\FirstShape{3}{texta,textb}
\end{tikzpicture}

\begin{tikzpicture}
\FirstShape{4}{texta,textb,textc}
\end{tikzpicture}

\end {document}

在此处输入图片描述

解释

所有工作都由带有\FirstShape两个强制参数的命令完成:

\FirstShape{<number>}{<texts>}

其中 是一个整数,表示左侧“半圆”的细分数, 是一个逗号分隔的左侧“半圆”文本列表。所有其他元素均自动放置。

以下是第二种形状:

\documentclass{article}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}
%Draw the outer circle
\draw (0,0) circle (4);
% Draw the inner curved arcs
% First, from 260 to 160 degrees; second, from 170 to 45,
% third, from 45 to -45, last, from -45 to -100
\foreach \Start/\End in {260/170,170/45,45/-45,-45/-100}
\draw[rounded corners=10pt]
  (\Start:4) -- ++(\Start:-1) arc(\Start:\End:3) -- (\End:4);
% drawing the subdivisions for each curved portion
% For the portion between 260 and 170
\begin{scope}
\clip[rounded corners=10pt]
  (260:4) -- ++(260:-1) arc(260:170:3) -- (170:4) arc(170:260:4) ;
\foreach \Value in {240,217.5,192.5}
  \draw (\Value:4) -- ++(\Value:-1);
\end{scope}
% For the portion between 170 and 45
\begin{scope}
\clip[rounded corners=10pt]
  (170:4) -- ++(170:-1) arc(170:45:3) -- (45:4) arc(45:170:4) ;
\foreach \Value in {85,125}
  \draw (\Value:4) -- ++(\Value:-1);
\end{scope}
% For the portion between 45 and -45
\begin{scope}
\clip[rounded corners=10pt]
  (45:4) -- ++(45:-1) arc(45:-45:3) -- (-45:4) arc(-45:45:4) ;
\draw (0:4) -- ++(0:-1);
\end{scope}
% For the portion between -45 and -100
\begin{scope}
\clip[rounded corners=10pt]
  (-45:4) -- ++(-45:-1) arc(-45:-100:3) -- (-100:4) arc(-100:-45:4);
\foreach \Value in {-58,-70,-85}
  \draw (\Value:4) -- ++(\Value:-1);
\end{scope}
% Placing the labels in the outer circle
\foreach \Value/\Text in {260/a,240/b,217.5/c,192.5/d,170/e,125/f,85/g,45/h,0/i,-45/j,-58/k,-70/l,-85/m}
   \node at (\Value:4.2) {\Text};
\end{tikzpicture}

\end {document}

在此处输入图片描述

相关内容