An R- -library for 3D visualization library for 3D visualization An R with OpenGL with OpenGL Oleg Nenadi � , Daniel Adler, Walter Zucchini Institute for Statistics and Econometrics, University of Goettingen, Germany
RGL: An R-library for 3D visualization with OpenGL Outline: Introduction: Motivation and goals The RGL-package: An overview Examples from applied statistics Summary, conclusions and outlook
I - Introduction: Motivation and goals Motivation behind the RGL-project: Example: persp() modified output from demo(persp) : issues: - slow, inconvenient navigation - adding / removing other objects not feasable - missing "features" ...
I - Introduction: Motivation and goals Goals of the RGL-project: RGL is an interface from R to OpenGL which acts as an "3D engine". allows one to navigate through the 3D scenery is portable across different platforms (Win32 and X11) is semantically similar to familiar R commands Murdoch, D. (2001), RGL: An R Interface to OpenGL, DSC 2001 , Vienna. details:
II - The RGL-package: An overview RGL comprises 20 functions from 6 categories: - Device management functions - Scene management functions - Export functions - Shape functions - Environment functions - Appearance functions
II - The RGL-package: An overview RGL: Shape functions The "basic building blocks": b b c a a Points Lines Triangles rgl.points(x,y,z,...) rgl.lines(x,y,z,...) rgl.triangles(x,y,z,...) b c a d Quads Spheres Surfaces rgl.quads(x,y,z,...) rgl.spheres(x,y,z,r,...) rgl.surface(x,y,z,...)
II - The RGL-package: An overview RGL: Appearance features Modifying the appearance of primitives: a b + d c a c b Lighting features Alpha blending Texture mapping Fog effect Internal smoothing Side - dependant rendering
II - The RGL-package: An overview RGL: Navigation system Navigation through 3D space via a pointing device: Navigation: left button a b Zooming: right button
III - Examples from applied statistics Examples from applied statistics: • 3D histograms • Displaying bivariate densities • Visualizing simulated animal populations • An example from hydrology
III - Examples from applied statistics 3D histograms: Construction of "complex" objects from primitives: 6 quads new "primitive" 3D histogram bin3d RGL provides the basic building blocks, which can be flexibly used for constructing higher-level objects
III - Examples from applied statistics Visualizing bivariate densities: E.g. comparing fit of a bivariate normal density and a kernel estimate: Observations (simulated) are displayed as spheres A kernel estimate of the density is shown as a transparent red surface The fitted bivariate normal distribution is plotted as a wireframe
III - Examples from applied statistics Displaying simulated animal populations: Using appearance features for representing characteristics of groups: Characteristics of groups: size type exposure Population density is displayed in topographic terms Borchers, D.L., Buckland, S.T. and Zucchini, W. (2002), Estimating Animal details: Abundance: closed populations . Springer-Verlag, London.
III - Examples from applied statistics An example from hydrology: E.g. displaying mean annual rainfall in form of clouds: Nenadi � , O.; Kratz, G. and Zucchini, W. (2002), The Development of a Web-based details: Rainfall Atlas for Southern Africa, Short Communication, Compstat2002 , Berlin.
IV - Summary, conclusions and outlook RGL contains the basic building blocks for 3D graphics provides a variety of appearance features offers navigation capabilities is portable across platforms Further work focuses on enhancing portability (and fixing bugs) enabling VRML/X3D support adding further primitives (meshes etc.) Preliminary RGL-site: http://134.76.173.220/~dadler/rgl
Recommend
More recommend