Resume Biography Gallery Digital Images Projects
Josh Grant
 
Master's Thesis
IVTrace
Creating 2D Images
Filter Functions
3D Elastic Collisions
3D Grapher
Open Inventor
Programming Tools
BoundingBox
ExaminerViewerPlus
MarchingCubes
ScalarArithmitic
SFScalarField
Courses
Photo-Realistic 2002
Visualization 2001
Photo-Realistic Computer Graphics
Intro to Computer Graphics
Scientific Visualization

Executables:
The above executables rely on SGI's version of Open Inventor.

Screenshots






 
3D Grapher
November 2001

Introduction

3D Grapher is an interactive tool for graphing functions with 3 components. The application has an interface to input any function, along with the minimum and maximum plotting bounds, and the resolution of the mesh. After a function has been input, the value of the function can be modified with a slider tool.

The purpose of the project was mainly to become more proficent at Open Inventor and to give an example of how to use the Marching Cubes Engine I created for my Scientific Visualization course.

How to use it

  1. Download an executable
  2. If all goes well, an Open Inventor window similar to the one at right should pop up when 3dgrapher executed. If you are familiar with Open Inventor you will notice that the viewer contains some extra buttons along the left and right sides.
    • The Camera button (the last button on the righthand side) is used to take a snapshot of the scene. This is an addition to the SoXtExaminerViewer and is not unique to this project. The viewer itself can be downloaded at ExaminerViewerPlus. When clicked a dialog box pops up prompting the user to enter a save file and image type. The image types supported are jpeg, png, ppm, rgb, and Postscript.
    • The Pencil button (first button on lefthand side) is used to modify the parameters of the function being graphed. When clicked a new window pops up (similar to the one at right). The window contains an interface to interactively modify the mesh resolution, function domain, the function itself, and the value to set the function to. Also, thanks to Gokhan Kisacikoglu, a blending function can be input and blended with the first. The window was implemented by subclassing the SoXtComponent class and adding Motif widgets.
    • The RGB button (second button on lefthand side) is used to modify the material properties of the surface. When clicked a window pops up (similar to the one at right). This component is not unique to this project, it is from the SoXtMaterialEditor class provided by Open Inventor.
  3. Start inputing your own functions and tell me what you think.

How it was Built

3D Grapher is a perfect example of how easily applications can be built by subclassing the Open Inventor libraries. This application was built using several extensions of the libraries, including two Engine nodes, one Shape node, a single valued Field, an XtComponent, and a Viewer.
The Classes
SFScalarField
  • a subclass of SoField used to maintain a 3-dimensional array of scalar values, including the minimum and maximum bounds, and the resolution.
ScalarArithmitic
  • a sublcass of SoEngine used to create an SFScalarField based on a function The values of the scalar field are created by solving the function at each grid point based on an input domain and resolution.
SFScalarFieldBlend
  • a sublcass of SoEngine used to blend two SFScalarField fields together based on a percentage value between 0 and 1.
MarchingCubes
  • a subclass of SoEngine used to create a list of triangles forming a surface. The surface is determined by a data and isoValue input. It outputs a series of points along with the indexes used to for the triangles.
BoundingBox
  • a subclass of SoShape used to draw a nonshaded box around the surface, along with coordinate labels at the vertices.
ParameterEditor
  • a subclass of SoXtComponent used to provide an interface to the input parameters of ScalarArithmitic and MarchingCubes.
ExaminerViewerPlus
  • a subclass of SoXtExaminerViewer used to add a snapshot button to the righthand side button list. The extension allows for scenes to be rendered to file very easily.
The ParameterEditor class doesn't really have any application outside of this one, but it is a simple example of how to extend the SoXtComponent class. 3D Grapher was not tested robustly and I am sure has some bugs. Also, I do not plan on keeping up with this project. This was a small project I put together and I had to keep myself from expanding on it too much due to time constraints.

The Source Code

The source code of the entire project is available for educational purposes. Special thanks goes to Gokhan Kisacikoglu for his additions to the interface, the SFScalarFieldBlend engine, and to the MarchingCubes engine. If you happen to use any of this code for any reason, please send me an email at grant@cs.fsu.edu and tell me what for. This is for nothing more than my own curiosity.
 

Josh Grant > Projects > 3D Grapher

Comments or questions about this page can be addressed to Josh Grant at grant@cs.fsu.edu