Re: Plotting questions

*To*: mathgroup at smc.vnet.net*Subject*: [mg19969] Re: Plotting questions*From*: Martin Kraus <Martin.Kraus at informatik.uni-stuttgart.de>*Date*: Thu, 23 Sep 1999 23:26:19 -0400*Organization*: Institut fuer Informatik, Universitaet Stuttgart*References*: <7sa448$mb7@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Michael Chang wrote: > > Hi again! > > Sorry, but in my rush, In a rush because of Mathematica? Wolfram would like to here that, I guess. > I sent out the *wrong* example regarding my plotting > difficulties in an earlier email (about 1 hour ago) today. > > I *meant* to use the following example: > > Suppose > > x(t)=(10^(1-g)-(1-g)*t)^(1/(1-g)) > > where 0.5<g<1 (say). > > I want to simulate this function x(t) for varying t ... specifically, > > 0<=t<=10^(1-g)/(1-g) > > so that x(t) remains *real* for all t. For t > t_f := 10^(1-g)/(1-g), > > define x(t)=0. > > What I'd like to do is get a parametric 3d *surface* plot with g, t as two > axis, and x(t) as the third axis. I've struggled with this for a while, > but can't seem to do this using Plot3D (due to the fact that the range of > values for t *cannot* be given as a function of g ... i.e. I must use > > {t,0,10} (say), and *not* > {t,0,10^(1-g)/(1-g)} > > which is what I really want). I think it is a inconsistency of ParametricPlot3D and ListSurfacePlot3D from the Graphics`Graphics3D` package that they both do not allow the first parameter to occure in the second iterator, because Table does allow this construction. Anyway, ListSurfacePlot3D from the Graphics`Graphics3D` package saves us (an example for ListSurfacePlot3D using Java can be found here: http://theorie3.physik.uni-erlangen.de/~mkraus/tutorial/tutorial2_3.html , yep, this is another advertisment of LiveGraphics3D! ;-) << Graphics`Graphics3D` plotPoints = 15; points = Table[ Re[{(10^(1 - g) - (1 - g)*t)^(1/(1 - g)), g, t}], {g, 0.5, 1 - 0.01, (1 - 0.5)/plotPoints}, {t, 0, 10^(1 - g)/(1 - g) - 0.01, 10^(1 - g)/(1 - g)/plotPoints}]; ListSurfacePlot3D[points, PlotRange -> All, BoxRatios -> {1, 1, 1}, AxesLabel -> {x[t, g], g, t}, Axes -> True, FormatType -> TraditionalForm]; > > I suspect that I have to change my definition of x(t) so that it knows > that if t>t_f, then x(t) should be 0, so that I can then use a fixed > plotrange for t, but I don't know how to do this ... just: If[t > tF, 0, (10^(1-g)-(1-g)*t)^(1/(1-g))] as the second argument of If is the else-part you are looking for. > Sorry for any confusion! We are all confused by Mathematica all the time... > > Thanks again! > > Mike!