go to www.geomview.org home page



Mailing List

Geomview For Windows?


Bug Reporting
Contact Us



Site Search



About the software@geom archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GeomView <--> Mathematica (on a Macintosh)

I'm about to release a new version of the Mathematica->OOGL converter
within a few days. I was holding off on replying until this happened,
but I'll do so now. (The new version adds RenderMan conversion
capability with the WriteRIB command, converts SurfaceGraphics into a
MESH instead of an OOGL OFF object, and deals with points and lists of
graphics objects correctly.) The package has built-in support for
running Geomview on a remote host, but that depends on being able to
rsh to the machine.

Actually, there is a two-step solution, where transferring a file
between the Mac and the Iris becomes your problem, not the package's
problem.  The converter uses a pipeline of C programs written for a
Unix environment. WriteChunk is a function that was internal to OOGL.m
which writes out the Mathematica object in the proper format to be
processed by the C program pipeline.  (In the new version of OOGL.m,
I've made WriteChunk public.) I wrote three shell scripts: writeoogl,
writegv, and writerib, corresponding to WriteOOGL, Geomview, and
WriteRIB, which expect as input the output of WriteChunk. You use
WriteChunk from Mathematica on the Mac to generate a file, then
transfer the file to the Iris and run the appropriate script. Does
sound like a reasonable solution? 

In[1] := << "OOGL.m"
In[2] := l = Graphics3D[{RGBColor[1, 0, 0], Line[{{2, 2, 2}, {1, 1,1}}]}]
In[8]:= WriteChunk["chunk", l]
In[9]:= ^Z
noether [68] [/u/gcg/ngrap/src/bin/geomutil/math2oogl] -> writeoogl chunk
{ = VECT
1 2 1
2 2 2
1 1 1
1.000000 0.000000 0.000000 1
} #end of VECT
} #end of LIST

The writeoogl script is very simple. You might need to edit it to set
the path correctly.


# Shell script for computers that can't use the WriteOOGL[] command directly
# from Mathematica because math2oogl is not installed on the host computer.

# If you want to be able to use this package from a directory other than
# the geomview distribution directory, change the value of mathooglpath 
# below to be the absolute pathnames of the binary on your system.

mathooglpath=" math2oogl "

tr -s '{}(), ' '\12\12\12\12\12\12' < $1 |  $mathooglpath

Note that this will *not* work with the current version of OOGL.m. I'll
send mail when the new version is in the ftp directory.

--Tamara Munzner

Home | Overview | FAQ | Documentation | Support | Download | Mailing List
Windows? | Development | Bug Reporting | Contributing | Contact Us | Sponsors
site hosted by
SourceForge Logo