如何创造我们自己的形象

如何创造我们自己的形象

我想在 LaTeX 中创建以下图片。我该怎么做?在此处输入图片描述

答案1

这是您的起点。如果需要,可以通过以下两种方式之一添加草图中发现的增加的随机性:

  1. 使用语法沿每条曲线添加更多点。对于连续曲线,一个段与下一个段to[out=<angle>,in=<angle>]之间的差值必须是 180°。inout
  2. 调查第 48.2 节中讨论的一些路径变形装饰pgf手动的

以下是我想到的一个出发点:

\documentclass[tikz]{standalone}
\usepackage{amsmath,amssymb}
\usetikzlibrary{calc}

\begin{document}
\begin{tikzpicture}[every node/.style={align=left}]
  \fill (0,0) coordinate (O) circle (2pt) node[right] {$y$};
  \draw[dashed] (O) circle (1);
  \node[anchor=west] (sbm) at (1.1,0) {smooth blocky\\model};
  \node[anchor=north] (sp) at (0,-1.1) {sparse};
  \node (bm) at (110:1.5) {blocky model};
  \draw (sbm.north west)
    to[out=25,in=190] ($(sbm.north)+(0,0.1)$)
    to[out=10,in=120] (sbm.north east)
    to[out=-60,in=20] ($(sbm.south east)+(-0.5,0)$)
    to[out=200,in=-40] ($(sbm.south west)+(-0.4,0.3)$)
    to[out=140,in=205] (sbm.north west);
  \draw (sp.south east)
    to[out=55,in=-90] (sp.north east)
    to[out=90,in=45,looseness=1.5] (sp.north west)
    to[out=225,in=100] (sp.south west)
    to[out=-80,in=235] (sp.south east);
  \draw (bm.north east)
    to[out=-20,in=180] coordinate[pos=0.2] (bm-start) ++(1.5,-0.5)
    to[out=0,in=180] ++(1.25,0.25) coordinate (Rn)
    to[out=0,in=70] ++(0.5,-2)
    to[out=250,in=15] ++(-2,-1.5)
    to[out=195,in=-30] ++(-3,0.25)
    to[out=150,in=190] coordinate[pos=0.98] (bm-end) (bm.north west)
    to[out=10,in=160] (bm.north east);
  \draw (bm-start)
    to[out=280,in=20] ($(bm.south east)+(-0.05,0)$)
    to[out=200,in=70] ++(-0.2,-0.2)
    to[out=250,in=0] ++(-0.5,-0.2)
    to[out=180,in=275,looseness=1.3] (bm-end);
  \draw[<-] ($(Rn)+(0,-0.35)$) 
    to[out=90,in=180] ++(0.5,0.5) 
    -- ++(0.3,0) node[right] {$\mathbb{R}^n$};
  \draw[<-] (180:1) -- ++(-0.6,0)
    to[out=180,in=50] ++(-1.3,-0.75) node[fill=white] {$y-e$};
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容