有没有简单的方法可以找到贝塞尔曲线/路径的最大值?
我的目的是在曲线最大处画一条垂直线。我“手工”画了一条线,效果不错,但我希望有更优雅的解决方案。
这是我迄今为止的代码。
\begin{tikzpicture}[scale=10, thick]
\draw[name path=cons] (-0.5, 0) .. controls (-0.2, 0.4) and (0.45, 0.6) .. (0.5, 0);
\path[name path=line1] (-1, 0.1) -- (1, 0.1);
\draw[name intersections={of=line1 and cons}] (intersection-1) -- (intersection-2);
\path[name path=line2] (0.175, 0) -- (0.175, 0.4);
\path[name path=intersection1, name intersections={of=line2 and line1}] (intersection-1) coordinate (int1);
\path[name path=intersection2, name intersections={of=line2 and cons}] (intersection-1) coordinate (int2);
\draw (int1) -- (int2);
\end{tikzpicture}