如何将灰色箭头(连接两个轴)从线性到双曲线的?
\documentclass[float=false,crop=true,dvipsnames]{standalone}
\usepackage{bm}
\usepackage{tikz}
\usetikzlibrary{calc,3d}
\usetikzlibrary{decorations.pathreplacing,calligraphy}
\tikzset{every picture/.style={thick,
>=stealth,
decoration={calligraphic brace,
amplitude=3pt,
raise=4pt}
}}
\begin{document}
\begin{center}
\begin{tikzpicture}[x={(10:.9cm)},y={(90:1cm)},z={(-45:.84cm)}]
\draw [->] (-2, 0, 0) coordinate (N2)
-- (-1, 0, 0) coordinate (N1)
-- ( 0, 0, 0) coordinate (0)
-- ( 1, 0, 0) coordinate (P1)
-- ( 2, 0, 0) coordinate (P2)
-- ( 3, 0, 0) coordinate (P3)
-- ( 5, 0, 0) coordinate (out);
\draw [->](-2.4,0, 1) coordinate (N2B)
--( -2, 0, 1) coordinate (N2A)
--(-1.2,0, 1) coordinate (N1B)
--( -1, 0, 1) coordinate (N1A)
-- ( 0, 0, 1) coordinate (0AB)
-- ( 1, 0, 1) coordinate (P1A)
-- (1.2,0, 1) coordinate (P1B)
-- ( 2, 0, 1) coordinate (P2A)
-- (2.4,0, 1) coordinate (P2B)
-- ( 3, 0, 1) coordinate (P3A)
-- (3.6,0, 1) coordinate (P3B)
-- ( 6, 0, 1);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\fill (0) circle (1.5pt);
\fill (P1) circle (1.5pt);
\fill (P2) circle (1.5pt);
\fill (P3) circle (1.5pt);
\draw [dashed,RoyalBlue] (0,0,0) -- (0,.5,0);
\draw [dashed,RoyalBlue] (2.4,0,0) -- (2.4,.5,0);
\draw (P2) circle (2.5pt);
\draw [->,ultra thick,RoyalBlue] (0,0,0) -- (2.4,0,0);
\draw [decorate,pen colour={RoyalBlue},ultra thick] (0,.5,0) -- node[sloped,above=6pt,RoyalBlue]{$\bm{\;a'}$} (2.4,.5,0);
\draw [->,ultra thick,RoyalBlue] (0,0,0) -- (2,0,0);
\draw [decorate,pen colour={RoyalBlue},ultra thick] (0,0,0) -- node[sloped,above=6pt,RoyalBlue]{$\bm{a}$} (2,0,0);
\draw [->,ultra thick,Mahogany] (0,-.05, 0) -- (1.2,-.05,0);
\draw [decorate,decoration={mirror},pen colour={Mahogany},ultra thick] (0,-.05, 0) -- node[sloped,below=4pt,Mahogany]{$\bm{b}$} (1.2,-.05, 0);
\draw [->,dashed,RoyalBlue] ($(P2B)-(0,0,.5)$) -- ($(P2B)-(0,0,1.2)$);
\draw (0) circle (2.5pt);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\draw [dashed,Gray] (N1) -- (N1A);
\draw [dashed,Gray] (0) -- (0AB);
\draw [dashed,Gray] (P1) -- (P1A);
\draw [dashed,Gray] (P2) -- (P2A);
\draw [dashed,Gray] (P3) -- (P3A);
\draw (P2B) circle (2.5pt);
\draw (0AB) circle (2.5pt);
\fill (0AB) circle (1.5pt);
\fill (P1B) circle (1.5pt);
\fill (P2B) circle (1.5pt);
\fill (P3B) circle (1.5pt);
\draw [->,Gray] (N1) -- (N1B);
\draw [->] (0) -- (0AB);
% \draw [->, Mahogany] ($(P1B)-(0,0,1)$) -- (P1B);
% \draw [->,RoyalBlue] (P2B) -- ($(P2B)-(0,0,1)$);
\draw [->,Gray] (P1) -- (P1B);
\draw [->,Gray] (P2) -- (P2B);
\draw [->,Gray] (P3) -- (P3B);
\draw [->,ultra thick,RoyalBlue] (0,0,1) -- (2.4,0,1);
\draw [decorate,decoration={mirror},pen colour={RoyalBlue},ultra thick] (0,0,1) -- node[sloped,below=6pt,RoyalBlue]{$\bm{a}$} (2.4,0,1);
\end{tikzpicture}
\end{center}
\end{document}
双曲线通常看起来像这样:
当y=0
曲线垂直于x
轴时。然后从那里开始弯曲。
答案1
事实证明我确实可以用双曲函数(这里除以 1.625,因为这恰好将其调整为与我绘制的第二个轴上的点相交)来\draw
一堆s。plot()
cosh(\x/1.625)
\x
\draw [->,help lines,Gray,domain=0:2,samples=20+1,smooth,variable=\x] plot({-1*cosh(\x/1.625)}, {0}, {\x});
\draw [->,help lines,Gray,domain=0:2,samples=20+1,smooth,variable=\x] plot({ 1*cosh(\x/1.625)}, {0}, {\x});
\draw [->,help lines,Gray,domain=0:2,samples=20+1,smooth,variable=\x] plot({ 2*cosh(\x/1.625)}, {0}, {\x});
\draw [->,help lines,Gray,domain=0:2,samples=20+1,smooth,variable=\x] plot({ 3*cosh(\x/1.625)}, {0}, {\x});