MathGroup Archive 1999

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

Search the Archive

Re: Graphing 4D functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg20825] Re: Graphing 4D functions
  • From: "Allan Hayes" <hay at haystack.demon.co.uk>
  • Date: Wed, 17 Nov 1999 03:40:39 -0500 (EST)
  • References: <80ngho$25o@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Christopher,

Just an addition: I'll modify Bob Hanlon's example.

Construct a series of three displays with

cl[x_, y_, z_] := x + y + 2 z;

In[6]:=
Table[Plot3D[c1[x, y, z], {x, 0, 1}, {y, 0, 1}], {z, 0, 1., .5}
    ];

The only changes in the displays are in the numbers on the z-axis.
The problem is that the z-range is chosen by Mathematica to fit the object
to be displayed.
We can impose our own range:

Table[Plot3D[c1[x, y, z], {x, 0, 1}, {y, 0, 1},
      PlotRange -> {0, 4}], {z, 0, 1., .5}
    ];

The difference shows up dramatically if we animate:

Go to the first example:

- double click on the bracket round the displays (not the outer one that
includes the input cell) - this will close the group of displays and show
only the top one.
- click on the closed group bracket  (the one with the hook on the bottom) -
this will select it.
- in the menu select Cell >Animate Selected Graphics - Mathematica  will
cycle through the displays

Try the same on the second example.

This sort of thing can be particluarly toublesome with automatic animations,
when we may not know in advance what range to use. There are programming
ways round this.

Allan
---------------------
Allan Hayes
Mathematica Training and Consulting
Leicester UK
www.haystack.demon.co.uk
hay at haystack.demon.co.uk
Voice: +44 (0)116 271 4198
Fax: +44 (0)870 164 0565



Christopher Knittel <knittel at bu.edu> wrote in message
news:80ngho$25o at smc.vnet.net...
> I want to graph something in 4 dimensions. Just kidding.
>
> What I really want to do is graph a function of three variables after
> defining one of the variables as a constant.
>
> I tried the following:
>
> C1[X,Y,Z] : = stuff
> I then evaluated this.
> Z=.5
> Then evaluated this.
> Plot3D[C1,{X,0,10},{Y,0,10}]
> This doesn't work!!!!!! I also tried it with = instead of :=.
>
> As is probably clear, I am new to mathematica.
>
> One other question is,
>
> How would I right a batch file for this? And how would I run the batch
file?
> I don't know if I have to keep evaluating stuff, or what.
>
> Thanks,
> Chris
> knittel at bu.edu
>
>
>




  • Prev by Date: Re: Solve Equation
  • Next by Date: Re: Help with geometry problem required.
  • Previous by thread: Re: Graphing 4D functions
  • Next by thread: Re: Graphing 4D functions