Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #10049 > unrolled thread

Re: How to combine 3D Graphics?

Started by"djmpark" <djmpark@comcast.net>
First post2012-05-12 08:59 +0000
Last post2012-05-12 08:59 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: How to combine 3D Graphics? "djmpark" <djmpark@comcast.net> - 2012-05-12 08:59 +0000

#10049 — Re: How to combine 3D Graphics?

From"djmpark" <djmpark@comcast.net>
Date2012-05-12 08:59 +0000
SubjectRe: How to combine 3D Graphics?
Message-ID<jol8pe$4a2$1@smc.vnet.net>
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@comcast.net 
http://home.comcast.net/~djmpark/index.html 


From: Jee Lou [mailto:ywdr1987@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? 

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web