Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #6424
| From | Heike Gramberg <heike.gramberg@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: 2D Plot for a face of a 3D plot box? |
| Date | 2011-11-13 12:18 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <j9ocj5$17u$1@smc.vnet.net> (permalink) |
| References | <201111130943.EAA00017@smc.vnet.net> |
You could use MeshFunctions to draw curves on a 3D surface. For example
f[x_, y_] := Sin[x y];
Plot3D[f[x, y], {x, 0, 2 Pi}, {y, 0, 2 Pi}, PlotPoints -> 40,
MeshFunctions -> Function[{x, y, z}, (x - Pi)^2 + (y - Pi)^2],
Mesh -> {{4}},
MeshStyle -> {Thick, Blue}]
Alternatively, you could use ParametricPlot3D to draw the curve
separately and use Show to combine the plots, e.g.
Show[{Plot3D[Sin[x y], {x, 0, 2 Pi}, {y, 0, 2 Pi}, Mesh -> None,
PlotPoints -> 40],
ParametricPlot3D[{Pi + 2 Cos[t], Pi + 2 Sin[t], f[Pi + 2 Cos[t], Pi +
2 Sin[t]]},
{t, 0, 2 Pi},
PlotStyle -> {Thick, Blue}]}]
You can also use this method to plot graphs on the bounding box of a 3D
plot. For example
With[{bb = {{0, 2 Pi}, {0, 2 Pi}, {-1.5, 1.5}}},
Show[{
Plot3D[Sin[x y], {x, 0, 2 Pi}, {y, 0, 2 Pi}, Mesh -> None, PlotPoints
-> 40],
ParametricPlot3D[{Pi + 2 Cos[t], Pi + 2 Sin[t], bb[[3, -1]]},
{t, 0, 2 Pi},
PlotStyle -> {Thick, Red}]},
PlotRange -> bb]]
Heike
On 13 Nov 2011, at 10:43, Brentt wrote:
> Hello,
>
> Is there a way to have a 2D plot on a face of the bounding box of a 3D
> surface plot? Only ordered pairs in the 2D function would have any opacity
> of course, so the view of the 3D surface won't be obstructed.
Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread
Re: 2D Plot for a face of a 3D plot box? Heike Gramberg <heike.gramberg@gmail.com> - 2011-11-13 12:18 +0000 Re: 2D Plot for a face of a 3D plot box? Dan <dflatin@rcn.com> - 2011-11-14 12:09 +0000
csiph-web