I have some TikZ code of which I would like to widen the bottom part of the output while preserving the width of the top. (Bad formulation, don't know how to formulate this well.)
For example, say I have some square like
\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
% Not my actual code snippet, but for simplicity, let's just draw a square
\draw (-1, -1) -- (1, -1) -- (1, 1) -- (-1, 1) -- cycle;
\end{tikzpicture}
\end{document}
Now, for this simple example, it is easy to widen the base of the output by simply drawing an isosceles trapezoid instead of a square like
\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}
% The top's width is preserved, while the bottom's width is stretched
\draw (-2, -1) -- (2, -1) -- (1, 1) -- (-1, 1) -- cycle;
\end{tikzpicture}
\end{document}
However, for more complex code snippets, this not accessible for me.
How can I transform a generic rectangular-like shape input into a isosceles trapezoid-like shape output? Could the scope environment be of use?

trapeziumif applicable). What do you mean with “more complex code snippets”? What's not accessible to you? As I see it a transformation that transform a rectangle into a trapezium is non-linear and that's no fun in TikZ. – Qrrbrbirlbel Sep 05 '23 at 11:42tikz3d.dtxwill solve the problem. I'll give it a try. – aahlback Sep 05 '23 at 12:15