{"id":10759,"date":"2016-04-13T17:52:23","date_gmt":"2016-04-13T09:52:23","guid":{"rendered":"http:\/\/www.intmath.com\/blog\/?p=10759"},"modified":"2016-04-16T10:28:59","modified_gmt":"2016-04-16T02:28:59","slug":"ew-3d-interactive-graph","status":"publish","type":"post","link":"https:\/\/www.intmath.com\/blog\/mathematics\/ew-3d-interactive-graph-10759","title":{"rendered":"New 3D interactive graph"},"content":{"rendered":"<p>Most students struggle when trying to understand 3D cartesian coordinates, especially when diagrams in text books are static, and in 2 dimensions only (of course). <\/p>\n<p>I recently published a new 3D cartesian coordinates interactive graph:<\/p>\n<p class=\"indent\"><a href=\"\/vectors\/3d-space-interactive-applet.php\">3D Space Interactive Applet<\/a><\/p>\n<p>In the introduction to 3D graphs, I gave the example of the point <span class=\"intmath\">P (2, 3, 5)<\/span> . The 3D interactive graph allows you to explore what a point in 3 dimensions means and helps to orientate those unfamiliar with the <em>xyz<\/em>-coordinate  system.<\/p>\n<p>You can vary the <em>x<\/em>-, <em>y<\/em>- and <em>z<\/em>-coordinate of the given point and rotate the axes, as well as zoom in and out. <\/p>\n<p>This is quite a simple interactive and I hope to introduce more involved ones in the coming months.<\/p>\n<p>I developed the applet using <a href=\"http:\/\/threejs.org\/\">Three.js<\/a>, a 3D javascript library. As such, the applet is cross-platform, cross-browser and mobile friendly.<\/p>\n<h2><em>xyz<\/em> axes orientation?<\/h2>\n<p>When I first wrote the section on <a href=\"https:\/\/www.intmath.com\/vectors\/6-3-dimensional-space.php\">3D Space<\/a> in the <a href=\"https:\/\/www.intmath.com\/vectors\/vectors-intro.php\">Vectors<\/a> chapter, I wanted to ensure I chose a &quot;good&quot; orientation for the 3 axes. By &quot;good&quot;, I mean that I was using a proper convention and that it was commonly used.<\/p>\n<p>For interest, I looked at what Google Images returned for a search on <em>xyz<\/em> axes. I'm using the results of that search below. <\/p>\n<p>When I first learned 3D geometry in secondary school, we started with the familiar <em>xy<\/em>-axes and drew the new <em>z<\/em>-axis coming &quot;out of the page&quot; towards us, like this (let's call it <strong>Orientation #1<\/strong>): <\/p>\n<p><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2016\/04\/xyz-axes-x-right-y-up-z-left2.png\" alt=\"xyz axes orientation 1\" width=\"120\" height=\"138\" class=\"indent\" \/><\/p>\n<p>At times we would see the axes rotated around the <em>y<\/em>-axis, like this one (let's call it <strong>Orientation #2<\/strong>):<\/p>\n<p><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2016\/04\/xyz-axes-z-right-y-up-x-left.png\" alt=\"xyz axes orientation 2\" width=\"160\" height=\"160\" class=\"indent\" \/><\/p>\n<p>But that was OK - the <em>y<\/em>-axis was still at the top, so we didn't get lost.  <\/p>\n<p>When I met the idea again at university, the following convention was used. The <em>z<\/em>-axis was vertical, with the <em>x<\/em>-axis going to the left (and down-ish), and the <em>y<\/em>-axis going to the right (also down-ish), like this:<\/p>\n<p><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2016\/04\/xyz-axes-x-let-y-right-z-up.png\" alt=\"xyz axes orientation 3\" width=\"200\" height=\"155\" class=\"indent\" \/><\/p>\n<p>This change of orientation was quite disconcerting at first. I kept drawing points, planes and graphs  the wrong way round.<\/p>\n<p>Now I'm more used to this orientation (let's call it <strong>Orientation #3<\/strong>)  , and it seems that it's more common to have the <em>z<\/em>-axis going up.<\/p>\n<p>You'll also see it with the <em>x<\/em>- and <em>y<\/em>-axes rotate 90&deg;, like this (let's call it <strong>Orientation #4<strong>)<\/strong><\/strong>: <\/p>\n<p><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2016\/04\/xyz-axes4.png\" alt=\"xyz axes orientation 4\" width=\"150\" height=\"199\" class=\"indent\" \/> <\/p>\n<h3>Right-hand Rule<\/h3>\n<p>Each of the above orientations obeys the <strong>right hand rule<\/strong>, whereby if our right-hand index finger points in the direction of the   <em>x<\/em>-axis, and our second finger points in the direction of the <em>y<\/em>-axis, then our thumb will point to the <em>z<\/em>-index.<\/p>\n<p><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2016\/04\/right-hand-rule.jpg\" alt=\"right hand rule\" width=\"250\" height=\"212\" class=\"indent\" \/><\/p>\n<p>(Yes, you have to contort your hand around somewhat to ensure each of the above orientations work, but they do.) <\/p>\n<p>The following one (found in Google's index of such axes) fails the right-hand rule:<\/p>\n<p><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2016\/04\/xyz-axes-x-right-y-up-z-up-rightt.png\" alt=\"xyz axes orientation - fails right hand rule\" width=\"168\" height=\"174\" class=\"indent\" \/> <\/p>\n<p>(To be fair, it is possible the <em>z<\/em>-axis is coming out of the page towards us, but that's not the impression I get.) <\/p>\n<h3>Is a vertical <em>z<\/em>-axis  more common?<\/h3>\n<p>The calculus text books by <strong>Kreyszig<\/strong>, <strong>Washington, Mizrahi\/Sullivan<\/strong> and <strong>Thomas\/Finney<\/strong> all use Orientation #3, which is why I used that orientation as well.<\/p>\n<p><strong>Wolfram Alpha<\/strong>'s default 3D view is the same as Orientation #4 (where the positive <em>x<\/em>-axis is to the right and down, and the <em>y<\/em>-axis is to the right and up.) <\/p>\n<p>Here's the curve <span class=\"intmath\"><em>z<\/em> = <em>x<\/em><sup>2<\/sup> + sin(<em>y<\/em>)<\/span> by Wolfram|Alpha:  <\/p>\n<p><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2016\/04\/x2-plus-sin-y-wolfram.png\" alt=\"Graph of z = x^2 + sin y by Wolfram|Alpha\" width=\"247\" height=\"196\" \/><\/p>\n<p><strong>Geogebra<\/strong> has the same default orientation. Here's the same graph using Geogebra, which  doesn't appear to have an option for naming the axes (it does for 2D axes). <\/p>\n<p><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2016\/04\/x2-plus-sin-y-geogebra.png\" alt=\"Graph of z = x^2 + sin y by Geogebra\" width=\"227\" height=\"210\" \/><\/p>\n<p>Up next is <strong>Scientific Notebook<\/strong>, which   uses <em>x<\/em> to the right and  down, and y-axis to the left and down, with <em>z<\/em> up.<\/p>\n<p>This means it <strong>fails<\/strong> the right hand rule! At least the axes are labelled. <\/p>\n<p><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2016\/04\/x2-plus-sin-y-scientific-notebook.png\" alt=\"Graph of z = x^2 + sin y by Scientific Notebook\" width=\"255\" height=\"190\" \/><\/p>\n<p><strong>Matlab<\/strong>'s plot on first glance appears to be the same as Wolfram|Alpha's, but in fact, the positive <em>y<\/em>-axis is going off to the  left and up.<\/p>\n<p>It obeys the right hand rule, but this is not a common orientation.<\/p>\n<p><img loading=\"lazy\" src=\"\/blog\/wp-content\/images\/2016\/04\/xyz-matlab2.png\" alt=\"xyz axes orientation - Matlab\" width=\"439\" height=\"330\" \/><\/p>\n<h2>Why does it matter?<\/h2>\n<p>As I mentioned earlier, a lot of novice learners have difficulty imagining planes and other surfaces in 3D. Presenting graphs in a myriad of orientations doesn't help.<\/p>\n<h2>Suggestions for teachers <\/h2>\n<ol>\n<li>The first examples of 3D graphs that students see should use a consistent orientation, as far as possible (of course, we need to turn things around a bit to see key features, but keep such turns minimal)<\/li>\n<li>Slowly introduce other orientations, and point out clearly the features of the new orientation and why you are using it<\/li>\n<li>Always <strong>label the axes<\/strong> and insist students do so as well. If you are using one orientation, and they understand it to be another, confusion is sure to follow<\/li>\n<li>Eventually give examples of all the possible 3D axes    orientations, so students can figure out the differences. <\/li>\n<\/ol>\n<p>The link to the interactive graph again:<\/p>\n<p class=\"indent\"><a href=\"\/vectors\/3d-space-interactive-applet.php\">3D Space Interactive Applet<\/a><\/p>\n<p class=\"alt\"><a href=\"#respond\" id=\"comms\">Be the first to comment<\/a> below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>  <a href=\"https:\/\/www.intmath.com\/blog\/mathematics\/ew-3d-interactive-graph-10759\"><img loading=\"lazy\" src=\"https:\/\/www.intmath.com\/blog\/wp-content\/images\/2016\/04\/3d-space-interactive.png\" alt=\"3D interactive graph applet - background\" width=\"128\" height=\"100\" class=\"imgRt\" \/><\/a><br \/>\nI recently added a 3D interactive graph which you can use to explore the <em>x<\/em>-, <em>y<\/em>- and <em>z<\/em>-axis system.<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mo_disable_npp":""},"categories":[4],"tags":[134,127],"_links":{"self":[{"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/posts\/10759"}],"collection":[{"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/comments?post=10759"}],"version-history":[{"count":0,"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/posts\/10759\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/media?parent=10759"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/categories?post=10759"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.intmath.com\/blog\/wp-json\/wp\/v2\/tags?post=10759"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}