MTH 212: Lines and Planes.

Line through point P(2,3,0), parallel to vector v=<1,-4,1> :

Show[
ParametricPlot3D[{2+t,3-4t,t},{t,-10,10},PlotRange->10,AxesLabel->{x,y,z}],(* line *)
Graphics3D[{Arrowheads[Small],Arrow[{{0,0,0},{1,-4,1}}]}], (* vector *)
Graphics3D[{PointSize[.02],Point[{2,3,0}],Text[Style["P"],{2.5,3.5,0.5}]}] (* point *)
]

Skew lines (not parallel, not intersecting):

Show[
ParametricPlot3D[{1+t,1+6t,2t},{t,-30,30},PlotRange->20,AxesLabel->{x,y,z}],(* line 1 *)
ParametricPlot3D[{1+2s,5+15s,-2+6s},{s,-30,30},PlotRange->20,AxesLabel->{x,y,z}](* line 2 *)
]

Parallel lines:

Show[
ParametricPlot3D[{4+2t,-5+4t,1+3t},{t,-20,20},PlotRange->20,AxesLabel->{x,y,z}],(* line 1 *)
ParametricPlot3D[{1+4s,1+8s,1+6s},{s,-20,20},PlotRange->20,AxesLabel->{x,y,z}](* line 2 *)
]

Intersecting lines:

Show[
ParametricPlot3D[{4+2t,-5+4t,1+3t},{t,-20,20},PlotRange->20,AxesLabel->{x,y,z}],(* line 1 *)
ParametricPlot3D[{4+s,-5+s,1+2s},{s,-20,20},PlotRange->20,AxesLabel->{x,y,z}](* line 2 *)
]

An example of plane with a normal vector -- beginning at the plotted point (1,1,1).

Show[
ContourPlot3D[2x+3y+z-6==0,{x,-10,10},{y,-10,10}, {z,-10,10},Mesh->None,ContourStyle->Opacity[.5]],(*plane*)
(* normal vector <2,3,1> going from pt.(1,1,1) to point (3,4,2) *)
Graphics3D[{Arrowheads[Small],Arrow[{{1,1,1},{3,4,2}}],Text[Style["normal to plane",Bold],{3.1,4.1,2.1}]}], 
Graphics3D[{PointSize[.01],Point[{1,1,1}]}] (*point (1,1,1)*)
]

Line of intersection of 2 planes (example from lecture):

Show[
ContourPlot3D[{x+y+z==1,x-2y+3z==1},{x,-5,5},{y,-5,5}, {z,-5,5},AxesLabel->{x,y,z},
Mesh->None,ContourStyle->Opacity[.5]],(* intersecting planes *)
ParametricPlot3D[{1+5t,-2t,-3t},{t,-10,10},PlotRange->20,AxesLabel->{x,y,z}],(* line of intersection found using the cross product of the line vectors and a point of intersection *)
Graphics3D[{Arrowheads[Small],Arrow[{{1,0,0},{2,1,1}}],Arrow[{{1,0,0},{2,-2,3}}],Arrow[{{1,0,0},{6,-2,-3}}]}] (* normal vectors to planes *)
]