Re: 2D Plot for a face of a 3D plot box?
- To: mathgroup at smc.vnet.net
- Subject: [mg122870] Re: 2D Plot for a face of a 3D plot box?
- From: Heike Gramberg <heike.gramberg at gmail.com>
- Date: Sun, 13 Nov 2011 07:17:59 -0500 (EST)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- 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.
- References:
- 2D Plot for a face of a 3D plot box?
- From: Brentt <brenttnewman@gmail.com>
- 2D Plot for a face of a 3D plot box?