1

I am trying to make a 3d plots as follows. This is my MWE:

‎\begin{tikzpicture}‎
‎\begin{axis}[xlabel=$x$‎, ‎ylabel=$y$‎, ‎zlabel={$z$},legend pos=outer north east,z post scale=1.1,grid=both,view={50}{-10}, restrict z to domain={-3:3}]‎
‎\addplot3‎ [surf‎,
‎           samples=10‎,
‎           domain=-2:2‎ ,
‎           opacity=1‎,
‎           color=gray!20,z buffer=auto] {(x-2*y-4)/-3};‎‎
\addplot3‎ [surf‎,
          ‎ samples=10‎,
          ‎ domain=-2:2‎ ,
          ‎ opacity=1‎,
          ‎ color=gray!20,z buffer=auto] {2*x+3*y-1};
\addplot3‎ [‎surf‎,
          ‎ samples=10‎,
          ‎ domain=-2:2‎ ,
          ‎ opacity=1‎,
          ‎ color=gray!20,z buffer=auto] {(4*x-y-1)/-5};
\end{axis}‎
\end{tikzpicture}‎

Honestly, it works but, I am getting trouble while showing the students: These 3 planes intersect mutually and there is not a single point.

Maple tells me that the ranges as I selected is good to look so I am sure of it:

Do you think I should have considered a certain view point or you have a clue for me? Thanks

AboAmmar
  • 46,352
  • 4
  • 58
  • 127
Mikasa
  • 589
  • It is clear why that happens: there is no 3d ordering. You either need to do it by hand by drawing the planes in little patches that are appropriately ordered, use path plot or use another tool such as asymptote. –  Dec 23 '18 at 12:40
  • @marmot: Thanks for your consideration. Is there any certain link you want me to point? – Mikasa Dec 23 '18 at 12:46
  • 1
    Not sure. Maybe this one for asymptote. Or compute the lines of intersection analytically and then restrict the plots accordingly. Some time ago I did something of this sort here but there the situation is slightly less complex as the planes are arranged very symmetrically. –  Dec 23 '18 at 12:51
  • 1
    Thanks a lot for the nice hint. It inspired me to do that by myself. – Mikasa Dec 24 '18 at 04:54

0 Answers0