tikz - 3D 字母

tikz - 3D 字母

我只需要重新发布或更新老问题。我仍在寻找一个好的解决方案,以 3D 形式呈现内容可变的字母。它将用于许多最终产品,因此基本想法必须是完美的。这不是我第一次发表关于该主题的帖子,但直到现在我才找到解决方案。这次我有一个模式和一个工作示例供您使用(上次我没有这个 - 抱歉)。

所以我不知道如何改进它并使其恢复到原始模式。也许你们中的一个有一个想法可以最终找到解决这个问题的方法。谢谢!

\documentclass[a4paper]{scrartcl}

\usepackage[ngerman]{babel}
\usepackage{amsmath}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{tabu}
\usepackage{eurosym}
\usepackage{icomma}
\usepackage[absolute,overlay]{textpos}
\usepackage{pgf, tikz, pgfplots}
\usepackage{rotating}
\usepackage{graphicx}

\usetikzlibrary{
            arrows,
            shapes,
            shadows.blur,
            positioning,
            calc,
            intersections,
            decorations.text,
            backgrounds,
            plotmarks,
            shadings
}
\usepackage{xcolor,graphicx}
\usepackage[usestackEOL]{stackengine}
\newsavebox{\foobox}
\newcommand{\slantbox}[2][.5]{\mbox{%
        \sbox{\foobox}{#2}%
        \hskip\wd\foobox
        \pdfsave
        \pdfsetmatrix{1 0 #1 1}%
        \llap{\usebox{\foobox}}%
        \pdfrestore
}}
\def\mycell#1#2#3{\fcolorbox{#3}{#1}{#2 }}
\newcommand\makeply[3]{\mycell{#2}{\Longunderstack[l]{#1}}{#3}}
\newcommand\perspective[3][black!30]{%
\rotatebox{\myrotate}{\slantbox[\myslant]{%
  \makeply{#2}{#3}{#1}}}
}

\newcommand{\adresse}[3]{\begin{textblock*}{10cm}(6.8cm,6cm)
\begin{rotate}{-3}
\perspective[white]{\scriptsize #1\\\scriptsize #2\\\scriptsize #3}{white}
\end{rotate}
\end{textblock*}}
\newcommand{\betreff}[1]{\begin{textblock*}{10cm}(6.3cm,8cm)
\begin{rotate}{-3}
\perspective[white]{\textbf{ \scriptsize #1}}{white}
\end{rotate}
\end{textblock*}}
\newcommand{\inhalt}[1]{\begin{textblock*}{5cm}(6.3cm,9cm)
\begin{rotate}{-3}
\perspective[white]{\parbox[t]{9cm}{\scriptsize #1}}{white}
\end{rotate}
\end{textblock*}}

\begin{document}
\def\myrotate{1} \def\myslant{.1} 

\begin{tikzpicture}[rotate=-3,xslant=0.1,scale=0.9,every node/.style={xslant=0.1,transform shape,rotate=1}]
\fill [color=black!20!white,opacity=0.5] (0.15,-2.15) -- (13.15,-2.15) -- (15.15,-20.15) -- (0.15,-20.15) -- cycle;
\draw [color=black!30, fill=white] (0,-2) -- (13,-2) -- (15,-20) -- (7.3,-20) arc (270:220:9.9cm and 3.5cm) arc (-20:0:4cm and 15cm) -- cycle;
\adresse{Alpha Beta}{Gamma 123}{12345 Kappa}
\betreff{Bla Bla Bla BLA GGGGGGGGGGGGGGGGG}
\inhalt{BLA BLAB LABLABL \\
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. \\
At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.\\
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.}

\newpage

\begin{tikzpicture}[rotate=-3,xslant=0.1,scale=0.5,every node/.style={xslant=0.1,transform shape,rotate=1}]
\fill [color=black!20!white,opacity=0.5] (-7.85,5.85) -- (5.15,5.85) -- (7.15,-12.15) -- (-7.85,-12.15) -- cycle;
\draw [color=black!30, fill=white] (-8,6) -- (5,6) -- (7,-12) -- (-0.7,-12) arc (270:220:9.9cm and 3.5cm) arc (-20:0:4cm and 15cm) -- cycle;
\fill [color=black!20!white,opacity=0.5] (0.15,-2.15) -- (13.15,-2.15) -- (15.15,-20.15) -- (0.15,-20.15) -- cycle;
\draw [color=black!30, fill=white] (0,-2) -- (13,-2) -- (15,-20) -- (7.3,-20) arc (270:220:9.9cm and 3.5cm) arc (-20:0:4cm and 15cm) -- cycle;
\end{tikzpicture}
\end{document}

图案

相关内容