I tried the approach described in https://tex.stackexchange.com/a/129307/21557 to magnify a part of an image without magnifying line widths. I also don't want the point to be magnified. In my example however the point is also magnified (see below). How can I avoid this?
I also want to draw additional stuff inside he magnified part, im my example above an angle. How can I interpret the units for that part?
\documentclass[tikz,border=5mm]{standalone}
\usetikzlibrary{calc,decorations.markings}
\tikzset{
tangent/.style={
decoration={
markings,% switch on markings
mark=
at position #1
with
{
\coordinate (tangent point-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (0pt,0pt);
\coordinate (tangent unit vector-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (1,0pt);
\coordinate (tangent orthogonal unit vector-\pgfkeysvalueof{/pgf/decoration/mark info/sequence number}) at (0pt,1);
}
},
postaction=decorate
},
use tangent/.style={
shift=(tangent point-#1),
x=(tangent unit vector-#1),
y=(tangent orthogonal unit vector-#1)
},
use tangent/.default=1
}
\usetikzlibrary{calc,positioning,angles}
\begin{document}
\begin{tikzpicture}[
% Style for the spy nodes and the connection line
spy/.style={%
draw,orange,
line width=1pt,
circle,inner sep=0pt,
},
]
% Parameters
%% size of the spy-in nodes
\def\spyviewersize{4.25cm}
%% (line width of the spy nodes) / 2
%% we need this for clipping later
\def\spyonclipreduce{0.5pt}
%% first zoom
%%% factor
\def\spyfactorI{20}
%%% spy in point
\coordinate (spy-in 1) at (8,0);
%%% spy on point
\coordinate (spy-on 1) at (20:3);% sould be on the curve
%% the graph/picture
\def\pik{
\pgfmathsetmacro{\al}{20}
\draw[tangent={\al/360}] (0,0) circle (3);
\draw[use tangent,green] (-2,0) -- (2,0) coordinate (XA);
\draw[use tangent,red] (-2,0.3) -- (2,-0.3) coordinate (XB);
\fill (\al:3) circle (0.05) coordinate (P) node[right]{$P$};
}
% draw the original picture
\pik
% first zoom
%% spy on node
\node[spy,minimum size={\spyviewersize/\spyfactorI}] (spy-on node 1) at (spy-on 1) {};
%% spy in node
\node[spy,minimum size=\spyviewersize] (spy-in node 1) at (spy-in 1) {};
\begin{scope}
\clip (spy-in 1) circle (0.5*\spyviewersize-\spyonclipreduce);
\pgfmathsetmacro\sI{1/\spyfactorI}
\begin{scope}[
shift={($\sI*(spy-in 1)-\sI*(spy-on 1)$)},
scale around={\spyfactorI:(spy-on 1)},
]
\pik
%%
\pic [pic text=$\varphi$,draw,angle radius=50,blue,fill,fill
opacity=0.5]{angle=XB--P--XA};
%% How to interpret the measure 50 for the angle radius
\end{scope}
\end{scope}
%% connect the nodes
\draw [spy] (spy-on node 1) -- (spy-in node 1);
\end{tikzpicture}
\end{document}

