Three Dimensional

A line in 3 dimensional space can also be parametrized using
p1+(p2-p1)t, where p1 and p2 are two points and t is the parameter. This is also written as
x(t)=x1+(x2-x1)t
y(t)=y1+(y2-y1)t
z(t)=z1+(z2-z1)t
where xi, yi, and zi are the coordinates of point pi.

Plot the line through the points p1={1,4,2} and p2={2,-5,-1}.

In[51]:=

  ?ParametricPlot3D

  ParametricPlot3D[{fx, fy, fz}, {t, tmin, tmax}] produces a
three-dimensional space curve parameterized by a
variable t which runs from tmin to tmax.
ParametricPlot3D[{fx, fy, fz}, {t, tmin, tmax}, {u,
umin, umax}] produces a three-dimensional surface
parametrized by t and u. ParametricPlot3D[{fx, fy, fz,
s}, ...] shades the plot according to the color
specification s. ParametricPlot3D[{{fx, fy, fz}, {gx,
gy, gz}, ...}, ...] plots several objects together.

In[52]:=

  p5=ParametricPlot3D[{1+t,4-9t,2-3t},{t,-2,2}];

Let's verify that this indeed does go through the points. Notice again that I named the plots!

In[53]:=

  Show[p5,Graphics3D[{AbsolutePointSize[6],Point[{1,4,2}],Point[{2,-5,-1}]}]];

Recall that a line can also be generated if you know a point and a vector that is orthogonal (perpendicular) to the line. The equation is (p-p0).n=0
where p is the arbitrary point, p0 is the known point, and n is the normal vector.

This does NOT work in three dimensions. This gives the equation of a PLANE in three space. To use 3D contour plotting, the following command must be executed first.

In[54]:=

  Needs["Graphics`ContourPlot3D`"]

Here is a plot of the plane through the point (1,2,-1) with normal vector (-1,1,1). Be patient!

In[55]:=

  p6=ContourPlot3D[({x,y,z}-{1,2,-1}).{-1,1,-1},
  {x,-2,2},{y,-2,2},{z,-2,2},Contours->{0.},Axes->True,AxesLabel->{"x","y","z"}];

You can see the point (1,2,-1) is on the plane. Is the plane orthogonal to (-1,1,-1)? Let's see.

In[56]:=

  p7=vectorPlot[{{0,0,0}},{{-1,1,-1}}];
  Show[p6,p7];

Maybe this does not convince you. Let's look at it from another point of view.

In[57]:=

  ?ViewPoint

  ViewPoint is an option for Graphics3D and SurfaceGraphics
which gives the point in space from which the objects
plotted are to be viewed. ViewPoint -> {x, y, z} gives
the position of the view point relative to the center of
the three-dimensional box that contains the object being
plotted.

In[58]:=

  Show[p6,p7,ViewPoint->{-2,-2,0}];

Up to Lines and Planes