[American Institute of Aeronautics and Astronautics 32nd Aerospace Sciences Meeting and Exhibit -...

9
AlAA 94-0326 GLIMPSE: An Object-Based Approach to Scientific Visualization B.L. Bihari, K.M. Peppi, and S.R. Chakravarthy Rockwell International Science Center Thousand Oaks, CA 32nd Aerospace Sciences Meeting & Exhibit January 10-1 3, 1994 / Reno, NV For permission to copy or republish, contact the American Institute of Aeronautics and Astronautics 370 L'Enfant Promenade, S.W., Washington, D.C. 20024

Transcript of [American Institute of Aeronautics and Astronautics 32nd Aerospace Sciences Meeting and Exhibit -...

AlAA 94-0326 GLIMPSE: An Object-Based Approach to Scientific Visualization B.L. Bihari, K.M. Peppi, and S.R. Chakravarthy Rockwell International Science Center Thousand Oaks, CA

32nd Aerospace Sciences Meeting & Exhibit

January 10-1 3, 1994 / Reno, NV For permission to copy or republish, contact the American Institute of Aeronautics and Astronautics 370 L'Enfant Promenade, S.W., Washington, D.C. 20024

GLIMPSE: AN OBJECT-BASED APPROACH

TO S C I E N T I F I C VISUA1,IZATION

Barna L. Bihari *, Kini M. Pcppi t, and Sukumar R . Cliakravartliy t Rockwell Internntional Science Center

Tlious;md Oaks, California

A new scient.ific visdization package has bccii d e w -

oped using objects as thc basic display units. Thc codc can

liandlc tlirec dimensional structured ~ n t l unstructured grids

and gcneric lines wi th or without an accompanying function

or rrctor value at each spatial location, as well as NURBS

curves and surfaces, profilcs, and t a t . Ench of thcsc data

types is input as a scparntc graphics object, dcfined by its

type, geometry description, function or vector values, and

attributes. Oncc c ra ted , the objccts can be individudly

toggled on or off as well as intcractivcly rotat,ed, zoomcd

and panned iii t h e diinrnsions. By design, GLIAWSE can

be considered a complctr standalone packagc, as well as a

library of higli-lcvel rontinrs c;rllable by those application

programs that want to take ndvantngc of the additional

flesilility and control. It is, in fact, ii graphics en.viron-

ment that was crcated with thc goal of providing access to

hi~h-pcrforInancc graphics for a !nrge group of w x s .

-2'

1. INTRODUCTION

agrs arc of p a t importance. Howevcr, few of thr tools

sern today serve all users with a n4dc range of eapcrience

in either or hoth CFD and computcr graphics. PLOT3D:

altliough bcing the first widely used 3-D graphics pack;iye,

was inlicrently limited by its structured grid framework and

command driven control flow (Ref. 1). VISU.AL3D, i i i i -

othcr notable example in the evolution of grxpliics pnrk-

ages, presented a real improvement b y its ability to plot

unstructured meshes (Ref. 2).

With tlie rapid evolution of computer hardwire: i n par-

tirrilar i n the area of computer graphics, trnly intrl-active

visiializntion is possible now more t h a n evcr beforr. .At thc

5 a n ~ timc, when large CFD solutions ate to bc displayed

as complex 3-D, shaded and lighted graphical object.s, high-

pcrforniancc graphics becomes an alxolute neccssity. As a

rcsiilt, there seems to bc a trend of departing from n.riting

portnblc graphics codes favoring insteild highly customizcd

programs, tailor-ruadc for onc particular coinpudrr or sinall

class of workstations.

Thc "GLIMPSE" (Grapliics Library Iiiterxtive Mouse-

driven Plotting Software Environment) is written particii-

lady for the Silicon Graphics machines, using SGI's gI li-

in CFD research with much progress in the arcas of flow

solvers for unsf ruc.tured meshes and corresponding grid gcm

erators. To coinplctr tlie analysis cycle, visualization g:ick-

coilsideration in its design. lil ,"lIat fol~ows, sllall out.

liIic thc features, n~rthods, ~lscr intcrface, and, in

general, the undcrlyil,g progi.amming philosol,l,y tllat, me

have irnplenxnted. * Senior Teclinical Associate, Mcnibcr AIAA t Technical Associstc, Nonmember # Managcr, CFD Department, h h i r b e r AIAA

/'

Copyright 0 American Institute of Aeronautics and Astronautics. Inc., 1994. All rights reserved.

1

5) Mode sclcrthn:

a ) toggle picking mode on or off;

b) toggle Ilox editing mode on or off.

c) toggle quick update mode on or off.

2.7 Picking

Using the Silicon Graphics gl terminology, GLIMPSE

utilizes picking a,s a graphical means for extracting certain

information from thc the ohjcit(s). The results of pick-

ing call l i e uscd, for example, to qucrry tlir solution set

for a function valuc at a particiilar computational ccll, or

rcturnrd in an array of indiccs showing the picked crlls or

nodes. Picking is currently implemented for points, line

segments, polygonal (individual tiianglcs or quadrilaterals)

objects, structured patchrs and NURUS surfaces. While

it is not directly used in GLIMPSE, the application pro-

gram, it is part of tlic GLIMPSE environment. UNISG, a

grid gcnrration package, a n d XUKISUC, a "boundary con-

dition painter," both developed at Rocka.el1 Science Center

(Refs. 4, 5 and G ) , already iise thc picking capability of the

GLIMPSE library.

d'

3. CODE ARCHITECTURE

3.1 Programming Languages and Libraries

The sourcc code for GLIMPSE is organized into four'

basic libraries:

(I) the object generator library which handles the binary

and ASCII read/write operations and creates the graph-

ics objects;

(2) thc utilities library which contains thc routines that

intcrfacc bctwccn GLIMPSE and the UNIX operating

system and does the automatic memory allocation;

(3) the graphics library, tlic hcart of thr GLIMPSE code,

that displays, manipulates and d i t s tlic ohjects and

windows; d'

(4) tlic X-windows lilxary wliicli is the driver program

containing the main control flow of th? codo and the

menus.

I t an 1 above is written in FORTRAR, wliilc the re-

maining three items are C language source codes. Library

4 uses X11, while Library 3 links with SGI's gI routines. Li-

brary 3 is callablc by both FORTRAN and C applications

programs that have their own driver and gcncrate their own

graphics objects.

3.2 Control Flow

The following list shows the major prograix blocks and

logical structure of GLIMPSE:

1. Initialize graphics (create one graphics window) and

menus.

2. For each window:

2a. Create the window, if it does not exist.

21). Enter data file's root name.

2c. Enter viewing parameters.

2d. Enter attribntes (lighting, shading, titles, ctc.)

2e. Read in data; create graphics objects.

2f. Render all objccts; activatc graphics windows.

2g. Manipulatc the image (ohjccts, Icgends, titlcs, etc.)

using tlic monse and g l event querlc.

2h. Exit graphics mode; activat,e %menus.

2i. Go hack to 2.

3. Save all plotting parameters in an output filr to I K

used later as input file in subscqucnt graphics scssioiis.

4. Exit.

3.3 Modularity and Generality

Uy introducing the concept of graphical objects, i t be^

comes quite easy and natural to add ncw types of objects,

should the need arise. Each section of codc that hsndlcs

one type of objects is thought of as a modrtle, \rhicli can

be nddcd (and deleted) without affecting thr rest of thr

code. .4lthougli currently GLIkIPSE is only usrd to visual-

7

izc CFD data sets, it is intcndcd to be used in any scientific

visualization proccss which creates data i n a GLIMPSE-

compntiblc formit.

Although flexibility and reusability were major coil-

siderations in designing thc library, tha interface to other

drivers calling thc GLIMPSE routines is simple. Indecd, by

making only a hnndfiil of GLIMPSE ciills, pre-processors,

like UNISG (Ref. F) get all its

graphics functionality. Other programs needing more coil-

trol over grnphirs options may use a more cxtelided sct

of routines. On such example is XUNISP, a UNIVERSE-

Scries post-processor (Rcfs. 7 and 8).

4) and XUNISBC (Ref.

4. CONCLUSIOXS

This p:iper prcsrnted an alternate approach to scien-

tific visualization Grouping ihc input data into entitics

called objccts wc achieve modularity and ease of use. At

the same time, efficiency being an i n p x t a n t criterion, we

taylor-ma& a graphics package for a particular graphics

platform, using one generic graphics library and two pro-

gramming languages. While a main program with its own

control flow is provided, the mnre demanding and some-

what cxpericnced user is offercd a liigli-level library callable

from her or his application software.

J

Rcfcrenccs:

[I] P. Buning and J . L. Stcger, “Graphics and Flow V -

snalization in Coinputational Fluid Dynamics,” AIAA

P a i m No. 85-1507.

[21 i 4 . B. Giles and R. Haimes, “Advanced Intcmctive Vi-

sualization for CFD,” Computing Systems iii Enginrer-

ing, Vol. 1, No. 1, 1990, pp.51-62.

[3] Rockwell Intrrnational Science Center CFD Depart-

mcnt, “GLIMPSE User Manual,” Version 93.10.

[4] I<-\’. Szema, S. Rumakrishnnn, D. Oth, C-L. Chrn,

B.L. Bihari, and K.M. Peppi, “UNISG: A n Interact,ive

hIultizonc Structured Grid Generator,” .4IAA Paper

Fo 93~3525.

[5j Rockwrll Intcmational Science Center CFD Depart-

ment, “UNISG User Manual,” Version 93.10.

IF] Rockmcll Intcrnational Science Center CFD Depart-

mcnt, “XUWISBC User Manual,” Version 93.10.

171 Rockwell Intcrnational Science Center CFD Dcpar t~

rnent, “UNISP User Manual,“ Version 93.10.

[SI S. R. Chakrarnrthy, ICY. Szemn, S. Ramakrishnan,

and U. C. Goldberg, “Computation of Viscous Flow

Using UNIVERSE-Series, Unstructured Grid Solrcr,”

AL4A Paper So. 93-3455.