• To: mathgroup at smc.vnet.net
• Subject: [mg117553] Re: Question about a CountorPlot3D
• From: Patrick Scheibe <pscheibe at trm.uni-leipzig.de>
• Date: Tue, 22 Mar 2011 05:09:36 -0500 (EST)

```Hi,

I'm guessing we should not be afraid to use the Texture feature which
was introduced:

f = 1 - Cos[10*Sqrt[x^2 + y^2]]/Exp[10*(x^2 + y^2)];
With[{tex = Texture[DensityPlot[f, {x, -1, 1}, {y, -1, 1},
PlotRange -> {{-1, 1}, {-1, 1}, {0, 2}}, Frame -> False,
ColorFunction -> "TemperatureMap"]]},
Plot3D[{f, -1}, {x, -1, 1},
{y, -1, 1}, PlotStyle -> {{Opacity[0.4]}, {tex}}]]

Cheers
Patrick

On Mon, 2011-03-21 at 06:17 -0500, Heike Gramberg wrote:
> I'm sure there must be an easier way to do this, but the way I've done this in the past is to create a 2D density plot of the function using DensityPlot[] and use that plot as the texture of a rectangle in the 3D plot. So to mimic the example in the link, you would get something like
>
> f[x_, y_] := 1 - Cos[10 Sqrt[x^2 + y^2]]/Exp[10 (x^2 + y^2)]
> zmin = -1;
> densPlot =
>   DensityPlot[f[x, y], {x, -1, 1}, {y, -1, 1},
>    PlotRange -> {{-1, 1}, {-1, 1}, {0, 2}}, Frame -> False,
>    ColorFunction -> (ColorData[{"DeepSeaColors", "Reverse"}][#] &)];
> projection =
>   Plot3D[zmin, {x, -1, 1}, {y, -1, 1}, PlotStyle -> Texture[densPlot],
>     Mesh -> False];
> plot = Plot3D[f[x, y], {x, -1, 1}, {y, -1, 1},
>    BoxRatios -> {1, 1, 0.8},
>    PlotRange -> {Automatic, Automatic, {zmin, 2}}, PlotPoints -> 30,
>    PerformanceGoal -> "Quality", PlotStyle -> Opacity[0.1],
>    MeshStyle -> Directive[Darker[Gray], Dashed],
>    Mesh -> {30, 30},
>    ColorFunction -> (ColorData[{"DeepSeaColors", "Reverse"}][#3] &),
>    Lighting -> "Neutral"];
> Show[plot, projection]
>
> Heike.
>
>
> On 20 Mar 2011, at 09:55, Iv=E1n Lazaro wrote:
>
> > Hi all!
> >
> > This may be silly, but I want to know if is posible to make a CountorPlot3D
> > like the one is shown in the link.
> >
> > I'm specially interested in the "projection". Is it possible?
> >
> > Thanks a lot!
> >
> > Image:
> > http://209.85.62.24/28123/36/0/p397406/Wigner.jpg
>

```

• Prev by Date: Re: Chop in Mathematica 8.0.1
• Next by Date: Re: Chop in Mathematica 8.0.1