MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Question about a CountorPlot3D

  • To: mathgroup at smc.vnet.net
  • Subject: [mg117566] Re: Question about a CountorPlot3D
  • From: Heike Gramberg <heike.gramberg at gmail.com>
  • Date: Wed, 23 Mar 2011 02:52:39 -0500 (EST)

That's a lot more concise than what I was trying to do. It hadn't occurred 
to me to nest the PlotStyles of the 2 graphs.

I stumbled upon another method which doesn't use Texture. It's a variant of
 an example hidden deep within the documentation of Mathematica (in Compatibility/tutorial/Graphics/Graphics3D to be precise)

f := 1 - Cos[10*Sqrt[x^2 + y^2]]/Exp[10*(x^2 + y^2)]
zmin = -1;
Show[Plot3D[f, {x, -1, 1}, {y, -1, 1}, PlotRange -> All,
  PlotStyle -> {Opacity[0.4]}],
 Plot3D[f, {x, -1, 1}, {y, -1, 1}, ColorFunction -> "TemperatureMap",
   PlotRange -> All, Mesh -> False] /.
  Graphics3D[gr_, opts___] :>
   Graphics3D[Scale[gr, {1, 1, 10^-4}, {0, 0, zmin}], opts]]

Heike.



On 22 Mar 2011, at 10:09, Patrick Scheibe wrote:

> 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: Handling conditions on subvector elements
  • Next by Date: Re: Chop in Mathematica 8.0.1
  • Previous by thread: Re: Question about a CountorPlot3D
  • Next by thread: How to search mathgroup archives... or why does Export on linux need X?