       Re: Plotting a straight line in a 3D plot

• To: mathgroup at smc.vnet.net
• Subject: [mg81030] Re: [mg80996] Plotting a straight line in a 3D plot
• From: DrMajorBob <drmajorbob at bigfoot.com>
• Date: Sat, 8 Sep 2007 03:55:13 -0400 (EDT)
• References: <3083783.1189147430927.JavaMail.root@m35>

```Clear[x, y, z]
zFunctions = {1 - x, y - 1};
endpts = {x, y, z} /.
First@Solve[
Equal @@ Flatten@{z, zFunctions}, {y, z}] /. {{x -> -5}, {x ->
5}};
Show[Plot3D[zFunctions, {x, -5, 5}, {y, -5, 5}],
Graphics3D[{Thickness[.01], Line@endpts}]]

or (the line all by itself):

Graphics3D[{Thickness[.01], Line@endpts}]

Bobby

On Fri, 07 Sep 2007 01:08:36 -0500, kheimon <kheimon at gmail.com> wrote:

> Is there any way, in Mathematica, I can plot a straight line in a 3D
> plot environment?
>
> For example: Plot3D[{{y = 1 - x, z = y - 1}}, {x, -5, 5}, {y, -5, 5}]
>
> plots two surfaces, not their intersection (which is a straight line).
>
>
>
>

--

DrMajorBob at bigfoot.com

```

• Prev by Date: Re: Saving Interpolated Function
• Next by Date: Re: Combining Fractions with Identical Denominator?
• Previous by thread: Re: Plotting a straight line in a 3D plot
• Next by thread: Re: Plotting a straight line in a 3D plot