Aug 13, 2014 - course materials (chat rooms, bulletin boards, CDs, laptops, PowerPoint slides, videos, etc.) ... CREATION CAS TOOL FOR MATHEMATICS COURSES. 570 .... All programming for Sage Grapher is done entirely in the Python ...
D
US-China Education Review A, ISSN 2161-623X August 2014, Vol. 4, No. 8, 569-580
DAVID
PUBLISHING
A Mobile, Open-Source 2D and 3D Printing Graphic Creation CAS Tool for Mathematics Courses Victoria Lang, Sang-Gu Lee, Jaeyoon Lee Sungkyunkwan University, Suwon, South Korea While the usage of powerful mathematics software packages plays a key role in calculus, linear algebra, and higher level mathematics courses, shortcomings in these softwares exist, namely, issues of price and portability. A free online function and calculus concept grapher has been developed using Sage, a mathematics software based primarily on the Python computing language, that students may access and utilize online without the need to purchase or install supplementary (and often times expensive) programs. This Sage Grapher (Available at http://matrix.skku.ac.kr/grapher-html/sage-grapher.html and http://matrix.skku.ac.kr/3d-print-e) is optimized for mobile environments and is completely an open source. Graphs can be manipulated and students can save their work directly on the server, their personal computers, or their mobile devices to utilize them at their convenience. The abilities of this novel math tool will be demonstrated. As well, these graphers have a stereolithography (STL) file printing capability that students may use for three-dimensional (3D) printing purposes within or outside of the classroom. Application of these graphers and printed files can serve as an effective (and mobile) method of concept visualization for all students of mathematics, regardless of age or level. Keywords: graphing calculator, mathematics, mobile, Sage, visualization, two-dimensional (2D), three-dimensional (3D), technology
Introduction The role of calculus students as merely passive attendants of lectures has proven to be not only tedious but ineffective. Technological developments in education have made such a one-sided procedure obsolete; students are now encouraged to take charge of their learning process through more technological means. Mathematics instructors have realized this and now strive to provide classroom content viewable online before or after classtime. Within Korean university math courses, recent efforts have been made to provide Internet resources (e.g., recorded lectures with sound and video clips and references for calculus and linear algebra1) to students of college mathematics (Lee & Ham, 2005). Previous studies have shown that such resources, including recordings of missed lectures and reviewing lectures for test preparation, may greatly benefit students in the classroom (Odhabi & Nicks-McCaleb, 2011). Technological tools, such as online e-books, outlines, other course materials (chat rooms, bulletin boards, CDs, laptops, PowerPoint slides, videos, etc.), and other instructional technologies, have been expected to increase student engagement, motivation, and overall learning
1
Victoria Lang, B.Sc., M.Sc. candidate, Department of Mathematics, Sungkyunkwan University. Sang-Gu Lee, Ph.D., professor, Department of Mathematics, Sungkyunkwan University. Jaeyoon Lee, B.Sc., M.Sc. candidate, Department of Mathematics, Sungkyunkwan University. For more information, please visit http://matrix.skku.ac.kr/2012-album/2012-LA-Lectures.htm.
CREATION CAS TOOL FOR MATHEMATICS COURSES
570
(Clarke, Flaherty, & Mottner, 2001; McCabe & Meuter, 2011; Young, Klemz, & Murphy, 2003). Additionally, the use of technology combined with oral presentations allows students to improve communication abilities and develop other necessary career-based skills (Tugrul, 2012). While computer algebra system (CAS) tools, such as Maple, Mathematica, and MATLAB, have long played a central role in facilitating mathematics learning, very few have been developed specifically for the mobile environment. However, with the emerging popularity of smartphones and portable tablets over more powerful computing devices (Aguilar, 2012), exploring the mobile possibilities of CAS tools seemed only natural. In 2009, our team at Sungkyunkwan University in South Korea began to develop CAS tools, create lecture clips, and adapt mathematics lectures and notes within a mobile framework. Visualizations of mathematical concepts, once dependent on expensive, hefty software, are now readily available on the Internet along with a rich supply of other calculus, linear algebra, and mathematics resources, all without the need to download additional programs (Sun, Kim, & Lee, 2013). A recent educational movement receiving widespread attention is that of the flipped classroom, in which the introduction of a topic via lectures or reading assignments is done at home, and class time is reserved for collaborative work and more advanced concept mastery exercises (“The flipped classroom”). This allows students to familiarize themselves with a new topic independently and work towards mastery at their own pace (Rosenberg, 2013). The process originally started with the uploading of recorded live lectures onto the Internet by American teachers Johnathan Bergman and Aaron Sams, and at Sungkyunkwan University, the uploading process continues in earnest2. Despite its status as a relatively new trend in education, the effectiveness of the flipped classroom using mobile study aids (such as e-books, lecture clips, and interactive models) on a mobile platform is already well-documented. In 2012, math teachers in Houston, Texas, used tablet private computers to create a flipped classroom for their 8th grade Algebra 1 students and saw significant increases in math test scores, namely, “students who rated either proficient or advanced (the ‘passing’ rate) were 49% higher in the ‘flipped classrooms’ with (tablets)” (Dalrymple, 2012). These results are illustrated in Figure 1.
Figure 1. Mathematics assessment score increases from mobile-based learning (Retrieved from http://www.loopinsight. com/2012/08/13/ipads-in-the-classroom-raise-math-scores-49/).
2
For more information, please visit http://matrix.skku.ac.kr/OCW-MT/index.htm.
CREATION CAS TOOL FOR MATHEMATICS COURSES
571
Tools tailored for mobile, independent usage by students outside of the classroom, such as the Sage Grapher, our online interactive function grapher, are suited perfectly for the “flipped classroom” and can further a student’s independent quest towards comprehension. To aid in the teaching of more difficult concepts, instructors are not only offering three-dimensional (3D) graphing tools and animations, but also are actively developing 3D printing resources for students of mathematics and engineering. The price of 3D printers for commercial, personal, and academic use is becoming more affordable as the technology becomes widespread, and teachers can easily utilize this tool in their lessons (Bloomfield, 2013). SeemMeCNC, a 3D printing hardware company, offers a complete educational package for classrooms that includes a printer, filament spools, extensive customer support service, and a preassembled curriculum “for teaching everything from the basics … up to producing projects for the students to build their hands-on skills” (Johnson, 2014). Within science and mathematics courses, 3D printing for educational usage promotes thinking, reasoning, and understanding of the subject (UK Department of Education, 2013). As a CAS tool, Sage and the accompanying mobile Sage Grapher (Available at http://matrix.skku.ac.kr/3d-print-e), easily lend themselves to 3D printing purposes: Users can access, manipulate, or create two-dimensional (2D) or 3D renderings of functions through on their smartphones or other mobile devices. Then, as a final step in the visualization procedure, these graphs can actually be printed and, hence, physically manipulated and viewed by the interested students. Thus, one can, using the Sage Grapher, mathematically illustrate and graph a function and the said function can be corporeally realized. The possibilities this Sage Grapher and 3D printing tool offer present an innovative classroom environment in which mastery can be reached through technological and mobile influences.
Power, Portability, and Printing Graphs, acting as real-world visualizations of functions or mathematical concepts, are a cornerstone in any fundamental mathematics education and are used in calculus and higher level courses to clarify or expand upon topics introduced. However, without downloading hefty software, students of calculus previously could not easily interact with own graphs to their liking. The Sage Grapher is developed specifically for the mobile environment and, hence, portability of usage is its strongest appeal: One can view graphs of various types of functions or essential concepts of calculus from any location at any time inside or outside of the classroom. All programming for Sage Grapher is done entirely in the Python computing language, so students do not need to learn an entirely new programming language that is restricted to one program. Numerous Sage references are available online with relevant examples and applications3. Therefore, students wishing to manipulate the source code directly need only a sufficient mathematical background to do so. In Korea, university students have at least been introduced to computer programming languages during high school and would be able to read Sage code with ease. After viewing examples online, Sage is straightforward enough for even a novice of programming to grasp immediately and began to alter for his/her own purposes. As well, users can simply change coefficients of provided function and view animations of certain graphs as coefficients vary without the need to learn Sage code at all. Sage Grapher puts mobile mathematical images (quite literally) at the fingertips of the students. By uploading relevant content and connecting the Sage Grapher to material presented during lectures, the gap 3
For more information, please visit http://www.sagemath.org/doc/tutorial/.
CREATION CAS TOOL FOR MATHEMATICS COURSES
572
between topics introduced in class and the availability of the same material outside of class is lessened; students can feel truly connected to their mathematics education anytime, anywhere. Additionally, students can render 2D representations into 3D shapes by means of 3D printing. There are a number of graphing tools available within the Sage Grapher: graphers for general, parametric, and implicit functions, as well as graphical illustrations of Newton’s method, derivatives, and other vital areas within calculus. Figure 2 shows a screenshot of Sage Grapher.
Figure 2. Screenshot of Sage Grapher (Retrieved from http://matrix.skku.ac.kr/Mobile-Sage-G/sage-grapher.html).
Simple 3D Visualizations of Quadric Surfaces While the computational capabilities of the Sage Grapher are varied and all are practical for use in a classroom setting, in this paper, we will focus on our “Quadric Surface” tool, our “Interesting Graphs” section, and connection to art and 3D printing that Sage provides. For a more comprehensive look at the abilities of Sage Grapher, readers are encouraged to consult “A Graphing Tool for Mobile Learning: Sage Grapher” (Sun et al., 2013). The graphical representation of conics sections is often the first step in a student’s visualization of more complex mathematical objects. In calculus and linear algebra, a quadric surface is any D-dimensional hypersurface in (D + 1)-dimensional space; it can be defined as the locus of zeros of a quadratic polynomial. Generally, for coordinates: , ,…, A quadric surface can be defined in vector and matrix form by: 0 Here, x = x1, x2, ..., xD + 1 is a row vector; x is the transpose of x (a column vector), Q is a (D + 1) × (D + 1) matrix, P is a (D + 1)-dimensional row vector, and R is a scalar constant. We have developed a tool for students to easily see and generate quadric surfaces at http://matrix.skku.ac.kr/3d-print/htmls/LT.html. Using the quadratic form for an implicit object, users generate a matrix of coefficients (see Figure 3). By simply changing the variables shown in Figure 3, users can produce a variety of conic sections using the same process without the need for extensive programming (see Figure 4). T
CREATION CAS TOOL FOR MATHEMATICS COURSES
573
Figure 3. Implemented quadratic form (Retrieved from http://matrix.skku.ac.kr/2014-Album/ Quadratic-form/ index.htm).
Figure 4. Two conics sections and their corresponding matrices of coefficients.
Students, thus, gain a spatial appreciation for the coefficients within the matrix and how altering each individual coefficient changes the shape of a conic section (see Table 1).
CREATION CAS TOOL FOR MATHEMATICS COURSES
574
Table 1 The Open-Source Sage Code for Generating the Matrix of Coefficients var('x,y,z') @interact def _(Q=matrix(QQ,[[1/9,0,0],[0,1/4,0],[0,0,1]]), P=matrix(1,3,[0,0,0]), R=-1, auto_update=False): a1=matrix(1,3,[x,y,z]) q=a1*Q*(transpose(a1))+P*(transpose(a1))+R a=implicit_plot3d(q[0][0]==0, (x,-3, 3), (y,-3, 3), (z,-3, 3), smooth=true ) show (q[0][0]==0) show (a) Note. Source: Retrieved from http://www.loopinsight.com/2012/08/13/ipads-in-the-classroom-raise-math-scores-49/.
Art and Math: The Next Step of the Visualization Process To appreciate a graphically-orientated subject, such as mathematics, the ability to see representations of shapes or objects one can find in nature (e.g., a flower, a butterfly, a shell, etc.) furthers the idea of mathematics as the language of science and of reality. Firstly, students can begin the visualization process through the Parametric Function Grapher of Sage Grapher. By using the scroll bars provided on the site, users can see the effect changing coefficients has on a well-known graph, such as a parametrically determined heart in Figure 5.
Figure 5. Animations of changing coefficients (pictured here for different values of b) offer users a more thorough understanding of the “shape” of a function.
For more visually stimulating examples, users can access polar, parametric, and implicit functions from the “Interesting Graphs” section of Sage Grapher. A screenshot of the Website (http://matrix.skku.ac.kr/Mobile -Sage-G/sage-grapher-butterfly.html) (current as of March 19th, 2014) is provided in Figure 6. These graphs are of particular note due to their real world analogues; specifically, they are reminiscent of shapes found in nature. For instance, considering the following graph of the involute of a circle and its actual correspondent, the serpenticone shell of a fossilized cephalopod is shown in Figure 7. More intellectually motivating graphs are provided in Figures 8 and 9; while these examples are merely just “interesting” cases of general, polar, or parametric equations, they connect the user to images present in the world. Students do not feel disconnected from the material presented in mathematics class due to the ease of mobile use and the relevancy of the information to real world applications, objects, and scenarios. All of these graphs, as with the general function grapher, can be manipulated (in terms of coefficients) and saved directly by the user.
CREATION CAS TOOL FOR MATHEMATICS COURSES
Figure 6. Interesting graphs, adapted for mobile devices.
Figure 7. An involute of a circle and a serpenticone shell (Retrieved from http://www.loopinsight.com/ 2012/08/13/ipads-in-the-classroom-raise-math-scores-49/).
575
CREATION CAS TOOL FOR MATHEMATICS COURSES
576
Figure 8. A butterfly polar graph (Retrieved from http://www.fotopedia.com/items/flickr-3836891925).
Figure 9. A pinwheel (parametric) graph (Retrieved from http://tinyurl.com/kqylseu).
Stereolithography (STL) File Creation of 3D Figures Using Sage Within the Sage Grapher tool, 3D objects can be generated and viewed easily. As well, after viewing said graphs, students can create 3D printing files for usage with STL machines, specifically, in the format of STL files. STL machines employ a 3D printing method where thin sheets of a curable material (usually plastic) are melted and reformed layer by layer into a desired shape (Palermo, 2013). STL files analyze a 3D object as a “logical series of triangles … uniquely defined by (their) normals and three points representing (their) vertices” (Palermo, 2013) and translate the object into a listing of all Cartesian coordinates that describe these normals and vertices (“STL”). The code for this process has been developed in Sage. From Sage, users can acquire STL file renderings for mathematical shapes just as easily as they can view, alter, and manipulate them within the grapher. We can give body to various 3D shapes using the code provided in Table 2. First, the necessary algorithm for converting an object into a comprehensive listing of triangles is shown in Table 2.
CREATION CAS TOOL FOR MATHEMATICS COURSES
577
Table 2 Sage Code for Generating a STL File def surface_to_stl(surface): # stl exporting code out = "solid mathsurface\n" for i in surface.face_list(): n = (i[1][1]*i[2][2]-i[2][1]*i[1][2], i[1][2]*i[2][0]-i[1][0]*i[2][2], i[1][0]*i[2][1]-i[2][0]*i[1][1]) abs = (n[0]^2+n[1]^2+n[2]^2)^0.5 n= (n[0]/abs,n[1]/abs,n[2]/abs) out += " facet normal " + repr(n[0]) + " " + repr(n[1]) + " " + repr(n[2]) out += " outer loop\n" out += " vertex " + repr(i[0][0]) + " " + repr(i[0][1]) + " " + repr(i[0][2]) + "\n" out += " vertex " + repr(i[1][0]) + " " + repr(i[1][1]) + " " + repr(i[1][2]) + "\n" out += " vertex " + repr(i[2][0]) + " " + repr(i[2][1]) + " " + repr(i[2][2]) + "\n" out += " endloop\n" out += " endfacet\n" out += "endsolid mathsurface\n" return out
Then, after an object has been viewed in either a mobile- or Web- based browser, the accompanying STL file is generated at the bottom of the page (see Table 3). Table 3 Sage Code for Saving a STL File f=open("Quadric_Surface.stl",'w') # Creation of an empty STL file f.write(surface_to_stl(a)) # Inputs/Enters information of the 3-D object into the STL file f.close() # Closes the algorithm
This file can be saved directly and opened in any standard STL file viewing or editing software. A full example of a parametric graph (specifically, an egg carton) that was programmed in Sage, 3D generated graphically, and finally, 3D printed shape is given in Figure10.
Figure 10. The full visual creation process of a parametric “egg carton” (Retrieved from http://matrix.skku.ac.kr/ 3d-print/htmls/Egg_carton.html).
CREATION CAS TOOL FOR MATHEMATICS COURSES
578
Thus, a rich plethora of mathematical shapes, both implicit and parametric, can be perceived, produced, and printed for calculus and linear algebra classes—all from the same tool (see Figures 11 & 12).
Figure 11. Various 3D graphs generated from Sage.
Figure 12. 3D printed objects, also generated from the Sage code.
CREATION CAS TOOL FOR MATHEMATICS COURSES
579
Conclusions In this paper, we introduced the free, convenient, and tremendously portable CAS tool, Sage Grapher, as an alternative to expensive graphing software for viewing graphs of functions and shapes readily seen in mathematics textbooks. As well, the natural connection of this application to the visualization and 3D printing of well-known mathematical graphs was explored. Real world analogues of graphs were offered to further the scope of such a tool and illustrate its conceptual applications that are, indeed, not limited to a just computer or mobile framework. Finally, the code for generating STL files from Sage graphs for usage in 3D printing softwares was provided as the final and ultimate tangible realization of these graphs. The days of pure memorization from a mathematics textbook with no mobile connection to concrete examples are long over. With the advent of more flexible course settings, such as a “flipped” classroom, where initial introduction of a mathematical concept is done at home and involved projects are done in class, students of mathematics (and all disciplines) need resources available to them at their convenience. Sage Grapher effortlessly adapts itself to whatever setting (e.g., mobile- or Web- based, classroom or personal use, etc.) it is viewed and utilized within. In this way, mathematical independence is stressed two-fold, that is, students must be independent in their personal quests for mathematics education and must realize that the subject itself is not independent to whatever medium it is presented in. Mathematics, as the foundation of science and reality, is an all-encompassing network that formulates the world around us. Any tools which emphasize the ubiquity of mathematics and the importance of mathematics education provide the best resources for students’ comprehension. By seeing a mobile representation of a graph presented in class, viewing the equivalent object in reality, and generating 3D printed shapes from Sage Grapher, students of mathematics are no longer confined to textbooks and rows of lackluster equations and are limited in creation only by the scope of their imagination.
References Aguilar, M. (2012, February 3). The world now buys more smartphones than computers. Retrieved May 23, 2014, from http://gizmodo.com/5882172/the-world-now-buys-more-smartphones-than-computers Bastech, Inc.. (n.d.). What is a STL file? Retrieved March 1, 2014, from http://bastech.com/sla/techtips/STLfiles.asp Bloomfield, A. (2013, May 10). How much does a 3-D printer cost? Still expensive, but becoming more affordable. Retrieved January 13, 2014, from http://www.policymic.com/articles/41111/how-much-does-a-3d-printer-cost- still-expensive-butbecoming-more-affordable Clarke, I., Flaherty, T. B., & Mottner, S. (2001). Student perceptions of educational technology tools. Journal of Marketing Education, 23(3), 169-177. Dalrymple, J. (2012, August 13). IPads in the classroom raise math scores 49%. Retrieved May 25, 2014, from http://www.loop insight.com/2012/08/13/ipads-in-the-classroom-raise-math-scores-49/ Johnson, J. (2014, March 12). The curriculum you desire to get started 3d printing in your classroom. Retrieved May 24, 2014, from https://docs.google.com/document/d/1fzFSsgQon7SlSW358gD3rN3KAvU8UWvK5tZ8eNzuepg/edit?pli=1# Knewton Company. (n.d.). The flipped classroom: Turning the traditional classroom on its head. Retrieved January 11, 2014, from http://www.knewton.com/flipped-classroom Lee, S. G., & Ham, Y. (2005). New learning environment of linear algebra in Korea. Journal of the Korean Society of Mathematics Education Series D: Research in Mathematical Education, 9(1), 57-66. McCab, D. B., & Meuter, M. L. (2011). A student view of technology in the classroom: Does it enhance the seven principles of good practice in undergraduate education? Journal of Marketing Education, 33(2), 149-159. Odhabi, H., & Nicks-McCaleb, L. (2011). Video recording lectures: Student and professor perspectives. British Journal of Educational Technology, 42(2), 327-336.
CREATION CAS TOOL FOR MATHEMATICS COURSES
580
Palermo, E. (2013, July 16). What is stereolithography? Retrieved February 28, 2014, from http://www.livescience.com/38190stereolithography.html Rosenberg, T. (2013, October 23). In “Flipped” classrooms, a method for mastery. Retrieved December 28, 2013, from http://opinionator.blogs.nytimes.com/2013/10/23/in-flipped-classrooms-a-method-for mastery/?_r=0 Sun, S. W., Kim, K. W., & Lee, S. G. (2013). Modeling of mobile sage and graphing calculator. Journal of Modern Education Review, 3(12), 243-250. Tugrul, T. (2012). Student perceptions of an educational technology tool: Video recordings of project presentations. Procedia-Social and Behavioral Sciences, 64, 133-140. UK Department of Education. (2013). 3D printers in schools: Uses in the curriculum (enriching the teaching of stem and design subjects) (DFE-00219-2013). Retrieved January 13, 2014, from https://www.gov.uk/government/uploads/system/uploads/ attachment_data/file/251439/3D_printers_in_schools.pdf Young, M. R., Klemz, B. R., & Murphy, J. W. (2003). Enhancing learning outcomes: The effects of instructional technology, learning styles, instructional methods, and student behaviour. Journal of Marketing Education, 25(2), 130-142.