Presentation is loading. Please wait.

Presentation is loading. Please wait.

Zhonghua Qu and Ovidiu Daescu December 24, 2009 University of Texas at Dallas.

Similar presentations


Presentation on theme: "Zhonghua Qu and Ovidiu Daescu December 24, 2009 University of Texas at Dallas."— Presentation transcript:

1 Zhonghua Qu and Ovidiu Daescu December 24, 2009 University of Texas at Dallas

2  Introduction  Assisting Visualization System  Implementation  Examples  Conclusion

3  Introduction Visualization and Application Implementing Visualization Integration Challenges Our Goal  Assisting Visualization System  The Implementation  Experiment Result  Conclusion

4  Computer Aided Design ◦ IKEA Home Planner

5  Computer Games ◦ First Person Shooting Games

6  Three layers of visualization programs ◦ Program Model ◦ Visualization Layer ◦ Graphics Engine

7  Program Model ◦ Logic of Programs For example, in car simulation: when a driver turns the wheel, the orientation of the car should change correspondingly. ◦ Numerical Data For example, the width and height of a piece of furniture, or the coordinate of a vehicle. They are abstract and only different by the definition given.

8  Visualization and Graphics Engine ◦ 3D Graphics Rendering Includes the detailed implementation of how the object inside the program model should be rendered on the screen. For example, a chair object is rendered based on its size, type, material etc. ◦ Graphics Engine Implementation of rendering algorithms. Provides more abstract control over the object rendered.

9  Steep Learning Curve To use the graphics engine for visualization requires significant 3D graphics knowledge including matrix transformation, lighting etc. Graphics Engine Visualization Code Matrix Transformation Lighting Model Texture Format ….

10  Not Flexible Once the visualization layer is built the visualization schema cannot be changed without modifying the code. Program Visualization Layer

11  Not reusable Changing the underlying program forces changes in the definition of the visualization. This implies rewriting most of the code. Program Visualizatio n Layer

12  Provide a visualization system ◦ Doesn’t require Graphics Knowledge ◦ Flexible to change the visualization schema ◦ Reusable between applications

13 Introduction  Assisting Visualization System Overview Visual Component Binding with Program  Implementation  Examples  Conclusion

14  Achieve Visualization without actually programming graphics  Flexible and easy to adjust the visualization schema  Highly reusable visualization layer

15  Achieve Visualization Without Programming  Use an approach called Binding ◦ Treat visualizations as components ◦ No visualization Code in program ◦ Bind visualization at runtime ◦ Binding Defined Through XML

16 Achieve Visualization without actually programming graphics  Flexible and easy to adjust the visualization schema  Highly reusable visualization layer

17  No hard coded visualization layer  Define Visualization Through XML ◦ No source code modification required ◦ Doesn’t need recompilation ◦ Easy to check the visualization definition

18 Achieve Visualization without actually programming graphics Flexible and easy to adjust the visualization schema  Highly reusable visualization layer

19  Reuse visualization across programs  Reusable Visual Component ◦ Integrated through XML binding ◦ No data structure dependency ◦ Reusable through changing the binding

20 Achieve Visualization without actually programming graphics Flexible and easy to adjust the visualization schema Highly reusable visualization code

21  Aggregation of Visualization Code ◦ Interacts with Graphics Engine ◦ Not tied to any application ◦ Reusable across applications ◦ Ready to use component developed by third party

22  What is the basis for binding? ◦ Object Oriented Programming Language ◦ One visual component per class Each class can bind to one visual component. During the execution of the program, this class will be visualized by the visual component. ◦ One visualized entity per object instance Whenever a new instance of the class is created, an instance of the visual component which is tied to the program instance is created and rendered on the screen.

23  Introduction  Assisting Visualization System  Implementation Overview Program Loader Code Execution Monitor Rendering System Binding Definition Format  Examples  Conclusion

24  Implementation Language: Java ◦ Cross Platform ◦ Applets run in browser on Internet ◦ Low development cost  Third party graphics engine: Jmonkey Engine ◦ Written in Java ◦ Using OpenGL for rendering ◦ Open source project ◦ Used in many commercial software

25  Major Components ◦ Program Loader Loads and modifies the target java program to integrate it with the visualization framework. ◦ Code Execution Monitor  Monitors the execution of the target program and realizes the visualization binding. ◦ Rendering System  Manages the life cycle of visual component instances that tie with underlying target program.  Renders the visual components using Jmonkey Graphics Engine.

26  Customized Java Class Loader ◦ Loads class binary from file into memory for Java virtual machine  Code injection at load time ◦ Inject binary code at runtime before the class is used by Java virtual machine  Interact with Code Execution Monitor ◦ Register target class information and call handler function inside execution monitor

27  Monitors the target program execution ◦ New instance creation Call Render System to create visual component instance and tie to the underlying object ◦ Object garbage collection Remove the object entry from the monitor ◦ Object value changed Update the binding property in its tied visual component correspondingly

28  Visual Component Management ◦ Load visual component Search for visual component java class file for the visual component ◦ Create, remove visual component Manage the visual component based on outside system call ◦ Render visual components Use Graphics Engine to finally render the visual component

29 Jmonkey Graphics Engine  Functions ◦ Create User Interface Create visualization window in which all visual components are rendered ◦ Model Loading Load 3D models from files on disk and store in memory as an object ◦ Scene graph Management Object oriented way of accessing the 3D objects in the rendered environment

30  Graphics Engine: Jmonkey Engine ◦ Rendering Output

31  Graphics Engine: Jmonkey Engine ◦ Rendering Output

32  XML Format ◦ Simplicity, easily accessible to developers ◦ Open format, many tools available  Binding XML Schema ◦ Define the format of binding xml ◦ Document for people writing the binding XML ◦ Automated parsing inside visualization system

33  XML Parsing ◦ Apache XMLBeans library Open source XML parsing library under Apache foundation. ◦ Automatic java parsing code generation base on Schema File Generate source code for parser based on the schema file. Visit the content of the XML file using an object oriented approach.

34  Introduction  Binding Approach  Assisting Visualization System  Implementation  Examples  QuickSort  Growing Tree  Conclusion

35  Visualization of QuickSort on 80 elements

36  Visual Component Binding with Java Program ◦ Java Class: SortElement ◦ Visual Component: BarVO ◦ Bindings  1 ClassBind  3 PropertyBind

37  Visual Component Binding with Java Program ◦ ClassBind – Bind SortElement with BarVO ◦ Binding XML 

38  Visual Component Binding with Java Program ◦ PropertyBind – SortElement.value to BarVO.scaleY  Binding XML 

39  Visual Component Binding with Java Program ◦ PropertyBind – SortElement.index to BarVO.x ◦ Binding XML 

40  Visual Component Binding with Java Program ◦ PropertyBind – to BarVO.z ◦ Binding XML   float offset=0.0f;  if(pivot) offset=100f;  else offset=0f; 

41  Visual Component Binding with Java Program ◦ Resulting Visualization:

42  Changing the Visualization for QuickSort ◦ Use color instead of height to represent value of SortElement ◦ Binding XML  Before   After 

43  Changing the Visualization for QuickSort ◦ Resulting Visualization:

44  Changing the Visualization for QuickSort ◦ Display index of SortElement on a curve ◦ Binding XML  Before   After   <Field name="Math.cos(-((float)index/(float)maxIndex*Math.PI-  Math.PI/2f)*0.5f)" />   <Field name="Math.sin(-((float)index/(float)maxIndex*Math.PI-  Math.PI/2f)*0.5f)" /> 

45  Changing the Visualization for QuickSort ◦ Resulting Visualization:

46  Visualization of a growing Tree ◦ Growing Tree with branch factor 3

47  Visualizatoin for trajectory simulation ◦ Simulation of the movment of 80 elements with gravity influence on each other

48  Introduction  Binding Approach  Assisting Visualization System  Implementation  Examples  Conclusion

49  Introduced visualization through binding approach.  Implemented Assisting Visualization System ◦ Decoupled from underlying program ◦ Flexible to change visualization schema ◦ Reusable visual component  Created a prototype system that can be adopted in languages other than Java.


Download ppt "Zhonghua Qu and Ovidiu Daescu December 24, 2009 University of Texas at Dallas."

Similar presentations


Ads by Google