12.5: Examples

Line Segment between two points

r[t_] = {2, -1, 4} + t {2, 7, -3}

{2 + 2 t, -1 + 7 t, 4 - 3 t, RGBColor[1, 0, 0]};

A = 
        ParametricPlot3D[{2 + 2 t, -1 + 7 t, 4 - 3 t, 
            RGBColor[1, 0, 0]}, {t, -5, 5}, 
          PlotRange -> {{-10, 10}, {-10, 30}, {-10, 10}}, 
          AxesLabel -> {x, y, z}, 
          DisplayFunction -> Identity];
\(\(B = 
        ParametricPlot3D[{2 + 2\ t, \(-1\) + 7\ t, 4 - 3\ t, 
            RGBColor[0, 1, 0]}, {t, 0, 1}, 
          PlotRange -> {{\(-10\), 10}, {\(-10\), 30}, {\(-10\), 10}}, 
          AxesLabel -> {x, y, z}, 
          DisplayFunction -> Identity];\)
\)
Show[{A, B}, DisplayFunction -> $DisplayFunction];

Intersection of planes

P1[x_, y_] = 1 - x;
P2[x_, y_] = ((3 - y)/2); 
P3[x_, y_] = ((1 - y - x)/(-2));
F = 
        Plot3D[P1[x, y], {x, -3, 3}, {y, -3, 3}, 
          DisplayFunction -> Identity];
G = 
      Plot3D[P2[x, y], {x, -3, 3}, {y, -3, 3}, 
        DisplayFunction -> Identity]; 
H = 
      Plot3D[P3[x, y], {x, -3, 3}, {y, -3, 3}, 
        DisplayFunction -> Identity]; 
Show[{F, G, H}, 
        DisplayFunction -> $DisplayFunction];