{"id":8684,"date":"2017-07-07T10:57:15","date_gmt":"2017-07-07T14:57:15","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/?p=8684"},"modified":"2017-07-20T14:57:11","modified_gmt":"2017-07-20T18:57:11","slug":"fidget-spinner","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2017\/07\/07\/fidget-spinner\/","title":{"rendered":"Fidget Spinner"},"content":{"rendered":"<div class=\"content\">\n<p><a href=\"https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/3208495\">Sean<\/a>&#8216;s pick this week is <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/63423-fidget-spinner-3dof-gyro--simscape-multibody-\">Fidget Spinner (Simscape Multibody)<\/a> by <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/7326344\">Pavel Roslovets<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<p>It wasn&#8217;t even a couple months ago that I first heard of a fidget spinner in this <a href=\"http:\/\/time.com\/4775458\/shoddy-science-behind-fidget-spinners\/\">Time Magazine article<\/a>. Within a week, all of the sudden they were everywhere. Well, now they&#8217;re in MATLAB too!<\/p>\n<p>Pavel has used the physical modeling tool <a href=\"https:\/\/www.mathworks.com\/products\/simmechanics.html\">Simscape Multibody<\/a> to build a dynamic model of a fidget spinner. He imports the geometry from a CAD model and then wires it up to the appropriate blocks. The entire model is just a few blocks. There&#8217;s also a video of how to build up the model voiced over in Russian.<\/p>\n<p>Let&#8217;s see it in action:<br \/>\n<div style=\"width: 800px;\" class=\"wp-video\"><!--[if lt IE 9]><script>document.createElement('video');<\/script><![endif]-->\n<video class=\"wp-video-shortcode\" id=\"video-8684-1\" width=\"800\" height=\"600\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/blogs.mathworks.com\/pick\/files\/fidgetspinner.mp4?_=1\" \/><a href=\"https:\/\/blogs.mathworks.com\/pick\/files\/fidgetspinner.mp4\">https:\/\/blogs.mathworks.com\/pick\/files\/fidgetspinner.mp4<\/a><\/video><\/div><\/p>\n<p>Since many of you probably don&#8217;t have the required toolboxes to see the model. I&#8217;ve gone ahead and exported it to a <a title=\"https:\/\/www.mathworks.com\/help\/releases\/R2017a\/rptgenext\/ug\/what-are-web-views.html (link no longer works)\">web view<\/a> using <a href=\"https:\/\/www.mathworks.com\/products\/SL_reportgenerator.html\">Simulink Report Generator<\/a>. Here&#8217;s a link to it: <a href=\"https:\/\/blogs.mathworks.com\/images\/pick\/Sean\/mainFidgetSpinner\/fswebview.html\">Fidget Spinner Model Web View<\/a>.<\/p>\n<h3>Comments<a name=\"2\"><\/a><\/h3>\n<p>Give it a try and let us know what you think <a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=8684#respond\">here<\/a> or leave a <a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/63423-fidget-spinner-3dof-gyro--simscape-multibody-#comments\">comment<\/a> for Pavel.<\/p>\n<p><script language=\"JavaScript\">\n<!--\n\n    function grabCode_1e8b9907484e47c4a1f69e187fb14ce7() {\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='1e8b9907484e47c4a1f69e187fb14ce7 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 1e8b9907484e47c4a1f69e187fb14ce7';\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        author = 'Sean de Wolski';\n        copyright = 'Copyright 2017 The MathWorks, Inc.';\n\n        w = window.open();\n        d = w.document;\n        d.write('<\/p>\n\n\n\n\n<p>\n<\/p>\n\n\n\n\n<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\n\n\n\n<p>\n<\/p>\n\n\n\n\n<p>\\n');\n      \n      d.title = title + ' (MATLAB code)';\n      d.close();\n      }   \n      \n-->\n<\/script><\/p>\n<p style=\"text-align: right; font-size: xx-small; font-weight: lighter; font-style: italic; color: gray;\"><a><span style=\"font-size: x-small; font-style: italic;\">Get<br \/>\nthe MATLAB code<br \/>\n<noscript>(requires JavaScript)<\/noscript><\/span><\/a><\/p>\n<p>Published with MATLAB\u00ae R2017a<\/p>\n<\/div>\n<p><!--\n1e8b9907484e47c4a1f69e187fb14ce7 ##### SOURCE BEGIN #####\n%% Fidget Spinner\n%\n% <https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/3208495 Sean>'s pick this week is\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/63423-fidget-spinner-3dof-gyro--simscape-multibody- Fidget Spinner (Simscape Multibody)> by\n% <https:\/\/www.mathworks.com\/matlabcentral\/profile\/authors\/7326344 Pavel Roslovets>.\n%\n\n%%\n%\n% It wasn't even a couple months ago that I first heard of a fidget spinner\n% in this <http:\/\/time.com\/4775458\/shoddy-science-behind-fidget-spinners\/ % Time Magazine article>.  Within a week, all of the sudden they were\n% everywhere.  Well, now they're in MATLAB too!\n%\n% Pavel has used the physical modeling tool Simscape Multibody to build a\n% dynamic model of a fidget spinner.  He imports the geometry from a CAD\n% tool and then wires it up to the appropriate blocks.  The entire model is\n% just a few blocks. There's also a video of how to build up the model\n% voiced over in Russian.\n%\n% Let's see it in action:\n%\n% replace me\n%\n% Since many of you probably don't have the required toolboxes to see the\n% model.  I've gone ahead and exported it to a\n% <https:\/\/www.mathworks.com\/help\/releases\/R2017a\/rptgenext\/ug\/what-are-web-views.html % web view> using\n% <https:\/\/www.mathworks.com\/products\/SL_reportgenerator.html Simulink % Report Generator>.  Here's a link to the webview <fswebview.html Fidget Spinner>.\n\n%% Comments\n%\n% Give it a try and let us know what you think\n% <https:\/\/blogs.mathworks.com\/pick\/?p=8684#respond here> or leave a\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/63423-fidget-spinner-3dof-gyro--simscape-multibody-#comments % comment> for Pavel.\n%\n\n##### SOURCE END ##### 1e8b9907484e47c4a1f69e187fb14ce7\n--><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\nSean&#8216;s pick this week is Fidget Spinner (Simscape Multibody) by Pavel Roslovets.<br \/>\n&nbsp;<br \/>\nIt wasn&#8217;t even a couple months ago that I first heard of a fidget spinner in this Time Magazine&#8230; <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2017\/07\/07\/fidget-spinner\/\">read more >><\/a><\/p>\n","protected":false},"author":87,"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\/8684"}],"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\/87"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=8684"}],"version-history":[{"count":11,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/8684\/revisions"}],"predecessor-version":[{"id":8766,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/8684\/revisions\/8766"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=8684"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=8684"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=8684"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}