{"id":10812,"date":"2023-11-16T18:01:49","date_gmt":"2023-11-16T23:01:49","guid":{"rendered":"https:\/\/blogs.mathworks.com\/cleve\/?p=10812"},"modified":"2023-12-13T13:32:39","modified_gmt":"2023-12-13T18:32:39","slug":"bouncing-bucky-ball-at-flipbook-mini-hack","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/cleve\/2023\/11\/16\/bouncing-bucky-ball-at-flipbook-mini-hack\/","title":{"rendered":"Bouncing Bucky Ball at Flipbook Mini Hack"},"content":{"rendered":"\r\n<div class=\"content\"><!--introduction--><p>The 2023 <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/contests\/2023-matlab-mini-hack.html\">MATLAB Central Flipbook Mini Hack<\/a> contest runs from November 6 until December 3.  Over 200 entries have been submitted in the first two weeks.<\/p><!--\/introduction--><h3>Contents<\/h3><div><ul><li><a href=\"#b522fbe2-47f9-4136-a6f2-1892f2cf0495\">New Rules<\/a><\/li><li><a href=\"#bfa6df5c-89fc-46be-b4f7-64f6a1fa7c33\">Gallery<\/a><\/li><li><a href=\"#3d0c7d73-a1e6-40a1-94ca-11bc9e0705fd\">Personal Favorites<\/a><\/li><li><a href=\"#56cf252d-30c5-4192-b1a9-ab40e17f29c7\">Bouncing Bucky Ball<\/a><\/li><li><a href=\"#046a72f3-6f55-49b9-8420-0a1cd4c8e5d0\">Software<\/a><\/li><li><a href=\"#8ea0a405-6fd5-4778-966c-4ff090808b5f\">Thanks<\/a><\/li><\/ul><\/div><h4>New Rules<a name=\"b522fbe2-47f9-4136-a6f2-1892f2cf0495\"><\/a><\/h4><p>This year's mini hack features short animations. The contest software runs the program you submit to make an animated GIF file with exactly 48 frames and an inner-frame delay time of 1\/24 second.  So, your animation will run for two seconds, then continuously repeat. If you want periodic motion, you need to be back where you started by frame 48.<\/p><p>In previous mini hacks, programs had to be Twitter length -- at most 255 characters long. Now, the new limit is 2,000 characters.  Comments and formatting blanks are not counted.  Remixes and reuse of other submissions is encouraged.<\/p><p>Participants and other viewers vote on the submissions.  There are prizes like Amazon gift cards and T-shirts.  MathWorkers may participate, but not win prizes.<\/p><h4>Gallery<a name=\"bfa6df5c-89fc-46be-b4f7-64f6a1fa7c33\"><\/a><\/h4><p>Take a look at the <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/communitycontests\/contests\/6\/entries\">Gallery<\/a>.<\/p><h4>Personal Favorites<a name=\"3d0c7d73-a1e6-40a1-94ca-11bc9e0705fd\"><\/a><\/h4><p>I find the results fascinating.  There are so many different creative styles, artistic talents and programming techniques. Here are a few of my personal favorites.<\/p><p><b>Jenny Bosten<\/b><\/p><p><a href=\"https:\/\/blogs.mathworks.com\/pick\/2021\/10\/25\/jenny-bostens-art-in-the-matlab-mini-hack\">Jenny Bosten<\/a> is a familiar name on MATLAB Central. She is a Senior Lecturer in Psychology at the University of Sussex, where she is a \"visual neuroscientist specialising in colour vision.\" Her code for <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/communitycontests\/contests\/6\/entries\/13760\">Time lapse of Lake view to the West<\/a> shows she is also a wizard of coordinate systems and color maps.<\/p><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/bosten.gif\" alt=\"\"> <\/p><p><b>&#38534;&#20809; &#20013;&#26449;<\/b><\/p><p>I don't know anything about this person.  All I see is this name, &#38534;&#20809; &#20013;&#26449;, and this ingenious code for <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/communitycontests\/contests\/6\/entries\/13092\">Fireworks<\/a>.<\/p><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/fireworks.gif\" alt=\"\"> <\/p><p><b>Ned Gulley<\/b><\/p><p>Ned is the long-time MathWorker who is the architect of MATLAB Central, and who, this time, is also a prolific participant.  One of his more mathematical animations is <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/communitycontests\/contests\/6\/entries\/13840\">Orbiting Roots<\/a>.<\/p><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/gulley.gif\" alt=\"\"> <\/p><p><b>Eric Ludham<\/b>'<\/p><p>Eric is head of the MathWorks development team for Graphics and Charting. Contributions like this <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/communitycontests\/contests\/6\/entries\/13857\">Blooming Rose<\/a> demonstrate his artistic design talent.<\/p><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/ludham.gif\" alt=\"\"> <\/p><h4>Bouncing Bucky Ball<a name=\"56cf252d-30c5-4192-b1a9-ab40e17f29c7\"><\/a><\/h4><p>My own contributions are not nearly as attractive as these.<\/p><p>The 2,000 character limit is a good idea. It forced me to look critically at some old code and rewrite it to be simpler and clearer.<\/p><p>This program for a <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/communitycontests\/contests\/6\/entries\/14102\">Bouncing Bucky Ball<\/a> uses the <tt>hgtransform<\/tt> object to good effect. I also think it has a nice solution to the problem facing everybody of how to retain state from one frame to the next.<\/p><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/bouncing_bucky.gif\" alt=\"\"> <\/p><h4>Software<a name=\"046a72f3-6f55-49b9-8420-0a1cd4c8e5d0\"><\/a><\/h4><p>Here is a link to a slightly more complicated version with one <tt>togglebutton<\/tt> that provides a random restart capability. <a href=\"https:\/\/blogs.mathworks.com\/cleve\/files\/Bouncing_Bucky.m\">Bouncing_Bucky.m<\/a><\/p><h4>Thanks<a name=\"8ea0a405-6fd5-4778-966c-4ff090808b5f\"><\/a><\/h4><p>Chen Lin, David Wey and Vinay Ramesh are running the Mini Hack this year,<\/p><script language=\"JavaScript\"> <!-- \r\n    function grabCode_65f76a589bbd4188bfa9698c4a4437a7() {\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='65f76a589bbd4188bfa9698c4a4437a7 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 65f76a589bbd4188bfa9698c4a4437a7';\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        copyright = 'Copyright 2023 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 copyright line at the bottom if specified.\r\n        if (copyright.length > 0) {\r\n            d.writeln('');\r\n            d.writeln('%%');\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     --> <\/script><p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\"><br><a href=\"javascript:grabCode_65f76a589bbd4188bfa9698c4a4437a7()\"><span style=\"font-size: x-small;        font-style: italic;\">Get \r\n      the MATLAB code <noscript>(requires JavaScript)<\/noscript><\/span><\/a><br><br>\r\n      Published with MATLAB&reg; R2023a<br><\/p><\/div><!--\r\n65f76a589bbd4188bfa9698c4a4437a7 ##### SOURCE BEGIN #####\r\n%% Bouncing Bucky Ball at Flipbook Mini Hack\r\n% The 2023\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/contests\/2023-matlab-mini-hack.html\r\n% MATLAB Central Flipbook Mini Hack> contest runs\r\n% from November 6 until December 3.  Over 200 entries have been submitted\r\n% in the first two weeks.\r\n%\r\n\r\n%% New Rules\r\n% This year's mini hack features short animations.\r\n% The contest software runs the program you submit to make an animated\r\n% GIF file with exactly 48 frames and an inner-frame delay time\r\n% of 1\/24 second.  So, your animation will run for two seconds, then\r\n% continuously repeat. If you want periodic motion, you need\r\n% to be back where you started by frame 48.\r\n%\r\n% In previous mini hacks, programs had to be Twitter length REPLACE_WITH_DASH_DASH\r\n% at most 255 characters long.\r\n% Now, the new limit is 2,000 characters.  Comments and formatting\r\n% blanks are not counted.  Remixes and reuse of other submissions is\r\n% encouraged.\r\n%\r\n% Participants and other viewers vote on the submissions.  There are\r\n% prizes like Amazon gift cards and T-shirts.  MathWorkers may \r\n% participate, but not win prizes.\r\n\r\n%% Gallery\r\n% Take a look at the\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/communitycontests\/contests\/6\/entries\r\n% Gallery>.\r\n\r\n%% Personal Favorites\r\n% I find the results fascinating.  There are so many different creative\r\n% styles, artistic talents and programming techniques.\r\n% Here are a few of my personal favorites.\r\n%\r\n% *Jenny Bosten*\r\n%\r\n% <https:\/\/blogs.mathworks.com\/pick\/2021\/10\/25\/jenny-bostens-art-in-the-matlab-mini-hack\r\n% Jenny Bosten> is a familiar name on MATLAB Central.\r\n% She is a Senior Lecturer in Psychology at the University of Sussex,\r\n% where she is a \"visual neuroscientist specialising in colour vision.\"\r\n% Her code for \r\n% <https:\/\/www.mathworks.com\/matlabcentral\/communitycontests\/contests\/6\/entries\/13760\r\n% Time lapse of Lake view to the West>\r\n% shows she is also a wizard of coordinate systems and color maps.\r\n%\r\n% <<bosten.gif>> \r\n%\r\n%\r\n% *\u9686\u5149 \u4e2d\u6751*\r\n%\r\n% I don't know anything about this person.  All I see is this \r\n% name, \u9686\u5149 \u4e2d\u6751, and this ingenious code for\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/communitycontests\/contests\/6\/entries\/13092\r\n% Fireworks>.\r\n%\r\n% <<fireworks.gif>>\r\n%\r\n%\r\n% *Ned Gulley*\r\n%\r\n% Ned is the long-time MathWorker who is the architect of MATLAB Central,\r\n% and who, this time, is also a prolific participant.  One of his more\r\n% mathematical animations is \r\n% <https:\/\/www.mathworks.com\/matlabcentral\/communitycontests\/contests\/6\/entries\/13840\r\n% Orbiting Roots>.\r\n%\r\n% <<gulley.gif>>\r\n%\r\n%\r\n% *Eric Ludham*'\r\n%\r\n% Eric is head of the MathWorks development team for Graphics and Charting.\r\n% Contributions like this\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/communitycontests\/contests\/6\/entries\/13857\r\n% Blooming Rose> demonstrate his artistic design talent.\r\n%\r\n% <<ludham.gif>>\r\n%\r\n%\r\n%% Bouncing Bucky Ball\r\n% My own contributions are not nearly as attractive as these.\r\n%\r\n% The 2,000 character limit is a good idea. It forced me to look\r\n% critically at some old code and rewrite it to be simpler and clearer.\r\n%\r\n% This program for a\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/communitycontests\/contests\/6\/entries\/14102\r\n% Bouncing Bucky Ball> uses the |hgtransform| object to good effect.\r\n% I also think it has a nice solution to the problem facing everybody of\r\n% how to retain state from one frame to the next.\r\n%\r\n% <<bouncing_bucky.gif>>\r\n%\r\n\r\n%% Software\r\n% Here is a link to a slightly more complicated version with one \r\n% |togglebutton| that provides a random restart capability.  \r\n% <https:\/\/blogs.mathworks.com\/cleve\/files\/Bouncing_Bucky.m\r\n% Bouncing_Bucky.m>\r\n\r\n%% Thanks\r\n% Chen Lin, David Wey and Vinay Ramesh are running the Mini Hack this year,\r\n\r\n##### SOURCE END ##### 65f76a589bbd4188bfa9698c4a4437a7\r\n-->","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/bouncing_bucky.gif\" class=\"img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"\" decoding=\"async\" loading=\"lazy\" \/><\/div><!--introduction--><p>The 2023 <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/contests\/2023-matlab-mini-hack.html\">MATLAB Central Flipbook Mini Hack<\/a> contest runs from November 6 until December 3.  Over 200 entries have been submitted in the first two weeks.... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/cleve\/2023\/11\/16\/bouncing-bucky-ball-at-flipbook-mini-hack\/\">read more >><\/a><\/p>","protected":false},"author":78,"featured_media":10906,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[32,5,23,4,8,37],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/10812"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/users\/78"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/comments?post=10812"}],"version-history":[{"count":9,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/10812\/revisions"}],"predecessor-version":[{"id":10854,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/10812\/revisions\/10854"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/media\/10906"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/media?parent=10812"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/categories?post=10812"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/tags?post=10812"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}