%typeset_modeTrue# Declare some usual variablesvar('x,y,z')color=rainbow(5)
(x, y, z)
# Plot a first plane, x+y+z = 1f=x+y+z-1L=implicit_plot3d(f==0,[x,-2,2],[y,-2,2],[z,-2,2],color=color[0],opacity=.9)show(L,viewer='threejs')
3D rendering not yet implemented
# Plot a second plane, x-y-2z = 0g=x-y-2*zV=implicit_plot3d(g==0,[x,-2,2],[y,-2,2],[z,-2,2],color=color[1])show(L+V)
3D rendering not yet implemented
# Show the intersection of the two planes# AKA: The solution of the linear system!sol=solve([f,g],[x,y,z])F=parametric_plot3d([1/2*z+1/2,-3/2*z+1/2,z],[-2,2],thickness=3,color="black")show(L+V+F)show(F)
3D rendering not yet implemented
3D rendering not yet implemented
# Plot another plane, x-y+z = 0h=x-y+zW=implicit_plot3d(h,[x,-2,2],[y,-2,2],[z,-2,2],color=color[2])show(L+V+W)
3D rendering not yet implemented
# Solution is... a point!_=solve([f,g,h],[x,y,z])F=sphere(center=[1/2,1/2,0],size=.1,color="black")show(L+V+W+F)
3D rendering not yet implemented
# What if we add yet another plane?k=-x+2*y-z+1R=implicit_plot3d(k,[x,-2,2],[y,-2,2],[z,-2,2],color=color[3])show(L+V+W+R)