Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 2
%typeset_mode True # Declare some usual variables var('x,y,z') color = rainbow(5)
(x\displaystyle x, y\displaystyle y, z\displaystyle z)
# Plot a first plane, x+y+z = 1 f = x+y+z-1 L = 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 = 0 g = x-y-2*z V = 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 = 0 h = x-y+z W = 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+1 R = implicit_plot3d(k, [x,-2,2], [y,-2,2], [z,-2,2], color=color[3]) show(L+V+W+R)
3D rendering not yet implemented
5+8