From: Claus on
Hi,
I have a set of 720 measurements at locations (x,y,z), each associated
with a value (f).

The y is constant for all locations. So I can generate a ListContourPlot
quite easily and nicely.

Now I want to show the contour in 3D. This means essentially I want to
show a contoured plane in 3D. I want to do this in 3D because I want to
add other sets of measurements which are at different (x,y,z) locations
(other planes), subsequently.

How can this be done?

I tried ListContourPlot3D, however it tells me this (which I don't
understand):

ListContourPlot3D::invpts: "\!\(\*
StyleBox[\"\"\", \"MT\"]\)-- Message text not found --

Can anybody tell what this message means (or what I am doing wrong)?

What excatly can I adjust with the option Contours? The help says "how
many or what contour surfaces to show". Does that mean, for my first try
with the one set of 720 measurements I would put Contours->{1}?

Thank you,
Claus



From: David Park on
This is easy with the Presentations package. Since you didn't give us sample
data, here is an example for a regular contour plot with several colored
spheres added to flesh out a true 3D plot. The operative function is
RaiseTo3D. It also calculates and includes the VertexNormals so the color
shading will be smooth. (In this case the contour plot was placed at the
z==0 level, but it could have been placed at any z value. The contour plot
could also have been raised to a curved surface.)

Needs["Presentations`Master`"]

Draw3DItems[
{(* Draw the contour plot in 2D and raise it to 3D *)
Opacity[.7],
ContourDraw[Sin[x] + Sin[y], {x, -5, 5}, {y, -5, 5},
ColorFunction -> ColorData["StarryNightColors"]] // RaiseTo3D[0 &],
(* Add two colored spheres *)
Opacity[1],
Yellow, Sphere[{\[Pi]/2, \[Pi]/2, 1}, 1],
Darker[Blue], Sphere[-{\[Pi]/2, \[Pi]/2, 1}, 1]},
NeutralLighting[0, .5, .1],
NiceRotation,
ImageSize -> 400]


David Park
djmpark(a)comcast.net
http://home.comcast.net/~djmpark/



From: Claus [mailto:clausenator(a)gmail.com]

Hi,
I have a set of 720 measurements at locations (x,y,z), each associated
with a value (f).

The y is constant for all locations. So I can generate a ListContourPlot
quite easily and nicely.

Now I want to show the contour in 3D. This means essentially I want to
show a contoured plane in 3D. I want to do this in 3D because I want to
add other sets of measurements which are at different (x,y,z) locations
(other planes), subsequently.

How can this be done?

I tried ListContourPlot3D, however it tells me this (which I don't
understand):

ListContourPlot3D::invpts: "\!\(\*
StyleBox[\"\"\", \"MT\"]\)-- Message text not found --

Can anybody tell what this message means (or what I am doing wrong)?

What excatly can I adjust with the option Contours? The help says "how
many or what contour surfaces to show". Does that mean, for my first try
with the one set of 720 measurements I would put Contours->{1}?

Thank you,
Claus





From: dh on


Claus wrote:

> Hi,

> I have a set of 720 measurements at locations (x,y,z), each associated

> with a value (f).

>

> The y is constant for all locations. So I can generate a ListContourPlot

> quite easily and nicely.

>

> Now I want to show the contour in 3D. This means essentially I want to

> show a contoured plane in 3D. I want to do this in 3D because I want to

> add other sets of measurements which are at different (x,y,z) locations

> (other planes), subsequently.

>

> How can this be done?

>

> I tried ListContourPlot3D, however it tells me this (which I don't

> understand):

>

> ListContourPlot3D::invpts: "\!\(\*

> StyleBox[\"\"\", \"MT\"]\)-- Message text not found --

>

> Can anybody tell what this message means (or what I am doing wrong)?

>

> What excatly can I adjust with the option Contours? The help says "how

> many or what contour surfaces to show". Does that mean, for my first try

> with the one set of 720 measurements I would put Contours->{1}?

>

> Thank you,

> Claus

>

>

>

Hi Claus,

if I understand correctly, you want to project a 2dim graphics onto a

3dim plane.

here is a hack to do this:



we first create the contours:

d = Table[x^2 + y^2, {x, 10}, {y, 10}];

t = ListContourPlot[d];

t[[1]] contains the essential graphics. We the replace every 2dim

coordinate by a three dim coordinate. E.g.:

t[[1]] /. {x_?NumberQ, y_?NumberQ} -> {x, y, 0}

Then we need to tell mathematica that this is a 3dim graohics by wraping

3D around the object:

Graphics3D[t[[1]] /. {x_?NumberQ, y_?NumberQ} -> {x, y, 0} ]



All together for two different planes:



Show[Graphics3D[t[[1]] /. {x_?NumberQ, y_?NumberQ} -> {x, y, 0} ],

Graphics3D[t[[1]] /. {x_?NumberQ, y_?NumberQ} -> {x, y, 10} ]]



Daniel