{"id":2407,"date":"2009-03-20T13:25:58","date_gmt":"2009-03-20T13:25:58","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/2009\/03\/20\/camera-manipulation\/"},"modified":"2009-03-20T13:25:58","modified_gmt":"2009-03-20T13:25:58","slug":"camera-manipulation","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2009\/03\/20\/camera-manipulation\/","title":{"rendered":"Camera Manipulation"},"content":{"rendered":"<div xmlns:mwsh=\"https:\/\/www.mathworks.com\/namespace\/mcode\/v1\/syntaxhighlight.dtd\" class=\"content\">\r\n   <introduction>\r\n      <p>Need a good tutorial on how to manipulate the view of your graphics in MATLAB? Or just want to see a very cool animation of\r\n         a \"camera\" flying around over a <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2009a\/techdoc\/ref\/surf.html\">MATLAB surface plot<\/a>? <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/911\">Brett<\/a>'s pick this week provides both.\r\n      <\/p>\r\n   <\/introduction>\r\n   <p>With a pretty cool visualization, <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/30785\">Joel Feenstra<\/a> puts us in the cockpit, so to speak, with his submission on <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/21669-camera-manipulation\">\"camera manipulation.\"<\/a> Not only is this cool to look at, but Joel shows us how\r\n      to control roll, pitch, and yaw as we fly around our graphic.\r\n   <\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/..\/..\/images\/pick\/cameraflight.gif\"> <\/p>\r\n   <p>Actually, my animation doesn't compare to seeing this for yourself. Fun stuff...thanks for sharing this, Joel!<\/p>\r\n   <p><a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=2407#respond\">Comments?<\/a> We're always interested.\r\n   <\/p><script language=\"JavaScript\">\r\n<!--\r\n\r\n    function grabCode_abff7e85493141429730bb09303475d6() {\r\n        \/\/ Remember the title so we can use it in the new page\r\n        title = document.title;\r\n\r\n        \/\/ Break up these strings so that their presence\r\n        \/\/ in the Javascript doesn't mess up the search for\r\n        \/\/ the MATLAB code.\r\n        t1='abff7e85493141429730bb09303475d6 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' abff7e85493141429730bb09303475d6';\r\n    \r\n        b=document.getElementsByTagName('body')[0];\r\n        i1=b.innerHTML.indexOf(t1)+t1.length;\r\n        i2=b.innerHTML.indexOf(t2);\r\n \r\n        code_string = b.innerHTML.substring(i1, i2);\r\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\r\n\r\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \r\n        \/\/ in the XML parser.\r\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\r\n        \/\/ doesn't go ahead and substitute the less-than character. \r\n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\r\n\r\n        author = 'Robert Bemis';\r\n        copyright = 'Copyright 2009 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add author and copyright lines at the bottom if specified.\r\n        if ((author.length > 0) || (copyright.length > 0)) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (author.length > 0) {\r\n                d.writeln('% _' + author + '_');\r\n            }\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\\n');\r\n      \r\n      d.title = title + ' (MATLAB code)';\r\n      d.close();\r\n      }   \r\n      \r\n-->\r\n<\/script><p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\"><br><a href=\"javascript:grabCode_abff7e85493141429730bb09303475d6()\"><span style=\"font-size: x-small;        font-style: italic;\">Get \r\n            the MATLAB code \r\n            <noscript>(requires JavaScript)<\/noscript><\/span><\/a><br><br>\r\n      Published with MATLAB&reg; 7.8<br><\/p>\r\n<\/div>\r\n<!--\r\nabff7e85493141429730bb09303475d6 ##### SOURCE BEGIN #####\r\n%% Camera Manipulation\r\n% Need a good tutorial on how to manipulate the view of your\r\n% graphics in MATLAB? Or just want to see a very cool animation\r\n% of a \"camera\" flying around over a\r\n% <https:\/\/www.mathworks.com\/help\/releases\/R2009a\/techdoc\/ref\/surf.html MATLAB surface plot>?\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/911 Brett>'s\r\n% pick this week provides both.\r\n\r\n%%\r\n% With a pretty cool visualization,\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/30785 Joel Feenstra> puts us in the cockpit, so to speak, with  \r\n% his submission on\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/21669-camera-manipulation \"camera manipulation.\"> Not only is this cool to look at, but Joel shows us how to control roll, pitch, and yaw as we\r\n% fly around our graphic.\r\n\r\n%%\r\n% \r\n% <<..\/images\/pick\/cameraflight.gif>>\r\n% \r\n\r\n%%\r\n% Actually, my animation doesn't compare to seeing this for\r\n% yourself. Fun stuff...thanks for sharing this, Joel! \r\n%%\r\n% <https:\/\/blogs.mathworks.com\/pick\/?p=2407#respond Comments?> \r\n% We're always interested.\r\n\r\n##### SOURCE END ##### abff7e85493141429730bb09303475d6\r\n-->","protected":false},"excerpt":{"rendered":"<p>\r\n   \r\n      Need a good tutorial on how to manipulate the view of your graphics in MATLAB? Or just want to see a very cool animation of\r\n         a \"camera\" flying around over a MATLAB... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2009\/03\/20\/camera-manipulation\/\">read more >><\/a><\/p>","protected":false},"author":34,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2407"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/users\/34"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=2407"}],"version-history":[{"count":0,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2407\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=2407"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=2407"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=2407"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}