3D Graphics Module Ramesh Srigiriraju
Abstract Project Areas: 3D Graphics, Modular design Purpose: to test data schemes for 3D rotatons Four different test cases for data storage Graphing calculator program to perform tests
Abstract Scheme 1: Matrix expression trees, recalculate each time, column vectors Scheme 2: Matrix expression trees, recalculate each time, row vectors Scheme 3: Matrix expression trees, row vectors Scheme 4: Hard-coded rotation formulas
Introduction Matrices used for rotations & stretches A=[[cos(a) -sin(a)] [sin(a) cos(a)]] Matrix above rotates points by an angle a Homogeneous coordinates: (x, y, z, 1) so that translations become linear
Introduction Current programs in this area: Maple MatLab Mathematica Graphing programs built-in to calculators
Development & Construction Programs written in Java All programs run on 1.5 Ghz processor, 512 MB RAM No other processes running, except for IDE 10 million trials b/c of outliers First million trials ignored
Development & Construction Garbage collector run each iteration to avoid memory leaks Number of trials reduced to 10,000 Runtime length outputted to text files for all versions Separate program used to calculate means, modes
Development & Construction Matrix editor module used to test matrix trees Calculator module used to test binary expression trees Graphing module used to test data storage scheme
Development & Construction Z-Buffer algorithm: different schemes work for different graphs Success determined by magnitude of gradient Combination fails when |▼f|≈1
Memory Leaks Scheme 1: 2685 Scheme 2: 2513 Scheme 3: 2592 Scheme 4: 2440 Steady-state reached after ~20K trials
Garbage Collect Scheme 1: Scheme 2: Scheme 3: Scheme 4: Absence of “spike- and-plateau” pattern
Results & Conclusion 40 million data points 240 MB of data collected Z-Buffer algorithm Numeric gradients: too costly