The Complete Idiot's Guide to Ivview
 

What is Ivview?
Ivview is a program that is part of the Inventor package, made by the folks at Silicon Graphics (SGI) who also made the computers in the MECA lab where Inventor can be found.  Inventor is essentially a package for generating and manipulating snazzy 3D images.  Ivview, the part of this package that concerns you, lets you view and interact with these 3D images.
 

How do I run Ivview?

  • Be sure you're at an SGI machine in the MECA lab.  You won't be able to find Ivview anywhere else.
  • From the Unix shell, type "ivview".
  • Press "alt-o" to open a file.  In the directory /usr/share/data/models and its subdirectories, you'll find a variety of ".iv" files.
  • Try loading a couple and play around a bit with the different images to familiarise yourself with Ivview (besides, it's a good way to procrastinate).
  • Click the right-side mouse button to bring up a menu and experiment with the different draw styles (like "points" and "wireframe").

  •  

    How do I generate my own Ivview files?
    The Challenging Way: Write your own C++ program using the standard Inventor functions.  Good luck!
    The "Lets Do This Painlessly" Way:  Take a look at the following Ivview ASCII sample code.



    #Inventor V2.0 ascii

    Separator {

            Coordinate3 {
                    point [
                                    0 0 0,
                                    0 1 2,
                                    0 2 3,
                                    1 0 0,
                                    1 1 3,
                                    1 2 2,
                                    2 0 1,
                                    2 1 3,
                                    2 2 2,
                    ]
            }

            LineSet {
                    numVertices 9

            }
    }



    The first few lines basically contain information about the Ivview version number, tells Ivview the code is in ASCII fomat instead of binary, and calls on a function, Coordinate3, that plots points in 3D.  The list of three numbers after the open bracket is the list of 3D coordinates, each one followed by a comma.  The listing of points in the Coordinate3 function alone will not actually plot any points.  The call on LineSet is where Ivview will draw lines in accordance with the points.

    LineSet essentially draws a "polyline"; i.e. connects a bunch of dots with line after line.  The number following numVertices tells LineSet how many points to include in a single polyline.  For example in the above code, the "9" tells LineSet to use a single polyline to connect the first nine points.  If "9" were changed to "[2,4,3]", LineSet would connect the first two points with a line, then the next four points with another polyline, and the next three with a third polyline.  If the "9" is changed to a quantity larger than the number of points listed in Coordinate3, then nothing will be drawn.

    Once you create Ivview ASCII code containing the header info, the coordinates, and the number of vertices you want to plot, save it as an .iv file and run it.
     

    I Still Need More Help!!!
    Look at the man files on Inventor.  The easiest way to read these is to run "xman" and look at the various descriptions of each of the Inventor functions.

    You can also dissect the sample models or any other *.iv file by running "ivcat", which will convert a binary .iv file into an ASCII one and vice-versa (use "man ivcat" to learn this one!!).  This could give you some insight into how some of the more complicated Ivview images were constructed.

    Incidentally, converting your ASCII files into binary will reduce their size, thus making it much more manageable.
     

    Useful Links to Internet Resources on Inventor and ivview

     



    Idiot's Guide written by Master Idiot Roger Ahn '01
    <rogerahn@princeton.edu>
    August 4, 1998