两曲面交曲线的切线

两曲面交曲线的切线

曲面 $f (x; y; z) = x^2 + y^2 - 2 = 0$ 和 $g(x; y; z) = x + z - 4 = 0$ 在椭圆 E 中相交。如何绘制它。

在此处输入图片描述

答案1

这种数字使用 Ti 的 3d 功能很简单Z,即3dperspective库。这些功能有限,但足以绘制这些表面。

我设计了一种在平面内部进行绘制的样式,移动原点,设置画布,旋转并设置适当的比例。对于每个表面的线条和填充,还有其他更传统的样式。

我的图比您的示例更逼真,但我擅自将点 (1,1,3) 改为其附近的另一个点,因为isometric view这个点不太好。如果您需要的正是点 (1,1,3),您可以将我的角度改为\a45 度,但您会看到我对视图的看法。另一个选择是也更改视图,但这需要相应地更改所有涉及的角度……

总而言之,我的建议是:

\documentclass[tikz,border=2mm]{standalone}
\usetikzlibrary{3d,calc,perspective}

\tikzset
{
  at the plane/.style={shift={(0,0,4)},rotate around y=45,canvas is xy plane at z=0,xscale=\r},
  at the top/.style={canvas is xy plane at z=6},
  axis/.style={thick,-latex},
  vector/.style={thick,-stealth},
  cylinder back/.style={blue,left color=cyan,right color=blue!30,fill opacity=0.7},
  cylinder front/.style={blue,left color=blue,right color=cyan!30,fill opacity=0.5},
  plane/.style={thick,orange,fill=orange,fill opacity=0.2},
}

\begin{document}
\begin{tikzpicture}[isometric view,rotate around z=180,
                    line cap=round,line join=round]
  \pgfmathsetmacro\r{sqrt(2)}     % radius
  \pgfmathsetmacro\a{50}          % angle for P point
  \pgfmathsetmacro\xp{\r*cos(\a)} % x for P
  \pgfmathsetmacro\yp{\r*sin(\a)} % y for P
  \pgfmathsetmacro\zp{4-\xp}      % z for P
  % coordinates
  \coordinate  (O) at (0, 0,0); % origin
  \coordinate  (T) at (1,-1,3); % tangent point
  \coordinate  (P) at ({\r*cos(\a)},{\r*sin(\a)},{4-\r*cos(\a)}); % point P (changed for a better view)
  % axes
  \draw[axis]  (O) -- (5,0,0) node[left]  {$x$};
  \draw[axis]  (O) -- (0,4,0) node[right] {$y$};
  \draw[thick] (O) -- (0,0,4);
  % cylinder, below the plane
  \draw[cylinder back]  (T) {[at the plane] arc (315:135:\r)} -- (135:\r) arc (135:315:\r) -- cycle;
  \draw[cylinder front] (T) {[at the plane] arc (-45:135:\r)} -- (135:\r) arc (135:-45:\r) -- cycle;
  % plane
  \draw[plane] (4,-3,0) -- (4,3,0) -- (-2,3,6) -- (-2,-3,6) -- cycle;
  % cylinder (above the plane) and z-axis
  \draw[cylinder back]  (T) {[at the plane] arc (315:135:\r)} {[at the top] -- (135:\r) arc (135:315:\r)} -- cycle;
  \draw[axis] (0,0,4) -- (0,0,7.5) node[above] {$z$};
  \draw[cylinder front] (T) {[at the plane] arc (-45:135:\r)} {[at the top] -- (135:\r) arc (135:-45:\r)} -- cycle;
  % vectors
  \draw[vector,blue!50!black] (P) --++ (2*\xp,2*\yp,0)       coordinate (f)  node[right] {$\nabla f$};
  \draw[vector,red]           (P) --++ (1,0,1)               coordinate (g)  node[left]  {$\nabla g$};
  \draw[vector,magenta]       (P) --++ (2*\yp,-2*\xp,-2*\yp) coordinate (fg) node[left]  {$\nabla f\times\nabla g$};
  \fill (P) circle (0.4mm);
  % right angles
  \begin{scope}[shift={(P)}]
    \draw ($0.2*(f)$) -- ($0.2*(f)+0.3*(g)$)  -- ($0.3*(g)$);
    \draw ($0.2*(f)$) -- ($0.2*(f)+0.1*(fg)$) -- ($0.1*(fg)$);
    \draw ($0.3*(g)$) -- ($0.3*(g)+0.1*(fg)$) -- ($0.1*(fg)$);
  \end{scope}
\end{tikzpicture}
\end{document}

在此处输入图片描述

相关内容