{"id":2938,"date":"2011-11-04T12:53:32","date_gmt":"2011-11-04T12:53:32","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/2011\/11\/04\/happy-belated-halloween\/"},"modified":"2011-11-04T12:53:32","modified_gmt":"2011-11-04T12:53:32","slug":"happy-belated-halloween","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2011\/11\/04\/happy-belated-halloween\/","title":{"rendered":"Happy (belated) Halloween!"},"content":{"rendered":"<div xmlns:mwsh=\"https:\/\/www.mathworks.com\/namespace\/mcode\/v1\/syntaxhighlight.dtd\" class=\"content\">\r\n   <p><a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/31739\">Michael<\/a>'s pick this week is <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/33124-batman-equation--the-legend\">Batman Equation: The Legend<\/a> by <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/111235\">Mingjing Zhang<\/a>.\r\n   <\/p>\r\n   <p>This posting comes a bit too late for a proper Halloween celebration, but I'm not one to let that get in the way of a fun\r\n      little file exchange submission.  Plain and simple, it's Batman's logo in MATLAB form!\r\n   <\/p>\r\n   <p>In late July of 2011, an odd little equation started to appear on <a href=\"http:\/\/www.reddit.com\/r\/pics\/comments\/j2qjc\/do_you_like_batman_do_you_like_math_my_math\/\">the internet<\/a>.  With clever use of terms in the form <img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/michael\/potw_batman\/potw_batman_eq10481.png\"> , its creator was able to construct an effectively piecewise outline using a single implicit equation.\r\n   <\/p>\r\n   <p>Mingjing provides a useful implementation of this equation.  To overcome the fact that implicit equations can be tricky to\r\n      plot using a computer, he breaks it down into its six constituent parts.  Different visualizations allow you to see the pieces\r\n      separately or to visualize the final product in all its glory:\r\n   <\/p><pre style=\"background: #F9F7F3; padding: 10px; border: 1px solid rgb(200,200,200)\">plotbatmaneq<\/pre><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/michael\/potw_batman\/potw_batman_01.png\"> <p>Mingjing seems to enjoy using MATLAB as more than a numerical analysis tool-- I'm planning to soon download and play his <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/31449-stellaria--tech-demo--the-best-matlab-shooting-game-ever\">Stellaria<\/a>, humbly dubbed \"the best MATLAB shooting game ever\"!\r\n   <\/p>\r\n   <p>Let us know what you think <a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=2938#respond\">here<\/a>.\r\n   <\/p><script language=\"JavaScript\">\r\n<!--\r\n\r\n    function grabCode_58cd1c44e0024119bd2afa92a435f8a9() {\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='58cd1c44e0024119bd2afa92a435f8a9 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 58cd1c44e0024119bd2afa92a435f8a9';\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 = 'Michael Weidman';\r\n        copyright = 'Copyright 2011 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_58cd1c44e0024119bd2afa92a435f8a9()\"><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.13<br><\/p>\r\n<\/div>\r\n<!--\r\n58cd1c44e0024119bd2afa92a435f8a9 ##### SOURCE BEGIN #####\r\n%%\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/31739 Michael>'s pick\r\n% this week is\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/33124-batman-equation--the-legend\r\n% Batman Equation: The Legend> by\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/111235\r\n% Mingjing Zhang>.\r\n%\r\n% This posting comes a bit too late for a proper Halloween celebration, but\r\n% I'm not one to let that get in the way of a fun little file exchange\r\n% submission.  Plain and simple, it's Batman's logo in MATLAB form!\r\n%\r\n% In late July of 2011, an odd little equation started to appear on\r\n% <http:\/\/www.reddit.com\/r\/pics\/comments\/j2qjc\/do_you_like_batman_do_you_like_math_my_math\/\r\n% the internet>.  With clever use of terms in the form\r\n% $\\sqrt{|x|\/x}$, its creator was able to construct an\r\n% effectively piecewise outline using a single implicit equation.\r\n%\r\n% Mingjing provides a useful implementation of this equation.  To overcome\r\n% the fact that implicit equations can be tricky to plot using a computer,\r\n% he breaks it down into its six constituent parts.  Different\r\n% visualizations allow you to see the pieces separately or to visualize the\r\n% final product in all its glory:\r\n\r\nplotbatmaneq\r\n\r\n%%\r\n% Mingjing seems to enjoy using MATLAB as more than a numerical analysis\r\n% toolREPLACE_WITH_DASH_DASH I'm planning to soon download and play his\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/31449-stellaria--tech-demo--the-best-matlab-shooting-game-ever\r\n% Stellaria>, humbly dubbed \"the best MATLAB shooting game ever\"!\r\n%\r\n% Let us know what you think\r\n% <https:\/\/blogs.mathworks.com\/pick\/?p=2938#respond here>.\r\n##### SOURCE END ##### 58cd1c44e0024119bd2afa92a435f8a9\r\n-->","protected":false},"excerpt":{"rendered":"<p>\r\n   Michael's pick this week is Batman Equation: The Legend by Mingjing Zhang.\r\n   \r\n   This posting comes a bit too late for a proper Halloween celebration, but I'm not one to let that get in the... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2011\/11\/04\/happy-belated-halloween\/\">read more >><\/a><\/p>","protected":false},"author":36,"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\/2938"}],"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\/36"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=2938"}],"version-history":[{"count":0,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2938\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=2938"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=2938"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=2938"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}