MathGroup Archive 1998

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

Search the Archive

Re: waterfall plot in Mathematica


  • To: mathgroup@smc.vnet.net
  • Subject: [mg12626] Re: waterfall plot in Mathematica
  • From: mcmcclur@bulldog.unca.edu (Mark C McClure)
  • Date: Tue, 26 May 1998 02:38:24 -0400
  • Organization: University of North Carolina at Asheville
  • References: <6k7ehk$1nk@smc.vnet.net> <6kb26q$3n9@smc.vnet.net>

Allan Hayes (hay@haystack.demon.cc.uk) wrote:
: Trubatch David wrote in message <6k7ehk$1nk@smc.vnet.net>...
: -----------------------------------------------------------------------
: >In Matlab there is a 3-D (surface) plot command called "waterfall". This
: >command produces a surface plot with meshline in only one direction--
: >i. e. a surface ruled by a collection of parallel curves.
:
: It seems that we need to operate on the polygons that make up the
: surface. Here is a sample rule
: 
: meshchange=
:  Polygon[{a_, b_, c_, d_}] :>
:     Sequence[
:      Thickness[0.01], {Hue[0],
:      Line[{a, b}], Line[{c, d}]},
:      {Hue[2/3], Dashing[{0.01, 0.02}],
:       Line[{b, c}], Line[{d, a}]}
:     ];

Here is another possibility:
g = Plot3D[-x^3 + Sin[y], {x, -2,2}, {y, -2Pi, 2Pi},
	Mesh -> False, DisplayFunction -> Identity] // Graphics3D; flowLines =
g /. Polygon[{a_, b_, c_, d_}] -> {Line[{a,d}], Line[{b,c}]};
Show[{flowLines, g}, DisplayFunction -> $DisplayFunction]

Ciao,
-- 
Mark McClure
Department of Mathematics
University of North Carolina at Asheville http://www.unca.edu/~mcmcclur/
mcmcclur@bulldog.unca.edu



  • Prev by Date: Re: How do you suppress output from a third party package?
  • Next by Date: Re: Forcing output in FindMinimum
  • Prev by thread: Re: waterfall plot in Mathematica
  • Next by thread: RE-1: [TS 9937]--Formatting (x_Real)