画两个平面的交点

画两个平面的交点

我用这个代码产生两个平面的交点:

\begin{figure}[h!]
    \centering
    % Generat amb TikZ
    \begin{tikzpicture}[x={(240:0.8cm)}, y={(-10:1cm)}, z={(0,1cm)},
            plane max z=3]
        \draw[->, red] (0,0,0) -- (3,0,0);
        \draw[->, yellow] (0,0,0) -- (0,3,0);
        \draw[->, green] (0,0,0) -- (0,0,3);

        % Plane of equation 1x+1.5y+0z = 2
        \definePlaneByEquation{myplane}{1}{1.5}{0}{2}
        \drawPlane[thick,fill=blue]{myplane}

        % Plane of equation -4z = 0
        \definePlaneByEquation{myplane2}{0}{0}{-4}{0}       
        \drawPlane[thick,fill=green]{myplane2}

    \end{tikzpicture}
    \caption{Vector director d'una recta com a producte vectorial dels vectors normals dels plans que la defineixen}
    \label{fig:repr-vector-director-a-partir-plans}
\end{figure}

但我得到了第二个平面,其边界位于原点线:

在此处输入图片描述

我希望第二个平面显示为“旋转的”,并且第二个平面不显示在第一个平面下方。我该怎么做?

编辑:我可以实现我想要的

在此处输入图片描述

用原始 tikz 代码替换第二个平面代码:

\begin{figure}[h!]
    \centering
    % Generat amb TikZ
    % De https://tex.stackexchange.com/a/20009/61233
    \begin{tikzpicture}[x={(240:0.8cm)}, y={(-10:1cm)}, z={(0,1cm)},
            plane max z=3]
        \draw[->, red] (0,0,0) -- (3,0,0);
        \draw[->, yellow] (0,0,0) -- (0,3,0);
        \draw[->, green] (0,0,0) -- (0,0,3);

        % Plane of equation 1x+1.5y+0z = 2
        \definePlaneByEquation{myplane}{1}{1.5}{0}{2}
        \drawPlane[thick,fill=blue]{myplane}

        % Plane of equation -4z = 0
        % It is determined by the four points:
        % (2,0,0), (0,4/3,0), (a,4/3+1.5a,0), (2+a,1.5a,0)
        % a \in \mathbb{R}
        %\definePlaneByEquation{myplane2}{0}{0}{-4}{0}      
        %\drawPlane[thick,fill=green]{myplane2}

        \filldraw[color=green!80,thick,draw=black] (2,0,0) -- (0,1.3333333,0)--(1,2.8333333,0) -- (3,1.5,0) -- cycle;

        % Intersection line
        \draw[ultra thick] (2.75,-0.5,0) -- (-1,2,0);
        \draw (-1,2,0) node[anchor=south] {$r$};

        % Normal vectors: (-4,-6,0) and (0,0,-4)
        %% Medium point of (2,0,0) and (1,4/6,0)
        %\draw (1,0.66666,0) circle (2pt);
        %% + (0.5, 0.5,0); 
        %\draw (1.5,1.16666,0) circle (2pt);
        %% Plus normal director (0,0,4)
        \draw[->,thick] (1.5,1.16666,0) -- (1.5,1.16666,1);
        %% Name of the normal vector
        \draw (1.5,1.16666,0.5) node[anchor=west] {$n_\pi$};

        %% The name of the plane
        \draw (0.5,2.08333333,0) node[anchor=west] {$\pi$};


        %% Medium point of (2,0,0) and (1,4/6,0) elevated +2
        %\draw (1.5,1.166666,2) circle (2pt);
        %% Plus normal director 1.2*(1,1.5,0)
        \draw[->,thick] (1.5,1.166666,2) -- (2.2,2.133333,2);
        %% Name of the normal vector
        \draw (1.85,1.649999,2) node[anchor=east] {$n_\rho$};


        %% The name of the plane 2
        \draw (2,0,2) node[anchor=east] {$\rho$};

    \end{tikzpicture}
    \caption{Vector director d'una recta com a producte vectorial dels vectors normals dels plans que la defineixen}
    \label{fig:repr-vector-director-a-partir-plans}
\end{figure}

我想利用某种用于绘制平面的库。

相关内容