[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

9.4 Using Geomview and Mathematica on Different Computers

It is possible to use Geomview to display graphics generated by Mathematica running on a different computer. If you want to use Mathematica on a computer that is not networked with your Geomview computer, you can write out chunk files in Mathematica which you transfer to the Geomview computer and then translate to OOGL format for displaying in Geomview.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

9.4.1 Using a Networked Geomview Host

The Geomview command looks at the DISPLAY or REMOTEHOST environment variables to try to determine if you are logged in from another computer. If either of these indicates that you are, Geomview will attempt to run Geomview on that computer. In order for this to work, your network must be configured such that the Mathematica computer can successfully rsh to the Geomview computer without giving a password.

You can also explicitly set the DisplayHost option to the Geomview command to a string which is the desired hostname, for example:

 
In[1] := << OOGL.m

In[2] := Plot3D[Sin[x + Sin[y]], {x,-2,2},{y,-2,2}]

Out[2] := -Graphics3D-

In[3] := Geomview[%3, DisplayHost->"riemann"]

This displays the graphics %3 on the remote host named riemann.

Geomview recognizes the string "local" as a value for $DisplayHost; it forces the graphics to be displayed on the local machine.

In addition to knowing the name of the machine you want to run Geomview on, Geomview needs to know the type of that machine (the setting of the CPU variable that corresponds to the machine; See section Compiling and Installing the Source Code Distribution). By default, Geomview assumes that it is the same kind of computer as the one you are running Mathematica on. The MachType option lets you explicitly specify the type of the DisplayHost computer; it should be one of the strings "sgi" or "next" or "x11".

You can use SetOptions to change the default DisplayHost and MachType. For example,

 
In[4] := SetOptions[Geomview, DisplayHost->"riemann", MachType->"sgi"]

arranges for Geomview to run Geomview on an SGI workstation named riemann.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

9.4.2 Transporting Mathematica Files to Geomview by Hand

The auxilliary function WriteChunk is for those who can only use Mathematica on a computer that Geomview isn't installed on. WriteChunk[file, graphics] generates a file named file which contains the graphics object graphics in the format accepted by `math2oogl'.

You can transfer that file to a computer that has Geomview installed on it and then use the programs `math2oogl', `oogl2ri'b, and `geomview' directly from the shell. These programs are distributed in the `bin/<CPU>' subdirectory of the Geomview directory, and may have been installed so that they are on your path.

 
In[1]:= <<OOGL.m

In[2]:= Plot3D[ Sin[x + Sin[y]], {x,-2,2}, {y,-2,2} ]

Out[2]= -SurfaceGraphics-

In[3]:= WriteChunk["mychunk",%2]

This writes the file `mychunk' which contains a description of the graphics object. You can then transfer this file to a system with Geomview and type

 
math2oogl < mychunk > mma.oogl

to convert it to the OOGL file `mma.oogl' which you can then view using Geomview. This is the equivalent of the WriteOOGL command.

For a result equivalent to the Geomview or Show commands, type

 
math2oogl -togeomview Mathematica geomview < mychunk

The WriteRIb command can be emulated from the shell as

 
math2oogl < mychunk | oogl2rib -n mma.tiff

[ < ] [ > ]   [ << ] [ Up ] [ >> ]

This document was generated on June, 24 2006 using texi2html 1.76.