9

Within a TikZ drawing, I want to distort a 2D rasterimage (from \includegraphics) so that it appears to be rotated by 90° around the vertical axis in 3D (it should look perpendicular to the sheet of paper). I've managed to achieve a transformation with yslant and xscale, like the following.

\begin{tikzpicture}
  \node (term) at (0,0) [yslant=-0.7,xscale=0.3] 
        {\includegraphics[width=40mm]{image.png}};
\end{tikzpicture}

which distorts an image like this

                            a    
                            |\             
a---------b                 | \  
|         |                 |  \ 
|         |      -->        c   b
|         |                  \  |
c---------d                   \ |
                               \|
                                d

I'm not really happy with this: The distance |a-c| should be smaller than |b-d|. How can I achieve this?

There is an example of a cuboid which looks pretty nice, but it seems useless to distort an imported raster image.

David Carlisle
  • 757,742
stefan
  • 91

0 Answers0