![圆弧的非线性变换](https://linux22.com/image/436786/%E5%9C%86%E5%BC%A7%E7%9A%84%E9%9D%9E%E7%BA%BF%E6%80%A7%E5%8F%98%E6%8D%A2.png)
看起来对圆弧进行非线性变换会产生扭曲。请参见下面的绿色和红色形状。这是预期的吗?我是否必须将路径操作限制为--
、to
和.. controls () ..
?
\documentclass{standalone}
\usepackage{tikz}
\usepgfmodule{nonlineartransformations}
\usetikzlibrary{curvilinear,shapes.geometric,shapes.arrows}
\begin{document}
\makeatletter
\begin{tikzpicture}
[
bump/.style={semicircle, draw, fill=green},
point/.style={single arrow, fill=cyan, single arrow head extend=1mm, minimum height=5mm},
]
\draw [help lines] (0,0) grid (3,2);
{
\pgfsetcurvilinearbeziercurve
{\pgfpoint{0mm}{20mm}}
{\pgfpoint{11mm}{20mm}}
{\pgfpoint{20mm}{11mm}}
{\pgfpoint{20mm}{0mm}}
\pgftransformnonlinear{\pgfpointcurvilinearbezierorthogonal\pgf@x\pgf@y}%
\pgfsettransformnonlinearflatness{2pt} % very precise
\draw (0,-30pt) grid [step=10pt] (80pt,30pt);
% not working
\fill [red] (0,-1) arc [radius=0.5, start angle=90, end angle=45];
% working
\fill [orange] (2,0) .. controls +(0,0.11) and +(-0.11,0) .. ++(0.2,0.2) .. controls +(0.11,0) and +(0,0.11) .. ++(0.2,-0.2) -- cycle;
% working
\node [single arrow, fill=cyan, single arrow head extend=2, minimum height=5mm, transform shape nonlinear] at (1.5,0) {};
% not working
\node [semicircle, draw, fill=green, transform shape nonlinear] at (1,1) {};
}
\end{tikzpicture}
\makeatother
\end{document}