Asked
Active
Viewed 216 times
2
-
Welcome to TSE. What did you try? – José Carlos Santos Nov 26 '21 at 16:58
-
without minimal working example and without description of the figure, your question is so naive (like this https://tex.stackexchange.com/q/513088/140722)! I recommend improve the question. – Black Mild Nov 27 '21 at 07:50
1 Answers
6
A similar question has already been answered here. You should at least specify the transformation. The following may be a start.
\documentclass[tikz, border=0.5cm]{standalone}
\usepgfmodule{nonlineartransformations}
\usetikzlibrary{fpu}
\makeatletter
\newcommand{\PgfmathsetmacroFPU}[2]{\begingroup% https://tex.stackexchange.com/a/503835
\pgfkeys{/pgf/fpu,/pgf/fpu/output format=fixed}%
\pgfmathsetmacro{#1}{#2}%
\pgfmathsmuggle#1\endgroup}%
\def\conformaltransformation{% similar to the pgfmanual section 103.4.2
\PgfmathsetmacroFPU{\myphase}{-45+atan2(\the\pgf@y,\the\pgf@x)}
\PgfmathsetmacroFPU{\myradius}{veclen(\pgf@y,\pgf@x)/1cm}
\PgfmathsetmacroFPU{\myx}{\myradius*\myradius*cos(2*\myphase)*0.15cm}%
\PgfmathsetmacroFPU{\myy}{\myradius*\myradius*sin(2*\myphase)*0.15cm}%
\pgf@x=\myx pt%
\pgf@y=\myy pt%
}
\makeatother
\begin{document}
\begin{tikzpicture}[>=stealth]
\begin{scope}[xshift=-8cm]
\draw[red] foreach \y in {0.5,1,...,4} {(-2.3,\y) -- (2.3,\y)};
\draw[blue] foreach \x in {-2,-1.5,...,2} {(\x,0) -- (\x,4.3)};
\draw[<->] (-2.5,0) -- +(5,0);
\draw[->] (0,0) -- +(0,5);
\end{scope}
\begin{scope}
\pgftransformnonlinear{\conformaltransformation}
\draw[red] foreach \y in {0.5,1,...,4} {(-2.3,\y) -- (2.3,\y)};
\draw[blue] foreach \x in {-2,-1.5,...,2} {(\x,0) -- (\x,4.3)};
\draw[<->] (-2.5,0) -- +(5,0);
\draw[->] (0,0) -- +(0,5);
\end{scope}
\end{tikzpicture}
\end{document}

