Lab01: Lines and Planes

Objective:

The objective of this project is to introduce some basic 3-dimensional graphics commands and to illustrate them in the context of lines and planes.

Narrative - If you have not already done so, read section 12.5 in the text.  In this project we introduce the commands and options to do basic 3-D graphics.  We will use the ContourPlot3D and ParametrticPlot3D command.  The options used here may need to be modified based on the hardware and viewing devices used.  Sometimes a graphics object may look good on the monitor, but not when printed.  Often we must “play” with the values in the options to obtain acceptable graphics.

Examine the following examples and then work on the tasks provided.

Example:

ContourPlot3D[x/2+y/3+z/4==1,{x,-2,2},{y,-3,3},{z,0,4}]

Notice that the orientation of the graphics is not good.  We could use the mouse to change the orientation or specify a view point as in the following:

ContourPlot3D[x/2+y/3+z/4==1,{x,-2,2},{y,-3,3},{z,0,4},ViewPoint->{12,3,6},ContourStyle->Green,MeshStyle->Blue,AxesLabel->{x,y,z}]

This graph has blue mesh-lines, a green surface and a non-standard view point.

Now let’s look at several planes in the same graph.

plot1=ContourPlot3D[y==1.5*x,{x,0,2},{y,0,3},{z,0,4},ContourStyle->Directive[Cyan,Opacity[0.8]],MeshStyle->None];

plot2=ContourPlot3D[z==2.0*x,{x,0,2},{y,0,3},{z,0,4},ContourStyle->Directive[Green,Opacity[0.8]],MeshStyle->None];

plot3=ContourPlot3D[z==4*y/3,{x,0,2},{y,0,3},{z,0,4},ContourStyle->Directive[Yellow,Opacity[0.8]],MeshStyle->None];

Here the output has been supressed, but we can display several graphics objects at once, as follows:

Show[plot1,plot2,ViewPoint->{-4,2,3},AxesLabel->{x,y,z}]

Show[plot1,plot2,plot3,ViewPoint->{-4,2,3},AxesLabel->{x,y,z}]

Use the mouse to rotate this last graph around.  Notice that these planes intersect in the line:

2x=((4y)/3)=z

in symmetric form.  Dividing through by 4 would give us direction numbers ⟨2, 3, 4⟩ for the line and one point on the line is the origin.  A graph of the line would be

plotline=ParametricPlot3D[{2*t,3*t,4*t},{t,0,1},PlotStyle->Directive[Red,Thickness[.02]]]

Ovewrlaying this with the planes gives

Show[plot1,plot2,plotline,ViewPoint->{-4,2,3},AxesLabel->{x,y,z}]

Show[plot1,plot2,plot3,plotline,ViewPoint->{-4,2,3},AxesLabel->{x,y,z}]

Tasks:

Graph the planes 2x+3y+z-6=0 and x-y-2z+8=0 on the same graph.  Use different colors for each plane and pick an apropriate view point.

Determine the equation of the line of intersection of the two plane in problem 1.  Graph the line using appropriate options to make the graph “look good”.

Overlay the graphs of the planes and the line from above.  On the printed copy of this graph, hand write the equations of the planes and the line as labels, then draw arrows from these equations and pointing to the various graphics objects.