## Equation of line in 3D and visualisation using Autograph

### May 8, 2014

A new one on me.

Consider the vector equation of a straight line:

**r** = **a**+ λ **b** applies in 2, 3, (n) dimensions. Such is the power of vector notation.

If you want to convert a general example to its Cartesian equivalent:

Set each component equal to x, y and z, respectively

x =

y =

z =

then rearrange to get expressions all equal to the parameter, λ

Set them equal:

and one is done.

A specific example

Rearranges to :

Let’s plot the straight line graph using Autograph 3D visualisation of the vector form

The “hand” option enables me to pull and rotate the axes around the origin of the axes. So here follow two views of the line from two different viewing positions and the line looks completely different. Notice the position of the axes have shifted.

Now, here’s the sucker punch for me. If I rotate the image so I am looking “along” each axis in turn, then it is as if that axis has disappeared. So if I look along the z-axis I am only seeing the line relative to the x and y axes, the projection of the line on to the x-y plane.

You can see in each case we have a straight line. The equation of each line is as follows. If we are looking along the z-axis at the projection on to the x-y plane then we take the Cartesian equation and eliminate the term in z:

Similarly, along the y-axis onto the x-z plane, eliminate the term in y:

Finally, along the x-axis onto the y-z plane, eliminate the term in x: