Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2012

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

Search the Archive

Re: How to combine 3D Graphics?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg126467] Re: How to combine 3D Graphics?
  • From: "djmpark" <djmpark at comcast.net>
  • Date: Sat, 12 May 2012 04:56:15 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <18312799.4531.1336710717412.JavaMail.root@m06>

This is easy using the RaiseTo3D function in the Presentations Application.

Here is the transparent surface with a density plot at the z = -1 plane. I
used a more distinctive coloring function for the density plot.

<< Presentations` 

Draw3DItems[
 {(* Draw the transparent surface *)
  {Opacity[0.5, Orange],
   Draw3D[Sin[x + y], {x, 0, Pi}, {y, 0, Pi}, Mesh -> False]},
  
  (* Draw the density plot and raise it to 3D *)
  DensityDraw[Sin[x + y], {x, 0, Pi}, {y, 0, Pi},
    PlotPoints -> 40,
    ColorFunction -> ColorData["DarkRainbow"]] // RaiseTo3D[-1 &]},
 NeutralLighting[0, 0.2, 0.5],
 NiceRotation,
 Axes -> True,
 ImageSize -> 300] 

In the following we put a transparent contour plot on the surface and a
density plot at z = -1.

Draw3DItems[
 {(* Draw a contour plot and raise it to the surface *)
  {Opacity[0.8],
   ContourDraw[Sin[x + y], {x, 0, Pi}, {y, 0, Pi},
     PlotPoints -> 40,
     ColorFunction -> ColorData["DarkRainbow"]] // 
    RaiseTo3D[Sin[#1 + #2] &]},
  
  (* Draw a density plot and raise it to the z = -1 surface *)
  DensityDraw[Sin[x + y], {x, 0, Pi}, {y, 0, Pi},
    PlotPoints -> 40,
    ColorFunction -> ColorData["DarkRainbow"]] // RaiseTo3D[-1 &]},
 NeutralLighting[0, 0.2, 0.5],
 NiceRotation,
 Axes -> True,
 ImageSize -> 300]

Just draw one thing after another.


David Park
djmpark at comcast.net 
http://home.comcast.net/~djmpark/index.html 


From: Jee Lou [mailto:ywdr1987 at gmail.com] 


I have tried to combine a translucent 3D-plot graph with its density plot by
using Show. But it doesn't work. Here's my code:
g1=Plot3D[Sin[x + y], {x, 0, Pi}, {y, 0, Pi}, Mesh ->
False,PlotStyle->Opacity[.5]]; g2=DensityPlot[Sin[x + y], {x, 0, Pi}, {y, 0,
Pi}, Frame -> False]; g3=Plot3D[-1, {x, 0, Pi}, {y, 0, Pi}, Mesh ->
None,TextureCoordinateFunction -> ({#1, #2} &), PlotStyle ->
Directive[Texture[g2]]]; Show[g1,g3] It turns out that the density graph
disappears T_T.
How can I make it right? 




  • Prev by Date: Re: Condition Generation in Integrate
  • Next by Date: Re: Fine control of evaluation
  • Previous by thread: How to combine 3D Graphics?
  • Next by thread: Re: How to combine 3D Graphics?