MathGroup Archive 2011

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

Search the Archive

Re: Question about a CountorPlot3D

  • To: mathgroup at
  • Subject: [mg117524] Re: Question about a CountorPlot3D
  • From: Peter Breitfeld <phbrf at>
  • Date: Mon, 21 Mar 2011 06:18:07 -0500 (EST)
  • References: <im4iuk$d49$>

Iván 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:

Some years ago Jens-Peer Kuska posted a solution:

fun = Sin[x*y];
dpl = DensityPlot[fun, {x, -Pi, Pi}, {y, -Pi, Pi}];
plt3d = Plot3D[fun, {x, -Pi, Pi}, {y, -Pi, Pi}];

Head /@ {dpl, dpl[[1]], plt3d,plt3d[[1]]}

   dpl[[1]] /. 
    GraphicsComplex[pnts_, data__] :> 
     GraphicsComplex[(Append[#1, -2] &) /@ pnts, data]}],
 Axes -> True]

 As you can see, dpl is a 2D Graphics object, realised by
 GraphicsComplex. The replacement rule makes all points {x,y} to
 {x,y,-2}, so creating a 3D GraphicsComplex, wich can be rendered by
Peter Breitfeld, Bad Saulgau, Germany --

  • Prev by Date: Re: NonlinearModelFit: Freezing parameters
  • Next by Date: Re: Following position change in different vectors
  • Previous by thread: Re: Question about a CountorPlot3D
  • Next by thread: Re: Question about a CountorPlot3D