« Return to Thread: first steps with 3-D drawings

Re: first steps with 3-D drawings

by Goebel, Juergen, OPES27 :: Rate this Message:

Reply to Author | View in Thread

> Rafael wrote:

> I typeset the file, and I don't see what you mean by "don't
> harmonize". Maybe it would help if you try to explain it.
> Also it would
> help if you reduce the example to some really minimal elements.
> Best regards.

Ok, let me try it again. During the weekend I played a bit with
TikZ. So my question changes to ...

When pdfLaTeXing the following example the text isn't transformed.
Of course I can achieve this manually with xslant and yslant, but
this is far from being elegant. I'm quite sure that there is a
better way. What do I have to do?

Greetings,

Juergen




\documentclass[10pt]{article}
\usepackage{tikz}
\usepackage{verbatim}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{5pt}%

\newcommand{\cubeface}[2]{%
  \fill[#1,opacity=0.25] (1,1) circle (1cm);
  \draw[miter limit=1] (0,0) rectangle (2,2);
  \draw[#1!50,thin,shorten >= 3pt,shorten <= 3pt] (0,0) -- (2,2);
  \draw[#1!50,thin,shorten >= 3pt,shorten <= 3pt] (0,2) -- (2,0);
  \path (1,1) node[font=\small\bfseries,text=#1!50!black] {#2};
}

\begin{document}
 \begin{tikzpicture}
  \pgftransformcm{1}{0}{0.4}{0.5}{\pgfpoint{0cm}{0cm}}
  \cubeface{blue}{unten}
  \pgftransformreset
  \pgftransformcm{1}{0}{0}{1}{\pgfpoint{0.8cm}{1cm}}
  \cubeface{red}{hinten}
  \pgftransformreset
  \pgftransformcm{0.4}{0.5}{0}{1}{\pgfpoint{0cm}{0cm}}
  \cubeface{red}{links}
  \pgftransformreset
  \pgftransformcm{0.4}{0.5}{0}{1}{\pgfpoint{2cm}{0cm}}
  \cubeface{red}{rechts}
  \pgftransformreset
  \cubeface{red}{vorn}
  \pgftransformcm{1}{0}{0.4}{0.5}{\pgfpoint{0cm}{2cm}}
  \cubeface{green}{oben}
 \end{tikzpicture}
\end{document}

------------------------------------------------------------------------------
_______________________________________________
pgf-users mailing list
pgf-users@...
https://lists.sourceforge.net/lists/listinfo/pgf-users

 « Return to Thread: first steps with 3-D drawings