"Linux Gazette...making Linux just a little more fun!"

Welcome to the Graphics Muse
Set your browser as wide as you'd like now.  I've fixed the Muse to expand to fill the aviailable space!
© 1997 by mjh 

Button Bar muse: 
  1. v; to become absorbed in thought 
  2. n; [ fr. Any of the nine sister goddesses of learning and the arts in Greek Mythology ]: a source of inspiration 
 Welcome to the Graphics Muse! Why a "muse"? Well, except for the sisters aspect, the above definitions are pretty much the way I'd describe my own interest in computer graphics: it keeps me deep in thought and it is a daily source of inspiration. 
[Graphics Mews] [WebWonderings][Musings] [Resources]
This column is dedicated to the use, creation, distribution, and discussion of computer graphics tools for Linux systems.
As expected, two months of material piled up while I was out wondering the far reaches of the US in August.  My travels took me to California for SIGGRAPH, Washington DC for vacation (honest), Huntsville Alabama for work (they kind that pays the rent) and just last week I was in Dallas for a wedding.  All that plane travel gave me lots of time to ponder just where the Muse has come in the past year and where it should go from here.  Mixed with a good dose of reality from SIGGRAPH, I came up with the topics for this month.

First, there are two new sections: Reader Mail and Web Wonderings. Reader Mail is an extension of Did You Know and Q and A.  I'm getting much more mail now than I did when I first started this column and many of the questions are worthy of passing back to the rest of my readers.  I've also gotten many suggestions for topics.  I wish I had time to cover them all.

Web Wonderings is new but may be temporary.  I know that many people are reading my column as part of learning how to do Web page graphics.  Its hard to deny how important the Web has become or how much more important it will become in the future.  I started reading a bit more on JavaScript to see if the language is sufficient to support a dynamically changing version of my Linux Graphics mini-Howto.  Well, it is.  I'll be working (slowly, no doubt) on converting the LGH to a JavaScript based set of pages.  My hope is to make it easier to search for tools of certain types.  I can do this with JavaScript, although the database will be psuedo static as an JavaScript array.  But it should work and requires no access to a Web server.

Readers with Netscape 3.x or later browsers should notice a lot more color in this column.  The Netscape 4.x Page Composer makes it pretty easy to add color to text and tables so I make greater use of color now.  Hopefully it will add more than it distracts.  We'll see. I may do a review of Netscape 4.x here or maybe for Linux Journal soon.  There are some vast improvements to this release of Netscape, although the new reader (known as Collabra Discussions) is not one of them.
      In this months column I'll be covering ...

Oh yeah, one other thing:  Yes, I know I spelled "Gandhi" wrong in the logo used in the September 1997 Linux Gazette.  I goofed.  I was more worried about getting the quote correct and didn't pay attention to spelling.  Well, I fixed it and sent a new version to our new editor, Viki.  My apologies to anyone who might have been offended by the misspelling.  Note:  the logo has been updated at the SSC site.

Graphics Mews
      Disclaimer: Before I get too far into this I should note that any of the news items I post in this section are just that - news. Either I happened to run across them via some mailing list I was on, via some Usenet newsgroup, or via email from someone. I'm not necessarily endorsing these products (some of which may be commercial), I'm just letting you know I'd heard about them in the past month.


The third annual technical symposium focusing upon the research, technology and applications of VRML, the Vritual Reality Modeling Language will be held Feb 16-19, 1998 in Monterey, California.  VRML 98 is sponsored by ACM SIGGRAPH and ACM SIGCOMM in cooperation with the VRML Consortium. Deadlines for submission are as follows: 
Papers Mon. 22 Sep
Panels Fri. 3 Oct
Video Mon. 2 Feb
Contact Information: 
VRML 98 Main Web Site http://ece.uwaterloo.ca/vrml98
Courses vrml98-courses@ ece.uwaterloo.ca
Workshops vrml98-workshops@ ece.uwaterloo.ca
Panels vrml98-panels@ ece.uwaterloo.ca
Papers vrml98-papers@ ece.uwaterloo.ca
Video Submissions vrml98-video@ ece.uwaterloo.ca
Demo Night vrml98-demos@ ece.uwaterloo.ca


Cow House Productions is please to present the first release of Iv2Rib, an Inventor 2.0 (VRML 1.0) to Renderman / BMRT converter. Source (C++) and an Irix 5.3 binary are available at: 

http://www.cowhouse.com/ Home/Converters/converters.html 

Additionally, new updates (V0.12, 30-Jul-97) of both Iv2Ray (the Inventor to Rayshade converter) and Iv2POV (the inventor to POVRAY converter) are also available on the same page, as both source (C++) and binaries for Irix 5.3

Crack released the Abuse source code to the public domain recently. Abuse was a shareware and retail game released for DOS, MacOS, Linux, Irix, and AIX platforms. 

The source is available at 


If you don't know the 1st thing about Abuse, 


Lastly, if you want to discuss the source (this is a just-in-case thing-it may very well not get used), we put a small newsgroup up at news://addicted.to.crack.com/crack.technical. That is also where we'll prolly host a newsgroup about Golgotha DLL's, mods, editting, movies and stuff like that later on. 
Dave Taylor


Version 0.2.0 of DeltaCine

DeltaCine is a software implemented MPEG (ISO/IEC 11172-1 and 11172-2) decompressor and renderer for GNU/Linux and X-Windows. It is available from ftp://thumper.moretechnology.com/pub/deltacine

This project aims to provide portable C++ source code that implements the system and video layers of the MPEG standard.  This first release will interpret MPEG 1 streams, either 11172-1 or raw 11172-2, and render them to an X-Windows display.  The project emphasizes correctness and source code readability, so the performance suffers. It cannot maintain synchronized playback on a 166MHz Pentium. 

Still, the source code contains many comments about the quality of the implementation and the problems encountered when interpreting the standard.  All of the executing code was written from scratch, though there is an IDCT (Inverse Discrete Cosine Transform) implementation adapted from Tom Lane's IJG project that was used during development. 

This is an ALPHA release which means that the software comes with no warranties, expressed or implied.  It is being released under the GNU Public License for the edification of the GNU/Linux user community. 


  • Requires ix86
  • No playback synchronization.  Movies play as fast as the decoder can render the frames.
  • Requires X-Windows server in 16bpp mode.
  • Full decode of Part 1 (System) and Part 2 (Video) specification for ISO/IEC 11172.  Full implementation except for synchronization.
  • Reference quality output as compared to the Stanford implementation.
  • User-mode multi-threading implemented as part of the decoder.

RenderMan Module v0.01 for PERL 5

This module acts as a Perl5 interface to the Blue Moon Rendering Tools (BMRT) RenderMan-compliant client library, written by Larry Gritz: 

This module requires Perl 5, a C compiler, and BMRT. 

Some extra code has been added to the examples directory that should enable you to convert LightWave objects to RIB or to a Perl script using the RenderMan binding.  More useful examples will be provided in future releases. 

Updates will hopefully be uploaded to PAUSE once I am authorized to upload there, and will be posted to my personal home page at: 

Glenn M. Lewis | glenn@gmlewis.com 

Sven Neumann released two more GIMP scripts for the megaperls script collection. You can find them as usual at: 
http://www-public.rz.uni-duesseldorf.de/ ~neumanns/gimp/megaperls 

You'll need to patch the waves-plug-in if you want to use the waves-anim script. The patch was posted a while ago on the list but hasn't made its way into any semi-official release yet. It is also available from the web-site mentioned above. 

Ed. Note:  Please note that the current release of the GIMP is a developers only release and not a public release.  If you plan on using it you should be very familiar with software development and C.  A public release is expected sometime before the end of the year. 

Sven Neumann 



t1lib is a library for generating character- and string-glyphs from Adobe Type 1 fonts under UNIX. t1lib uses most of the code of the X11 rasterizer donated by IBM to the X11-project. But some disadvantages of the rasterizer being included in X11 have been eliminated. Here are the main features: For X11-users a special set of functions exists which: Author:      Rainer Menzner (rmz@neuroinformatik.ruhr-uni-bochum.de)

You can get t1lib by anonymous ftp at:

An overview on t1lib including some screenshots of xglyph can be found at:

 GTK Needs A Logo!

GTK, the GIMP Toolkit (I think, at least thats what it used to stand for) is looking a for a logo. Something that defines the essence of GTK, something that captures its soul and personality. A frozen image of everything that GTK stands for. Or maybe just something cool.

The Prize

The prize for submitting the winning logo is a very cool yourname@gimp.org email alias. Thats right, if you win, you can be the envy of your friends with your sparkling @gimp.org email alias.

See http://www.gimp.org/contest.html for more details.

Announcing MpegTV SDK 1.0 for Unix

MpegTV SDK 1.0 is the first toolkit that allows any X-windows application to support MPEG video without having to include the complex code necessary to decode and play MPEG streams. 

MpegTV SDK 1.0 is currently available for: 

  • Solaris 2.5 SPARC
  • Solaris 2.5 x86
  • IRIX 6.2
  • Linux x86
  • BSD/OS 3.0
MpegTV also announces more good news: MpegTV Player 1.0 for Unix is now free for non-commercial use! 
For more information on MpegTV products and to download MpegTV software, please visit the MpegTV website: 

Tristan Savatier - President, MpegTV LLC 

Announcing MpegTV Plug-in 1.0 for Unix

MpegTV Plug-in 1.0 is a streaming-capable Netscape Plug-in that allows you to play MPEG movie embedded inside HTML documents. 

Unlike other similar Netscape Plug-ins (e.g. the Movieplayer Plug-in on SGI), MpegTV Plug-in is capable of streaming from the network, i.e. you can play a remote MPEG stream immediately, without having to wait for the MPEG file to be downloaded on your hard disk. 

MpegTV Plug-in 1.0 is currently available for: 

  • Solaris 2.5 SPARC
  • IRIX 6.2
  • Linux x86
  • Solaris 2.5 x86 (coming soon)
  • BSD/OS 3.0      (coming soon)
Get it now at http://www.mpegtv.com/plugin.html
Regards, -- Tristan Savatier (President, MpegTV LLC) 

MpegTV:   http://www.mpegtv.com 
MPEG.ORG: http://www.mpeg.org 


USENIX 1998 Annual Technical Conference

The 1998 USENIX Technical Conference Program Committee seeks original and innovative papers about the applications, architecture, implementation, and performance of modern computing systems. Papers that analyze problem areas and draw important conclusions from practical experience are especially welcome. Some particularly interesting application topics are: 

 ActiveX, Inferno, Java, and other embeddable environments 
 Distributed caching and replication 
 Extensible operating systems 
 Freely distributable software 
 Internet telephony 
 Interoperability of heterogeneous systems 
 Nomadic and wireless computing 
 Privacy and security 
 Quality of service 
 Ubiquitous computing and messaging 

A major focus of this conference is the challenge of technology: What is the effect of commodity hardware on how we build new systems and applications? What is the effect of next-generation hardware? We seek original work describing the effect of hardware technology on software. Examples of relevant hardware include but are not limited to: 

 Cheap, fast personal computers 
 Cheap, large DRAM and disks 
 Flash memory 
 Gigabit networks 
 Wireless networks 
 Cable modems 
 Personal digital assistants 
 Network computers 

The conference will also feature tutorials, invited talks, BOFs, 
and Vendor Exhibits. 

For more information about this event: 

* Visit the USENIX Web site: 

* Send email to the USENIX mailserver at info@usenix.org.  Your message should contain the line:  "send usenix98 conferences". 

* Or watch comp.org.usenix for full postings 

The USENIX Association brings together the community of engineers, system administrators, scientists, and technicians working on the cutting edge of computing. Its technical conferences are the essential meeting grounds for the presentation and discussion of the most advanced information on new developments in all aspects of advanced computing systems. 

Ra-vec version 2.1b - convert plan drawings to 3D vector format

Ra-vec is a program which can convert plan drawings of buildings into a vector format suitable for the creation of 3D models using the popular modelling package AC3D. It is freely avalible for linux from 
http://www.comp.lancs.ac.uk/ computing/users/aspinr/ra-vec.html 

xfpovray 1.2.4

A new release of the graphical interface to the cool ray-tracer POV-Ray called xfpovray is now available.  It requires the most recent (test) version of the XForms library (0.87), and supports most of the numerous options of POV-Ray.  Hopefully 0.87 will migrate from test release to public release soon. 

This version of xfpovray adds a couple nice features, such as POV-Ray templates to aid in writing scene files. Binary and source RPMs are also available.  Since xforms does not come in rpm, you may get a failed dependency error.  If you get this, just use the --nodeps option. 

You can view an image of the interface and get the RPMs and source code from 


There is a link there to the XForms home page if you don't yet have this library installed. 

Bob Mallozzi <mallozzir@cspar.uah.edu

WSCG'98 - Call for Papers and Participation

Just a reminder: 

The Sixth International Conference in Central Europe on Computer Graphics and Visualization 98, in cooperation with EUROGRAPHICS and IFIP working group 5.10 on Computer Graphics and Virtual Worlds, will be held in February 9 - 13, 1998 in Plzen at the University of West Bohemia close to PRAGUE, the capital of Czech Republic 

Information for authors: http://wscg.zcu.cz select WSCG'98 
Contribution deadline:  September 30, 1997


ivtools 0.5.7

ivtools contains, among other things, a set of drawing editors written in C++ for Unix/X11.  They extend idraw with networked export/import, multi-frame flipbook editing, and node/graph topology editing.  A new release, 0.5.7, is now available.

Source code at:

Linux elf binaries at:

Web page at:

Vectaport Inc.

Pixcon & Anitroll 1.04

New features since version 1.04: Pixcon 3D rendering package that creates high quality images by using a combination of 11 rendering primitives.  Anitroll is a forward kinematic hierarchical based animation system that has some support for some non-kinematic based animation (such as flock of birds, and autonomous cameras).  These tools are based upon the Graph library which is full of those neat rendering and animation algorithms that those 3D faqs keep mentioning.

Why Pixcon & Anitroll?  Well, systems like Alias, Renderman, 3DS/3DSMAX, Softimage, Lightwave, etc are too expensive for average users (anywhere from $1000 - $5000 US)  and require expensive hardware to get images in a reasonable amount of time.  Conventional freeware systems, such as BMRT, Rayshade, and POV are too slow (they're raytracers...). Pixcon & Anitroll is FREE, and doesn't take a long time to render a frame (true, its not real time... but I'm working on it). It also implements some rendering techniques that were presented at Siggraph 96 by Ken Musgrave and was used to generate an animation for Siggraph '95.

The Pixcon & Anitroll Home page is at: http://www.radix.net/~dunbar/index.html

Comments to dunbar@saltmine.radix.net
Availabe from:  ftp://sunsite.unc.edu/incoming/Linux/pixcon-105.tgz
and will be moved to:

Glide 2.4 ported to Linux

Glide version 2.4 has now been ported to Linux and is available free of charge. This library enables Linux users with 3Dfx Voodoo Graphics based cards such as the Orchid Righteous 3D, Diamond Monster 3D, Canopus Pure 3D, Realvision Flash 3D, and Quantum Obsidian to write 3D applications for the cards. The Voodoo Rush is not yet supported. The library is available only in binary form.

To quote 3Dfx's web page:

Glide is an optimized rasterization library that serves as a software 'micro-layer' to the 3Dfx Voodoo accelerators. With Glide, developers can harness the power of the Voodoo to provide perspective correct, filtered, and MIP mapped textures at real-time frame rates - without having to work directly with hardware registers and memory, enabling faster product development and cleaner code.
As a separate effort, a module for Mesa is also under development to provide an OpenGL like interface for the Voodoo Graphics cards.

For more information on Glide please see:
For more download informtion for Glide see:
For more information on Mesa see:
For an FAQ on 3Dfx on Linux see:
Finally, if you need to discuss all this, try the 3Dfx newsgroup:

Did You Know?

Q and A

Q: Let me ask a graphic related question: is there a software which converts GIF/JPEG file to transparent GIF/JPEG file?  Raju Bathija <bathija@sindhu.theory.tifr.res.in>

A: JPEG, to my knowledge, doesn't support transparency.  You have to use GIF (or PNG).  GIF files can have a transparency added by picking the color you want to be transparent.  One of the colors, and only one, can be specified as transparent.  You can use xv to pick the color.  Then you can use the NetPBM tools to convert the image to a transparent GIF.  You would do something like

giftopnm file.gif | ppmtogif -transparent rgb:ff/ff/ff > newfile.gif

Check the man page for ppmtogif for how to specify the color to use.

Reader Mail

Chris Bentzel <cbentzel@rhythm.com> wrote:
At the end of your gamma correction discussion of graphics muse issue 17, you mention that you were unable to find contact info for Greg Ward. He is at gregl@sgi.com (he is now Greg Ward Larson-> believes in reciprocating on the maiden-married name thing).However, a better link is to the radiance page: a high-end, physically correct ray-tracing/radiosity renderer used mostly for architectural design (and runs on Linux! Free source!)  http://radsite.lbl.gov/radiance/HOME.html
Jean Francois Martinez <jfm2@club-internet.fr> wrote:
I had just finished reading your article in LJ about Megahedron and I was reading some of the examples and playing with them.  I looked in mhd/system/smpl_prims and found the following:
so you can do this
picture smokey_train_pic with
Notice than I put it just under the declaration of the top level object (the one called by do). Of course if you use this for the examples provided you will notice that now the camera is not focusing on the subject.
John P. Pomeroy <pomerojp@ttc2.lu.farmingdale.edu> wrote:
Usually I skip over the Graphics Muse, (I'm a bit head, not a graphic artist) but something drew me in this time.  Perhaps it's because I'm investigating the development of a Linux based Distance Learning platform for for use in my networking classes.Anyway, one of the  least expensive resources I've found over time has been the Winnov Videum-AV.  An outstanding card but near as I can tell, there are no Linux drivers .  I contacted Winnov a while back and they're not interested in Linux at all, but after reading about the efforts of the QuickCam folks I was wondering if you could just mention that the Videum card exists, perhaps simply asking if anyone is working on a driver?  (And, no, I don't own stock in Winnov nor know anyone that does.)Perhaps some of the programmers out there are working on something, or maybe Winnov will take the hint.  I'm certain that a Videum card on Linux would outperform the same card under NT.  Imagine a streaming video service (Either Java based or using the just released 60 stream Real Video Linux server) with a live feed under Linux. Sure wish the folks at Winnov could!Anyway, thanks. The 'Muse has a good balance of technical material and artistic issues.  I'll be reading the 'Muse a lot more often, but first...... the back issues!
'Muse:  Well?  Anyone working on a driver for this?

Jim Tom Polk  <jtpolk@camalott.comhttp://camalott.com/~jtpolk/ wrote:

Reading your column I noticed that you state that you don't know of any animated GIF viewers for Linux. I use xanim.  I usually use gifmerge to create the image, and then load up the image and step through it with xanim.  I also find it useful to see just how some animations are composed / created.  The version I have installed is: XAnim Rev by Mark Podlipec (c) 1991-1997 I only found it out by accident when I loaded an animated GIF by accident (I was clicking on an mpeg file and missed it). You can start/stop/pause.  Go forward and backwards one frame at a time, and speed up or slow down the entire sequence.  You still have to use another utility to create the GIF, but I use it all the time.Really enjoy your column.
'Muse: I got a number of replies like this.  I never tried xanim for animated GIFs.  Sure enough, it works.  It just goes to show how much this wonderful tool can do.

Alf Stockton <stockton@acenet.co.za> wrote:

I have a number of JPEGs that I want to add external text to. ie Comments on photographs I have taken with my QV-10 digital camera. Now I don't want the text to appear on the picture. It must appear either next to or below same. So in other words I want to create a large JPEG consisting of some text and my picture. Of course it does not necessarily have to be a JPEG but it must be something that a web browser can display as I intend uploading same to my ISP.The thought was that I would create a HTML document for each image and this would work but now I have a large number of images & I don't want to create an equal amount of HTMLs.
'Muse: I'm a little confused here.  Do you want the text visible at all?  Or just include the text as unprintable info (like in the header of the image)? If you want the text in the header I'm not sure how to do this.  I'm pretty sure it can be done, but I've never messed with it.

If you want the text visible but not overlapping the original image there are lots of ways to get it done.  I highly recommend the GIMP, even though you feel its overkill - once you've learned to use it you'll find it makes life much easier.  However, if you just want a shell script to do it you can try some of the NetPBM tools.  NetPBM is a whole slew of simple command line programs that do image conversion and manipulations.  One of the tools is pnmcat.  To use this you'd take two images and convert them to pnm files.  For GIFs that would be like

giftoppm file1.gif > file1.pnm

Then you use pnmcat like this:

pnmcat -leftright file1.pnm file2.pnm > final-image.pnm

This would place the two images side by side.  You could then convet this back to a GIF file for placing on the Web page.  pnmcat has other options allowing you to stack the images (-topbottom) and specify the way to justify the smaller image if the images are not the same width/height. There is a man page for pnmcat that comes with NetPBM.

Note that the NetPBM tools do not have tools for dealing with JPEG images. However, there are some tools called jpegtoppm and ppmtojpeg available from the JPEG web site (I think).  I'm not positive abou that.  I don't use these specific tools for dealing with JPEGs.

If you want, you can always read in the JPEG with xv first and save it as a PPM/PNM (these two formats are essentially the same) file first, then use the NetPBM tools.

Jeff Taylor <jeff@adeno.wistar.upenn.edu> wrote:

1)  You mentioned [in your review of Megahedron in the September issue of Linux Journal]some difficulty in writing the model information to a file for rendering with an alternative renderer.  This is important to me as I would like to use PVMPOV for the final rendering.  It wasn't clear from what you wrote, is it difficult to do or impossible?
'Muse: Difficult, but not impossible.  I think you can get model information via polygon data (vectors), but you'll have to do the work of getting that out to the file format of interest. I'm no expert, however.  I used it only for a little while, to get modestly familiar with it.  The best thing to do is write to them and ask the same question.  It will get a better answer (one would hope, anyway) and also show that the Linux community is interested in supporting commercial products.
2)  Does the modeller allow 2D images to be printed?  I'm thinking of CAD type 3-angle-view drawings.  I'd like to use it for CAD applications where a model is created and scale drawing can be printed.
'Muse: There isn't a print function for the 2D images, but you can save the images to a file and then print them using some other tool, like xv or the GIMP. The manual has a section on how to save the images.  BTW, I'm assuming you mean the images that have been rendered.  These images can be saved in RAW  or TGA format using functions provided in the SMPL language.

Daniel Weeks <danimal@blueskystudios.com> wrote:

I just want to start of by telling you that you are doing a great job with the Graphic Muse and on the current article in the Linux Jornal on Megahedron.  This is where my questions come from.
'Muse: Thanks for the compliments!
First, with Megahedron I noticed that it is a progamatic/procedural language for modeling (interestingly enough the language itself is not that dissimilar to our cgiStudio language in structure and function {except for that wierd commenting style}, in fact I already have a perl script that translates most of SPML to cgiStudio :).  The question here is does Megahedron have any sort of interface over the demo mode, I guess I mean something like (but it doesn't have to be as fully functional or bloated as) SoftImage or Alias|Wavefront.  Second can Megahedron support NURBS patches and deforming geometry.
'Muse: Megahedron is a programming API - actually a scripting API.  The CD I got (which is the $99 version they sell from their web pages) wasn't a demo, although it had lots of demos on it.  There is no X interface to the language (ie no graphical front end/modeler).  I suppose if there was enough interest they'd look into it.  Best thing to do is check their web page and get an email address to ask for it.  There might be a non-Unix graphical front end, but I didn't check on that. As for Nurbs, there wasn't any mention of support for it on the disk I got. In fact, I don't think I've come across any modellers (or modelling languages) aside from BMRT that has support for NURBS on Linux.  But Linux is just beginning to move into this arena anyway, so its just a matter of time.
BTW:  for those that don't know it, Blue Sky Studios is the special effects house that is doing, among other things, the special effects for the upcoming Alien Resurrection movie.  Yes, it appears Ripley may live forever.

Hap Nesbitt <hap@handmadesw.com>, of Handmade Software wrote in reply to my review of Image Alchemy:

A very nice review thanks.  BTW we do 81 formats now.  The new formats are documented in addendum.pdf. The Mews seems quite ambitious.  Is this all your work or do you get some help?
'Muse: Its all mine, although I've had a couple of people write articles on two separate occassions.  And Larry Gritz offered lots of help when I did the BMRT write ups.  I still owe the readers an advanced version of that series.
We've found a tool for porting Mac libraries to X. Our Mac interface is beautiful and we should get it ported sometime in the next 6 months or so.  I'll keep you posted. BTW people don't really buy much Image Alchemy, they buy Image Alchemy PS to RIP PostScript files out to large format inkjet plotters in HP-RTL format. If you give me your mailing address I'll send you a poster done this way. I think you might enjoy it.
'Muse: Sounds great.  Thanks for the info Hap!

G. Lee Lewis <GLLewis@ecc.com> wrote:

Your web pages look really nice.
'Muse: Thanks.
Did you use Linux software to create your web pages?
'Muse: Yes.  In fact, thats all I use - Linux.  I don't use MS for anything anymore.  All the software used to create the graphic images on my pages runs on Linux.
Can you say what you used?.
'Muse: Mostly the GIMP, a Photoshop clone for Unices.  "GIMP" stand for GNU Image Manipulation Program, but the acronym kinda stinks (IMHO, of course).  Its quite a powerful program though. I also use xv quite a bit, along with tools like the NetPBM toolkit (a bunch of little command line programs for doing various image processing tasks), MultiGIF (for creating GIF animations) and Netscape's 4.x Page Composer for creating HTML.  I just started using the latter and not all my pages were created with it, but eventually I'll probably switch from doing the HTML by hand (through vi) to only using the Page Composer. For 3D images I use POV-Ray and BMRT.  These require a bit more understanding of the technology than a tool like the GIMP, but then 3D is at a different state of development than 2D tools like the GIMP.
What flavor of Linux do you like, redhat, debian, etc..??
'Muse: Right now two of my 3 boxes at home are WGS Linux Pro's (which is really a Red Hat 3.x distribution) and one is a Slackware (on my laptop).  I like the Red Hat 4.2 distribution, but it lacks support for network installs using the PCMCIA ethernet card I have for my laptop.  I plan on upgrading all my systems to the RH4.2 release by the end of the year.

I've not seen the Debian distribution yet.  Slackware is also quite good. I liked their "setup" tool for creating packages for distribution because it used a simple tar/gzip/shell script combination that was easy to use and easy to diagnose.  However, its not a real package management system like RPM.  "Consumers" (not hackers) will probably appreciate RPM more than "setup".

I also use commercial software for Linux when possible.  I run Applixware, which I like very much, and Xi Graphics AcceleratedX server instead of the XFree86 servers.  The Xi server is much easier to install and supports quite a few more video adapters.  However, it doesn't yet support the X Input Extension unfortunately.  The latest XFree86 servers do, and thats going to become important over the next year with respect to doing graphics.

What do you think of Caldera OpenLinux?
'Muse: I haven't had a chance to look it over.  However, I fully support the commercial distributions.  I'm an avid supporter of getting Linux-based software onto the shelves of software reseller stores like CompUSA or Egghead Software.  Caldera seems the most likely candidate to be able to get that done the quickest.  After that, we'll start to see commercial applications on the shelves too.  And thats something I'd love to see happen.  I did buy the Caldera Network Desktop last year but due to some hardware limitations decided to go back to the Slackware distributions I had then.

Of all the distributions Caldera probably has a better understanding of what it takes to make a "product" out of Linux - something beyond just packing the binaries and sticking them on a CD.  A successful product will require 3rd party products (ones with full end-user quality, printed documentation and professional support organizations) and strategic alliances to help prevent fragmentation.  Fragmentation is part of what hurt the early PC Unix vendors (like Dell and Everex) and what has plagued Unix workstation vendors for years.

So, in summary, I strongly support the efforts of Caldera, as well as Red Hat, Xi Graphics, and all vendors who strive to productize Linux.

<veliath@jasmine.hclt.com> wrote:

Is there some documentation available on GIMP - please, please say there is and point me towards it.
'Muse: No, not yet.  A couple of books are planned, but nothing has been started officially.  No online documentation exists yet.  Its a major flaw in free software in general which annoys me to no end, but even in commercial organizations the documentation is usually the last thing to get done.

There will be a 4 part series on the GIMP in the Linux Journal starting with the November issue.  I wrote this series.  It is very introductory but should help a little. I also did the cover art for that issue.  Let me know what you think!

You can also grab any Photoshop 3 or Photoshop 4 book that covers the basics for that program.  The Toolbox (the main window with all the little icons in it) is nearly exactly the same in both programs (GIMP and Photoshop).  Layers work the same (with some minor differences in the way the dialog windows look).  I taught myself most of what I know based on "The Photoshop 3 Wow! Book" and a couple of others.


Browser Detection with JavaScript

I recently started reading up on the latest features that will be supported in the upcoming releases of the Netscape and MSIE Web browsers through both the C|Net web site known as Builder.com and another site known as Developer.com.  A couple of the more interesting features are Cascading Style Sheets, which you'll often see referred to as CSS, and layers.  CSS will allow HTML authors to define more definitive characteristics to their pages.  Items such as the font family(Ariel, Helvetica, and so forth), style (normal, italic, oblique), size, and weight can be specified for any text on the page.  Browsers will attempt to honor these specifications and if they can't do so they will select appropriate defaults.  CSS handles most of the obvious characteristics of text on a page plus adds the ability to position text in absolute or relative terms.  You can also clip, overflow, and provide a z-index to the position of the text.  The z-index positioning is useful because it provides a means of accesing text and graphics in layers.  By specifying increasing values of z to a position setting you can effectively layer items on a page. Builder.com and Developer.com both have examples of these extensions to HTML that are fairly impressive.  There is a table of the new CSS features available at http://www.cnet.com/Content/Builder/Authoring/CSS/table.html.   You will need Netscape 4.x to view these pages.

CSS is about to make web pages a whole lot more interesting.

The down side to CSS is that its new.  Any new technology has a latency period that must pass before the technology is sufficiently distributed to be useful to the general populace.  In other words, the browsers aren't ready yet, or will just be released at the time this goes to print, so adding CSS elements to your pages will pretty much go unnoticed for some time.  I would, however, recommend becoming familiar with them if you plan on doing any serious Web page design in the future.  In the meantime we still have our JavaScript 1.1 and good ol' HTML 3.0.

Ok, enough philosophizing, down to some nitty gritty.

I just updated my GIMP pages to reflect the fact that the 0.54 version is pretty much dead and the 0.99 version is perpetually "about to become 1.0".  What that means is I've dropped most of my info and simply put up a little gallery with some of the images I've created with the GIMP.  Along with the images, including a background image that was created using nothing more than a set of gradients created or modified with the gradient editor in the GIMP, I've added some Javascript code to spice up my navigation menus and a couple of simple animated GIFs.  It was probably more fun to do than it is impressive.  If you check out these pages you'll find its a little more attractive with Netscape 4.x since I'm using a feature for tables that allows me to specify background images for tables, rows and even individual cells.  Netscape 3.x users can still see most of the effects, but a few are lost.

I had added some JavaScript code to the main navigation page of my whole site some time back.  I sent email to my brother, who does NT work at Compaq, and a Mac-using friend asking them to take a look at it and see what they thought.  It turned out MSIE really disliked that code and the Netscape browser on the Mac didn't handle the image rollers correctly (image rollovers cause one image to be replaced by another due to some user initiated action - we'll talk about those in a future Web Wonderings).  Shocking - JavaScript wasn't really cross platform as was first reported.  Well, its a new technology too.  The solution is to add code to determine if the rest of the code should really execute or not.  I needed to add some browser detection code.

That was .... a year ago?  I can't remember, its been so long now.  Well, while scanning the CSS and other info recently I ran across a few JavaScript examples that explained exactly how to do this.  I now take this moment to share it with my readers.  Its pretty basic, so I'll show it first, then explain it.   Note:  the following columns might be a little hard to read in windows less than about 660 pixels wide.  Sorry 'bout that.
<SCRIPT LANGUAGE="JavaScript1.1">
<!-- // Activate Cloaking Device 
// Browser Detection - check which browse 
// we're working with. 
// Based loosely on code from both Tim  
// Wallace and the Javascript section of
// www.developer.com. 
browserName = navigator.appName; 
browserVersion = parseInt(navigator.appVersion); 
browserCodeName = navigator.appCodeName; 
browserUserAgent = navigator.appUserAgent; 
browserPlatform = navigator.platform;

// Test for Netscape browsers 
if ( browserName == "Netscape" && 
   browserVersion >= 4 )  

   bVer = "n4"; 
if ( browserName == "Netscape" && 
   browserVersion == 3 )  

   bVer = "n3"; 
if ( browserName == "Netscape" && 
   browserVersion == 2 )  

   bVer = "n1"; 

// Test for Internet Explorer browsers 
if ( browserName == "Microsoft Internet Explorer" && 
     browserVersion == 2 ) bVer = "e2"; 
if ( browserName == "Microsoft Internet Explorer" && 
     browserVersion == 3 ) bVer = "e3"; 
if ( browserName == "Microsoft Internet Explorer" && 
     browserVersion >= 4 ) bVer = "e4"; 

// Deactivate Cloaking  --> 
The first line tells browsers that a script is about to follow.  The LANGUAGE construct is supposed to signify the scripting language, but is not required. If the LANGUAGE tag is left off browsers are supposed to assume the scripting language to be JAVASCRIPT.  The only other language available that I'm aware of currently is VBSCRIPT for MSIE   Browsers that do not understand this HTML element simply ignore it.  The next line starts the script.  All scripts are enclosed in HTML comment structures.  By doing this the script can be hidden from browsers that don't understand them (thus the comment on "cloaking").  Note that scripts can start and stop anywhere in your HTML document.  Most are placed in the <HEAD> block at the top of the page to make debugging a little easier, but thats not required. 

Comments in scripts use the C++ style comment characters, either single lines prefixed with // or multiple lines that start with /* and end with */.  I placed the comments in the example in a purple color for those with browsers that support colored text, just to make them stand out from the real code a little. 

The next five lines grab identification strings from the browser by accessing the navigator object.  The first two, which set the browserName and browserVersion variables,  are obvious and what you will use most often to identify browsers in your scripts.  The appCodeName is "Mozilla" for Netscape and may not be set for MSIE.  The appUserAgent is generally a combination of the appCodeName and the appVersion, although it doesn't have to be.  Often you can use grab this string and parse out the information you are really looking for.  The last item, the platform property for the navigator object, was added in Javascript 1.2.  Be careful - this code tries to access a property that not all browsers can handle!  You may want to embed the browserPlatform assignment inside one of the IF statements below it to be safe.

Now we do some simple tests for the browsers our scripts can support. Note that the tests are fairly simply - we just test the string values that we grabbed for our browserName and browserVersion variables.  In the first set of tests we check for Netscape browsers.  The second set of tests test for MSIE browsers.  We could add code inside these tests to do platform specific things (like special welcome messages for Linux users!) but in practice you'll probably want this particular script to only set a global flag that can be tested later, in other scripts where the real work will be done.  Remember - you can have more than one script in a single HTML page and each script has access to variables set in other scripts.

Why is it important to test for browers versions?  Simple - JavaScript is a new technology, introduced in Netscape's 2.0 release of their Navigator browser.  Microsoft, despite whining that JavaScript isn't worth supporting, added support for the language in their 3.0 browser.  The problem is that each version, for either browser, supports the language to different extents.  For example, one popular use of the language is "image rollovers".  These allow images to change in the display based when the mouse is placed over the image.  Various versions of Netscape from 2.0 handled this just fine.  The Mac version had a bug in 3.0 that would not clear the original image before updating with the new image.  MSIE 2.0 and 3.0 didn't like this bit of JavaScript at all, popping up error windows in protest.  Knowing the browser and platform information can help you design your JavaScript to work reasonably well on any platform. 



Unfortunately I'm not able to bring you my experiences at SIGGRAPH this month.  On my trip I took notes in my NEC Versa notebook (running Linux, of course).  Unfortunately I left the power supply and power cable in my motel room and by the time I realized it after I returned the motel could not find it.  Its probably on some used computer resellers shelves now.  Anyway, I just ordered a replacement.  I'll have my SIGGRAPH report for you next month.  Sorry about that.  I am, of course, taking donations to cover the cost of replacement.  <grin>

Designing Multimedia Applications

I recently picked up a copy of Design Graphics from my local computer bookstore.  This is a monthly magazine with a very high quality layout that covers many areas of computer graphics in great detail.  The magazine is rather pricey, about $9US, but so far has proven to be worth the price.  If you are into Graphic Design and/or User Interface Design it might be worth your time and money to check out this magazine.

The July issue focused on MetaCreations, the company that was created from the merger of MetaTools and Fractal Design.  MetaTools founders includeKai Krause, a unique designer and software architect, the man responsible for the bold interfaces found in MetaTools products like Soap and GOO.  This issue also included very detailed shots of the interface for Soap.  It was while reading this issue and studying the interface for Soap that I realized something basic:  Multimedia applications can look like anything you want.  You just have to understand a little about how Graphical Interfaces work and a lot about creating graphical images.

Graphical Interfaces are simply programs which provide easily recognizable displays that permit users to interact with the program.  These interfaces are event driven, meaning they sit in a loop waiting for an event such as a mouse click or movement and then perform some processing based on that event.  There are two common ways to create programs like this.  You can use a application programming interface, often referred to as an API, like Motif or OpenGL.  Or you can use a scripting interface like HTML with Java/JavaScript or VRML.  Which method you choose depends on the applications purpose and target audience.

So, who is the target audience?  My target audience for this column is the multitudes of Linux users who want to do something besides run Web servers.  Your target audience will either be Linux/Unix users or anyone with access to a computer no matter what platform they use.  In the first case you have a choice:  you can use either the API's or you can make use of HTML/VRML and browser technology.  If you are looking for cross-platform support you will probably go with browser technology.  Note that a third alternative exists - native Java which runs without the help of a browser - but that this is even newer than browser technology.  You'll have about a year to wait till Java can be used easily across platforms.  Browser technology, although a little shakey in some ways, is already here.

In order to use an API for your multimedia application you need to choose a widget set.  A widget set is the part of the API that handles windowing aspects for you.  Motif has a widget set that provides 3D buttons, scrollbars, and menus.  Mutlimedia applications have higher demands than this, however. The stock Motif API cannot handle MPEG movies, sound, or even colored bitmaps.  It must be used in conjunction with OpenGL, MpegTV's library, the OSS sound interface and the XPM library to provide a full multimedia development environment.  The advantage to the API method is control - the tools allow the developer the ability to create applications that are much more sophisticated and visually appealing than with browser based solutions.  An API solution, for example, can run in full screen mode without a window manager frame, thus creating the illusion that it is the only application running on the X server.  In order to get the effects you see in MetaTool's Soap you will need to create 2D and 3D pixmaps to be used in Motif label and button widgets.  If you do this you should turn off the border areas which are used to create Motif's 3D button effects. You will also need to write special callbacks (routines called based on an event which you specify) to swap the pixmaps quickly in order to give the feeling of motion or animation.

Even with the use of 3D pixmaps in Motif you still won't have the interactivity you desire in your multimedia application.  To add rotating boxes and other 3D effects with which the user can interact you will need to embed the OpenGL widget, available from the MesaGL package, into your Motif program.  By creating a number of OpenGL capable windows you can provide greater 3D interactivity than you can by simply swapping pixmaps in Motif labels and buttons.  The drawback here is that you will be required to write the code which registers events within given areas of the OpenGL widget.  This is not a simple task, but it is not impossible.  Using OpenGL with Motif is a very powerful solution for multimedia applications, but it is not for the faint of heart developer.

Using browser technology to create a multimedia application is a little different.  First, the browser will take care of the event catching for you.  You simply need to tell it what part of a page accepts events, which events it should watch for and what to do when that event happens.  This is, conceptually, just like using the API method.  In reality, using a browser this way is much simpler because the browser provides a layer of abstraction to simplify the whole process.  You identify what parts of the page accept input via HTML markup using links, anchors, and forms and then use JavaScript's onEvent style handlers, such as onClick or onMouseOver, to call an event handler.  Formatting your application is easier using the HTML markup language than trying to design the interface using the API.  You can have non-rectangular regions in imagemaps, for example, that accept user input.  API's can also have non-rectangular regions, but HTML only requires a single line of code to specify the region.  An API can use hundreds of lines of code.

-Top of next column-
More Musings...  
No other musings - what?  This wasn't enough for you?  <grin>

Ok, since we know using API's can be complex, and because I'm going to run out of room long before I can cover how to use an API to do a multimedia application, lets look at creating an application using browser technology.

Creating web pages is pretty easy.  If you haven't had a chance yet, take a look at Netscape 4.0.  It includes a tool called the Page Composer which allows for WYSIWYG creations of web pages.  This column was created using Page Composer.  Web pages are not enough, of course.  We need graphics, animations and sound.  Not to mention interaction with files on disk.

Graphics, animations and sound can easily be embedded in a web page with links.  Your application will probably need to provide players for any animations or sounds you provide unless you feel really confident users will already have players.   For animations on Linux systems, other than animated GIFs which are supported natively in most browsers these days, you can try xanim.  Your installation process will have to explain how to install the players.  JavaScript does permit you to query what players and plug-ins are available but doesn't appear to give you the ability to automatically launch them without having first registered them with the browser.

Sound can be added just like the graphics and animations.  You simply have links to the sound files.  Not all Linux systems will have sound available.  You might want to consider writing a plug-in which checks for the sound devices before trying to play sounds and having this plug-in installed for your sound files.  Security issues may prevent a plug-in from opening a device file.  You should check the Netscape plug-in API to find out what files you can and cannot open.

You might be wondering how you can use a browser for a multimedia application on a CD.  Don't forget - both MSIE and Netscape allow you to view HTML documents on the native system.  On Netscape you can just use something like file:/cdrom/start.html to open up the main page of the application.  Any links - sound, graphics, or animations - can be displayed or played when the page is first loaded using JavaScript's onLoad event handler.  Graphics, animations, sound and Java applets do not have to be served via a Web server to be viewed or run by the browser.  And JavaScript is embedded in the HTML page so it doesn't require a Web server either.  As long as you use relative links (relative to the directory where your applications start page is located) your users won't need access to a Web server to use your HTML-based multimedia application.

Well, we've covered just about all the things you'll want to do in your program except how to access files.  Security in browsers and with Java has traditionally been rather zealous - the systems were secure by denying all access to your hard drives.  Thats still the case even with JavaScript 1.2.  There are no real file I/O commands in the JavaScript language.  In order to place data in your application you will need to place it all in static arrays embedded in JavaScript code in a page.  Fortunately you can place this data in separate files and link to them when the page is loaded.  To do this you would use the SRC= attribute of the SCRIPT tag.  Netscape 3.0 or later browsers will read this and load the script file as if it were embedded at the SCRIPT tag of the original page.  This will not work for pre-3.0 browsers, some of the beta 4.0 browsers or (apparently) any of the MSIE browsers.

The SCR attribute  provides some level of control for maintaining your data files, but it also means your data is in user readable files on the CD. If you use Java applets instead you have the ability to compile this data into an object file but you still don't have access to your file system.  It may be possible to read data from files using plug-ins in order to perform some interactive operations but I'm not familiar with the Netscape or MSIE plug-in API's and suspect they also have some measure of security that may prevent this.  Reading files seems harmless enough, but there are reasons to disallow this practice. There is a way to get read/write access to the users filesystem from a JavaScript or Java application - certificates.  This is a new technology and I'm not that familiar with its use yet.  The Official Netscape JavaScript 1.2 Book describes certificates and how to obtain and create them.  I suggest taking a look at this book (at the end of chapter 14) if you are interested in this.

As I reread this article I realize what is so crystal clear in my mind now is probably still a muddy swamp to my readers.  Don't fret.  I covered a lot of material in a rather short space.  What you should do is first pick a method - API or browsers.  Then pick one part of that method and start reading all you can about it.  Personally, I understand the API methods better since I'm a programmer by trade.  The browser technology is interesting in that it provides the User Interface (UI) that is filled in by the developer with images and sound.  Abstrasting the UI in this manner is the future of applications but its still in its early days of development.  In either case you still need an understanding of what each piece of the puzzle does for you. The API method will give you more control and access to databases without the need for servers (you can embed the database code in the application).  The browser method is easier to prototype and develop but has limited access to the system for security reasons. Either method can produce stunning effects, if you understand how all the pieces fit together.  And when you look at MetaCreations products, like Soap and GOO, you can see the kinds of effects that are possible.

The following links are just starting points for finding more information about computer graphics and multimedia in general for Linux systems. If you have some application specific information for me, I'll add them to my other pages or you can contact the maintainer of some other web site. I'll consider adding other general references here, but application or site specific information needs to go into one of the following general references and not listed here.
Linux Graphics mini-Howto 
Unix Graphics Utilities 
Linux Multimedia Page 

Some of the Mailing Lists and Newsgroups I keep an eye on and where I get alot of the information in this column: 

The Gimp User and Gimp Developer Mailing Lists
The IRTC-L discussion list 

Future Directions

Next month: Let me know what you'd like to hear about!

Copyright © 1997, Michael J. Hammel
Published in Issue 22 of the Linux Gazette, August 1997