2

I use this code for producing the intersection of two planes:

\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}

but I get the second plane with boundaries at origin lines:

enter image description here

I want that the second plane is shown "rotated" and that the second plane is not shown below the first plane. How can I get that?

Edit: I could achieve what I want

enter image description here

substituing the second plane code for raw tikz code:

\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}

I want to take advance of some sort of library for drawing planes.

  • I use this code which, in theory, simplifies the drawing of planes. – somenxavier Nov 18 '15 at 9:23
  • 1
    The code you are using set the boundaries at 0<x<2, 0<y<2, and 0<z<2. To "rotate" the plane you would need to set new boundaries, boundaries like 2 < x+1.5y < 4. – John Kormylo Nov 18 '15 at 14:08
  • 1
    This could be helpful: tex.stackexchange.com/questions/158585/… – Henri Menke Nov 18 '15 at 18:12
  • No. I use custom code, but I can't achieve with generic code – somenxavier Jun 15 '16 at 6:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.