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>
- Reply-to: drmajorbob at bigfoot.com
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).
>
> Thank you in advance.
>
>
>
--
DrMajorBob at bigfoot.com