{"id":2636,"date":"2010-12-31T01:10:27","date_gmt":"2010-12-31T01:10:27","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/2010\/12\/31\/fireworks-for-the-new-year\/"},"modified":"2011-01-17T21:18:52","modified_gmt":"2011-01-17T21:18:52","slug":"fireworks-for-the-new-year","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2010\/12\/31\/fireworks-for-the-new-year\/","title":{"rendered":"Fireworks for the New Year!"},"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\/15007\">Jiro<\/a>'s pick this week is his very own <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/29863-fireworks-gui\"><tt>Fireworks GUI<\/tt><\/a>.\r\n   <\/p>\r\n   <p>Regardless of what you are celebrating this time of the year, it seems like fireworks are a common event that many people\r\n      enjoy on New Year's Day (or New Year's Eve). If you are unable to see any in person or are tired of seeing ones on the television,\r\n      here's something for you to enjoy in the comfort of your own computer and MATLAB!\r\n   <\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/jiro\/potw_fireworks\/fireworks_movie.gif\"> <\/p>\r\n   <p>I made this using the <a href=\"https:\/\/www.mathworks.com\/help\/releases\/R2010b\/techdoc\/matlab_oop\/ug_intropage.html\">MATLAB Classes<\/a> (requires R2008a or newer), where each fireworks is an object. The fireworks object can have a number of input parameters,\r\n      such as launch location, launch speed, fireworks type, and number of petals. I also created a number of presets that perform\r\n      various combination fireworks. And finally, I created a GUI where you can interactively launch fireworks, enable demo mode,\r\n      create movies (AVI or animated GIF), and turn on sounds. Yes, it has sounds.\r\n   <\/p>\r\n   <p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/jiro\/potw_fireworks\/fireworks_screenshot.png\"> <\/p>\r\n   <p>Download it, maximize the window, turn off the lights, and enjoy!<\/p>\r\n   <p>Have a happy new year!!<\/p>\r\n   <p><b>Comments<\/b><\/p>\r\n   <p>Let me know what you think <a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=2636#respond\">here<\/a>.\r\n   <\/p><script language=\"JavaScript\">\r\n<!--\r\n\r\n    function grabCode_bdfc9910754d44fea1c8dbfa08701821() {\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='bdfc9910754d44fea1c8dbfa08701821 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' bdfc9910754d44fea1c8dbfa08701821';\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 = 'Jiro Doke';\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_bdfc9910754d44fea1c8dbfa08701821()\"><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.11<br><\/p>\r\n<\/div>\r\n<!--\r\nbdfc9910754d44fea1c8dbfa08701821 ##### SOURCE BEGIN #####\r\n%%\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/15007\r\n% Jiro>'s pick this week is his very own\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/29863-fireworks-gui\r\n% |Fireworks GUI|>. \r\n%\r\n% Regardless of what you are celebrating this time of the year, it seems\r\n% like fireworks are a common event that many people enjoy on New Year's\r\n% Day (or New Year's Eve). If you are unable to see any in person or are\r\n% tired of seeing ones on the television, here's something for you to enjoy\r\n% in the comfort of your own computer and MATLAB!\r\n%\r\n% <<fireworks_movie.gif>>\r\n%\r\n% I made this using the\r\n% <https:\/\/www.mathworks.com\/help\/releases\/R2010b\/techdoc\/matlab_oop\/ug_intropage.html\r\n% MATLAB Classes> (requires R2008a or newer), where each fireworks is an\r\n% object. The fireworks object can have a number of input parameters, such\r\n% as launch location, launch speed, fireworks type, and number of petals. I\r\n% also created a number of presets that perform various combination\r\n% fireworks. And finally, I created a GUI where you can interactively\r\n% launch fireworks, enable demo mode, create movies (AVI or animated GIF),\r\n% and turn on sounds. Yes, it has sounds.\r\n%\r\n% <<fireworks_screenshot.png>>\r\n%\r\n% Download it, maximize the window, turn off the lights, and enjoy!\r\n%\r\n% Have a happy new year!!\r\n%\r\n% *Comments*\r\n%\r\n% Let me know what you think\r\n% <https:\/\/blogs.mathworks.com\/pick\/?p=2636#respond here>.\r\n\r\n##### SOURCE END ##### bdfc9910754d44fea1c8dbfa08701821\r\n-->","protected":false},"excerpt":{"rendered":"<p>\r\n   Jiro's pick this week is his very own Fireworks GUI.\r\n   \r\n   Regardless of what you are celebrating this time of the year, it seems like fireworks are a common event that many people\r\n     ... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2010\/12\/31\/fireworks-for-the-new-year\/\">read more >><\/a><\/p>","protected":false},"author":35,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[12,16],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2636"}],"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\/35"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=2636"}],"version-history":[{"count":0,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2636\/revisions"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=2636"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=2636"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=2636"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}