Mathematica Labs | Denis Shubleka

Subject: Calculus

Topic: Plotting Lines and Planes

Goal: Use Mathematica to visualize lines and planes.

Task 1

To plot a line in 2-space using its parametric equations:

ParametricPlot[{1+2t,1-t},{t,-10,10}]

To plot a line in 3-space using parametric equations:

ParametricPlot3D[{1+t,1-t,2+3t},{t,-10,10}]

To plot two lines in 3-space, separate the list of equations by commas:

ParametricPlot3D[{{1+t,1-t,2+3t},{3+t,2+t,2-t}},{t,-10,10}]

Task 2

To plot a plane in 3-space using its general equation, we solve and plot    z=f(x,y), with a specified domain for each independent variable x and y:

plot1=Plot3D[x-y+2,{x,-10,10},{y,-10,10},AxesLabel->{x,y,z}]

plot2=ParametricPlot3D[{1+t,1-t,2+3t},{t,-10,10}]

To show the different objects in the same plot, we use the Show command:

Show[plot1,plot2]

Related Exercises/Notes:

ap-calc.github.io