{"id":11022,"date":"2024-02-20T11:24:41","date_gmt":"2024-02-20T16:24:41","guid":{"rendered":"https:\/\/blogs.mathworks.com\/cleve\/?p=11022"},"modified":"2024-02-24T09:38:01","modified_gmt":"2024-02-24T14:38:01","slug":"chaotic-swinging-sticks","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/cleve\/2024\/02\/20\/chaotic-swinging-sticks\/","title":{"rendered":"Chaotic Swinging Sticks"},"content":{"rendered":"<div class=\"content\"><!--introduction-->\n<p>\n<a href=\"https:\/\/swingingsticks.com\" target=\"_blank\">The Swinging Sticks<\/a> is a kinetic sculpture that exhibits chaotic motion. The device became very popular after it upstaged Tony Stark in <a href=\"https:\/\/www.google.com\/search?q=youtube+swinging+sticks+iron+man#fpstate=ive&amp;vld=cid:6a6186e3,vid:sbbjhNLiL3c,st:0\" target=\"_blank\">Iron Man 2<\/a>. My daughter Carolyn gave me a desktop version of Swinging Sticks for Christmas. I immediately set out to simulate it.<\/p>\n<p>\n<img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/sculpture.png\" alt=\"\"> <\/p>\n<!--\/introduction-->\n<h3>Contents<\/h3>\n<div>\n<ul>\n<li>\n<a href=\"#a9143ab6-8f3f-482e-92ee-35cf3f9190de\">Chaotic Motion<\/a>\n<\/li>\n<li>\n<a href=\"#bf97f3ad-e2a5-4421-9892-a8466b18022a\">Swinging Sticks<\/a>\n<\/li>\n<li>\n<a href=\"#3862e132-f69e-4702-85b6-6aeeb1406839\">Sculpture<\/a>\n<\/li>\n<li>\n<a href=\"#dd331fb2-a5f9-42c6-a538-5b2cb8c9b486\">Code<\/a>\n<\/li>\n<\/ul>\n<\/div>\n<h4>Chaotic Motion<a name=\"a9143ab6-8f3f-482e-92ee-35cf3f9190de\"><\/a>\n<\/h4>\n<p>Chaotic motion appears random but isn't. Once the motion begins, the initial conditions together with Newton's law of motion, F = ma, determine subsequent behavior. There are no random forces. It may be difficult to predict positions, but they are well-determined, nonetheless.<\/p>\n<p>A classic example of chaotic motion is the double pendulum. One mass at end of a massless string swings about a fixed pivot, and a second mass is attached by a massless string to the first. My simulator of the classic double pendulum is available in Cleve's Lab, <a href=\"https:\/\/blogs.mathworks.com\/cleve\/2016\/10\/31\/introducing-cleves-laboratory\">swinger<\/a>, and a movie is available here <a href=\"https:\/\/blogs.mathworks.com\/cleve\/files\/swinger.mp4\">pendulum movie<\/a>.<\/p>\n<h4>Swinging Sticks<a name=\"bf97f3ad-e2a5-4421-9892-a8466b18022a\"><\/a>\n<\/h4>\n<p>The swinging sticks are similar to the double pendulum. The sticks are two rods with uniformly distributed mass, different lengths and off-center pivots. The best way to view the motion is to download <a href=\"https:\/\/blogs.mathworks.com\/cleve\/files\/swinging_sticks.m\">this code<\/a> and run it in your own MATLAB. Otherwise, here in a short slow-motion animated GIF.<\/p>\n<p>\n<img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/sticks_gif.gif\" alt=\"\"> <\/p>\n<p>And, here is a longer <a href=\"https:\/\/blogs.mathworks.com\/cleve\/files\/sticks.mp4\">Swinging Sticks Video<\/a>.<\/p>\n<p>The motion of the shorter of the two rods is chaotic. Here are the orbits traced by the ends of the short rod.<\/p>\n<p>\n<img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"http:\/\/blogs.mathworks.com\/cleve\/files\/chaos.png\" alt=\"\"> <\/p>\n<h4>Sculpture<a name=\"3862e132-f69e-4702-85b6-6aeeb1406839\"><\/a>\n<\/h4>\n<p>Swinging Sticks sculptures are available in various sizes and colors. <a href=\"https:\/\/swingingsticks.com\" target=\"_blank\">The Swinging Sticks<\/a>.<\/p>\n<p>Our mathematical model is of a frictionless perpetual motion machine. The real sculptures have an ingenious electromagnetic controller in the base that is claimed to run for two years on four AA batteries. Mine has been running since Christmas. An excellent <a href=\"https:\/\/www.youtube.com\/watch?v=PWg6TG2bkFU\">YouTube video<\/a> by Wayne Schmidt describes the controller.<\/p>\n<h4>Code<a name=\"dd331fb2-a5f9-42c6-a538-5b2cb8c9b486\"><\/a>\n<\/h4>\n<p>\n<a href=\"https:\/\/blogs.mathworks.com\/cleve\/files\/swinging_sticks.m\">https:\/\/blogs.mathworks.com\/cleve\/files\/swinging_sticks.m<\/a>\n<\/p>\n<script language=\"JavaScript\"> <!-- \n    function grabCode_3007bf720ec7402cb273ace1e6e2d61e() {\n        \/\/ Remember the title so we can use it in the new page\n        title = document.title;\n\n        \/\/ Break up these strings so that their presence\n        \/\/ in the Javascript doesn't mess up the search for\n        \/\/ the MATLAB code.\n        t1='3007bf720ec7402cb273ace1e6e2d61e ' + '##### ' + 'SOURCE BEGIN' + ' #####';\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 3007bf720ec7402cb273ace1e6e2d61e';\n    \n        b=document.getElementsByTagName('body')[0];\n        i1=b.innerHTML.indexOf(t1)+t1.length;\n        i2=b.innerHTML.indexOf(t2);\n \n        code_string = b.innerHTML.substring(i1, i2);\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\n\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \n        \/\/ in the XML parser.\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\n        \/\/ doesn't go ahead and substitute the less-than character. \n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\n\n        copyright = 'Copyright 2024 The MathWorks, Inc.';\n\n        w = window.open();\n        d = w.document;\n        d.write('<pre>\\n');\n        d.write(code_string);\n\n        \/\/ Add copyright line at the bottom if specified.\n        if (copyright.length > 0) {\n            d.writeln('');\n            d.writeln('%%');\n            if (copyright.length > 0) {\n                d.writeln('% _' + copyright + '_');\n            }\n        }\n\n        d.write('<\/pre>\\n');\n\n        d.title = title + ' (MATLAB code)';\n        d.close();\n    }   \n     --> <\/script>\n<p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\">\n<br>\n<a href=\"javascript:grabCode_3007bf720ec7402cb273ace1e6e2d61e()\"><span style=\"font-size: x-small;        font-style: italic;\">Get \n      the MATLAB code <noscript>(requires JavaScript)<\/noscript>\n<\/span><\/a>\n<br>\n<br>\n      Published with MATLAB&reg; R2024a<br>\n<\/p>\n<\/div>\n<!--\n3007bf720ec7402cb273ace1e6e2d61e ##### SOURCE BEGIN #####\n%% Chaotic Swinging Sticks\n% <https:\/\/swingingsticks.com  \n% The Swinging Sticks> is a kinetic sculpture that exhibits chaotic motion.\n% The device became very popular after it upstaged Tony Stark in\n% <https:\/\/www.google.com\/search?q=youtube+swinging+sticks+iron+man#fpstate=ive&vld=cid:6a6186e3,vid:sbbjhNLiL3c,st:0\n% Iron Man 2>.\n% My daughter Carolyn gave me a desktop version of Swinging Sticks\n% for Christmas.  I immediately set out to simulate it.\n%\n% <<sculpture.png>>\n\n\n%% Chaotic Motion\n% Chaotic motion appears random but isn't. Once the motion begins, the\n% initial conditions together with Newton's law of motion, F = ma,\n% determine subsequent behavior.  There are no random forces.  It may be\n% difficult to predict positions, but they are well-determined,\n% nonetheless.\n%\n% A classic example of chaotic motion is the double pendulum.\n% One mass at end of a massless string swings about a fixed pivot, and\n% a second mass is attached by a massless string to the first.\n% My simulator of the classic double pendulum is available in Cleve's Lab,\n% <https:\/\/blogs.mathworks.com\/cleve\/2016\/10\/31\/introducing-cleves-laboratory\n% swinger>, and a movie is available here\n% <https:\/\/blogs.mathworks.com\/cleve\/files\/swinger.mp4 pendulum movie>.\n\n%% Swinging Sticks\n% The swinging sticks are similar to the double pendulum.\n% The sticks are two rods with uniformly distributed mass,\n% different lengths and off-center pivots.\n% The best way to view the motion is to download\n% <https:\/\/blogs.mathworks.com\/cleve\/files\/swinging_sticks.m\n% this code> and run it in your own MATLAB.\n% Otherwise, here in a short slow-motion animated GIF.\n% \n% <<sticks_gif.gif>>\n%\n% And, here is a longer \n% <https:\/\/blogs.mathworks.com\/cleve\/files\/sticks.mp4\n% Swinging Sticks Video>.\n%\n% The motion of the shorter of the two rods is chaotic.  Here are the\n% orbits traced by the ends of the short rod.\n%\n% <<chaos.png>>\n\n\n%% Sculpture\n% Swinging Sticks sculptures are available in various sizes and \n% colors. <https:\/\/swingingsticks.com  The Swinging Sticks>.\n%\n% Our mathematical model is of a frictionless perpetual motion machine.\n% The real sculptures have an ingenious electromagnetic controller in the\n% base that is claimed to run for two years on four AA batteries.\n% Mine has been running since Christmas.\n% An excellent <https:\/\/www.youtube.com\/watch?v=PWg6TG2bkFU YouTube video>\n% by Wayne Schmidt describes the controller.\n\n%% Code\n% <https:\/\/blogs.mathworks.com\/cleve\/files\/swinging_sticks.m>\n##### SOURCE END ##### 3007bf720ec7402cb273ace1e6e2d61e\n-->\n","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/chaos.png\" class=\"img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"\" decoding=\"async\" loading=\"lazy\" \/><\/div><!--introduction-->\n<p>\n<a href=\"https:\/\/swingingsticks.com\" target=\"_blank\">The Swinging Sticks<\/a> is a kinetic sculpture that exhibits chaotic motion. The device became very popular after it upstaged Tony Stark in <a href=\"https:\/\/www.google.com\/search?q=youtube+swinging+sticks+iron+man#fpstate=ive&amp;vld=cid:6a6186e3,vid:sbbjhNLiL3c,st:0\" target=\"_blank\">Iron Man 2<\/a>. My daughter Carolyn gave me a desktop version of Swinging Sticks for Christmas. I immediately set out to simulate it.... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/cleve\/2024\/02\/20\/chaotic-swinging-sticks\/\">read more >><\/a><\/p>","protected":false},"author":78,"featured_media":11031,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[24,23,37],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/11022"}],"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=11022"}],"version-history":[{"count":5,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/11022\/revisions"}],"predecessor-version":[{"id":11058,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/11022\/revisions\/11058"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/media\/11031"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/media?parent=11022"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/categories?post=11022"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/tags?post=11022"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}