MathGroup Archive 1998

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

Search the Archive

Re: Stack graphics



Marcia T. Fontenelle wrote:
> 
> I would like to plot a set of curves, say f[x,t], for several different
> t's, almost like a 3D plot, but with mesh just on t. More like
> StackGraphics does, but each curve should hide the ones on the back.
> 
> Observe the following example and compare the two outputs
> 
> <<Graphics`Graphics3D`
> 
> f[x_,t_]:=Exp[-(x-Cos[Pi t])^2]
> 
> Plot3D[f[x,t],{x,-5,5},{t,0,3},
> PlotPoints->35,Boxed->False,Shading->False]
> 
> ** Here Mathematica draws a beautiful plot, with HiddenSurface->True,
> but the mesh is in both directions
> 
> gtab=Table[Plot[f[x,t],{x,-5,5},DisplayFunction -> Identity], {t,
> 0,3,0.2}];
> 
> Show[StackGraphics[gtab],PlotRange->{0,1.1},Boxed->False]
> 
> ** Here StackGraphics produces mesh just in t, as wanted, but I cannot
> set HiddenSurface->True. The result is not adequate for my problem.
> (Just imagine something a little more complicated than Gaussian packets
> oscillating forth and back in time-it would be certainly too hard to
> visualize.)
> 
> What would be the solution for this? Is there any option in Plot3D that
> I haven't seen yet?
> 
> Best regards,
> 
> Marcia
> 
> --
> Marcia T. Fontenelle
> Laser Physics and Quantum Optics
> KTH - Royal Institute of Technology
> 10044 Stockholm
> Sweden
> 
> email: fontenelle@atom.kth.se
> www: http://bob.optics.kth.se/Members/Fontenelle

Marcia,

How about

gtab =
Table[
	{
		ParametricPlot3D[{x,t,s f[x,t],{Hue[t/5,.3,1],EdgeForm[]}},
			{x,-5,5},{s,0,1},
			PlotPoints ->{100,2},
			Lighting->False,
			DisplayFunction -> Identity
		],
		ParametricPlot3D[{x,t, f[x,t]},
			{x,-5,5},
			PlotPoints -> 100,
			DisplayFunction -> Identity],
		Graphics3D[{Line[{{-5,t,0},{5,t,0}}]}]
	},
	{t,0,3,.25}];

In[10]:=
Show[gtab, 
	DisplayFunction->$DisplayFunction, BoxRatios->{1,1,1}, PlotRange ->All
]

We can refine this in various ways, and maybe speed it up. -- 
Allan Hayes
Training and Consulting
Leicester, UK
hay@haystack.demon.co.uk
http://www.haystack.demon.co.uk
voice: +44 (0)116 271 4198
fax: +44 (0)116 271 8642




  • Prev by Date: TraditionalForm
  • Next by Date: Help with fonts
  • Prev by thread: TraditionalForm
  • Next by thread: Re: Stack graphics