Visualization and Geometric Interpretation of 3D Surfaces Donya Ghafourzadeh
Total Page:16
File Type:pdf, Size:1020Kb
LiU-ITN-TEK-A-13/011-SE Visualization and Geometric Interpretation of 3D Surfaces Donya Ghafourzadeh 2013-04-30 Department of Science and Technology Institutionen för teknik och naturvetenskap Linköping University Linköpings universitet nedewS ,gnipökrroN 47 106-ES 47 ,gnipökrroN nedewS 106 47 gnipökrroN LiU-ITN-TEK-A-13/011-SE Visualization and Geometric Interpretation of 3D Surfaces Examensarbete utfört i Medieteknik vid Tekniska högskolan vid Linköpings universitet Donya Ghafourzadeh Handledare George Baravdish Examinator Sasan Gooran Norrköping 2013-04-30 Upphovsrätt Detta dokument hålls tillgängligt på Internet – eller dess framtida ersättare – under en längre tid från publiceringsdatum under förutsättning att inga extra- ordinära omständigheter uppstår. Tillgång till dokumentet innebär tillstånd för var och en att läsa, ladda ner, skriva ut enstaka kopior för enskilt bruk och att använda det oförändrat för ickekommersiell forskning och för undervisning. Överföring av upphovsrätten vid en senare tidpunkt kan inte upphäva detta tillstånd. All annan användning av dokumentet kräver upphovsmannens medgivande. För att garantera äktheten, säkerheten och tillgängligheten finns det lösningar av teknisk och administrativ art. Upphovsmannens ideella rätt innefattar rätt att bli nämnd som upphovsman i den omfattning som god sed kräver vid användning av dokumentet på ovan beskrivna sätt samt skydd mot att dokumentet ändras eller presenteras i sådan form eller i sådant sammanhang som är kränkande för upphovsmannens litterära eller konstnärliga anseende eller egenart. För ytterligare information om Linköping University Electronic Press se förlagets hemsida http://www.ep.liu.se/ Copyright The publishers will keep this document online on the Internet - or its possible replacement - for a considerable time from the date of publication barring exceptional circumstances. The online availability of the document implies a permanent permission for anyone to read, to download, to print out single copies for your own use and to use it unchanged for any non-commercial research and educational purpose. Subsequent transfers of copyright cannot revoke this permission. All other uses of the document are conditional on the consent of the copyright owner. The publisher has taken technical and administrative measures to assure authenticity, security and accessibility. According to intellectual property law the author has the right to be mentioned when his/her work is accessed as described above and to be protected against infringement. For additional information about the Linköping University Electronic Press and its procedures for publication and for assurance of document integrity, please refer to its WWW home page: http://www.ep.liu.se/ © Donya Ghafourzadeh Linköping Studies in Science and Technology Visualization and Geometric Interpretation of 3D Surfaces Donya Ghafourzadeh Department of Science and Technology Linköpings universitet, SE-581 83 Linköping, Sweden Linköping, April 2013 1 Dynamic Visualization for Multivariable Calculus Department of Science and Technology Linköpings universitet SE-581 83 Linköping Sweden 2 Abstract This thesis work presents a web-based interactive program for three-dimensional concepts of Multivariable Calculus course at Linköping University. It is focused on using computer graphics to develop geometric intuition through visualization. This thesis interactively visualizes partial derivatives and optimization concepts which are difficult to teach clearly in a traditional classroom using a two dimensional board. The program is a Netbeans project and is based on the Java programming language and OpenGL libraries, in order to run on all operating systems and obtain high quality 3D visualization results. Java OpenGL (JOGL) provides hardware supported 3D graphics and Swing is used as a Java GUI widget toolkit for designing the graphical user interface. The final results are published on the internet as Java Applet frames and Java Web Start applications to enhance the conceptual understanding of students. Therefore, this thesis promotes the strength of computer graphics and visualization tools in teaching. 3 Acknowledgments First and foremost I would like to thank my examiner, Sasan Gooran and my supervisor, George Baravdish, for their supports, valuable discussions, and granting me the opportunity to pursue this work. Further, I am extremely grateful for Olof Svensson. He gave me many constructive suggestions and made a great working environment for me during my thesis. And I am also very grateful for Paul Seeburger who provided me with valuable guidance and comments. Finally, I dedicate my work to my parents who always encouraged me to forward ahead in the race of life and excavate positive effects in my life. Norrköping, April 2013 Donya Ghafourzadeh 4 Table of contents 1 INTRODUCTION ................................................................................................................................................ 7 1.1 BACKGROUND ....................................................................................................................................................... 7 1.2 AIM AND PURPOSE ................................................................................................................................................. 8 1.3 LIMITATIONS ......................................................................................................................................................... 8 1.4 OUTLINE ................................................................................................................................................................ 8 2 LITERATURE STUDY ........................................................................................................................................ 9 2.1 THEORETICAL FOUNDATIONS OF MATHEMATICS ................................................................................................... 9 2.1.1 Derivative .......................................................................................................................................................... 9 2.1.1.1 Partial Derivatives..................................................................................................................................................... 9 2.1.1.2 Normal Vectors and Tangent Planes ....................................................................................................................... 10 2.1.1.3 Gradient Vectors ..................................................................................................................................................... 11 2.1.1.4 Directional derivatives ............................................................................................................................................ 11 2.1.2 Optimization ................................................................................................................................................... 11 2.1.2.1 Finding and Classifying Critical Points .................................................................................................................. 12 2.1.2.2 Lagrange Multiplier of two variables ...................................................................................................................... 12 2.1.2.3 Contour Plot ............................................................................................................................................................ 13 2.2 TECHNICAL FOUNDATIONS OF COMPUTER GRAPHICS.......................................................................................... 13 2.2.1 JOGL ................................................................................................................................................................ 13 2.2.2 Swing .............................................................................................................................................................. 14 2.2.3 Java Applet...................................................................................................................................................... 14 2.2.4 Java Web Start ................................................................................................................................................ 14 3 STATE OF THE ART ........................................................................................................................................ 15 3.1 MATHEMATICAL EXPRESSION PARSER ................................................................................................................ 15 3.2 USING EVENTS WITH GLCANVAS ........................................................................................................................ 16 3.3 THREE DIMENSIONAL SURFACES ......................................................................................................................... 17 3.4 PARAMETRIC SURFACES ....................................................................................................................................... 18 3.5 REALTIME MOUSE PICKING ................................................................................................................................. 18 3.6 3D PLOT ROTATION ............................................................................................................................................. 19 3.7 CREATING CONTOUR PLOTS ...............................................................................................................................