Message Boards Message Boards

0
|
3712 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Help with Filling from one ListPlot3D Curve to Another

Posted 10 years ago

Hello All,

I've been plagued by this problem for too long now and generally i have just given up and moved on to less aesthetically important sections of my code. However I've revisited this and i can't believe this shouldn't just be easier. Please Please help if you have any ideas.

I have included a notebook which does the following:

1.) Makes 2 Matrices of size nx x mytravel 2.) Graphs these in ListPlot3D to make 2 surfaces 3.) Tries to fill between the surfaces and make them different colors.

***I'd like to have the two surfaces be different colors and to fill from the top surface to the bottom. (it represents a film on a real surface that changes over time so eventually you should be able to see little bits of the lower surface poking through.). I'd ideally like to be able to set the top surface to have a color gradient like "Rainbow" so that you can tell different heights by color, but this never seems to work either when having two surfaces. Finally I'd like to have the power to look at a section of the matrix, like only from 0-5 in both x and y. I thought Data Range would do this, but all it does is artificially change the axis rather than plot only a portion of the matrix.

Currently, the fill does not seem to show up at all. In addition, even though the two surfaces don't currently overlap, the top surface is colored a mixture of blue and red. I think this should be a relatively easy thing to do with a graph and I have gone through all of the help sections on filling, fillingstyle, colorfunction, colordata, and plotstyle to no avail. Nothing seems to work.

Please let me know what you think,

-PD

nx = 20;
mytravel = 20;
ZLubricated = Table [Random[Real, {1, 3}], {nx}, {mytravel}];
ZeroPlane = Table[.5, {nx}, {mytravel}];
HardPeak = Max[ZLubricated];
ListPlot3D[{ZLubricated, ZeroPlane}, Mesh -> None, 
 InterpolationOrder -> 1, ColorFunction -> { Blue, Red}, 
 PlotRange -> {0, 2*HardPeak}, Filling -> {1 -> {{2}, Gray}}, 
 PlotLabel -> "The Initial Hard Surface Topography" ]
Attachments:
2 Replies

This notebook uses RegionPlot3D to simulate filling between two surfaces. The z upper and lower limits correspond to pairs of surfaces.

I added your vote to the suggestion for adding 3D Filling.

POSTED BY: Bruce Miller

Hello Bruce,

Did you mean to attach a notebook? I didn't see an attachment. But otherwise there is no way to fill between surfaces in 3D?

-PD

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract