{"id":1444,"date":"2016-04-25T12:00:48","date_gmt":"2016-04-25T17:00:48","guid":{"rendered":"https:\/\/blogs.mathworks.com\/cleve\/?p=1444"},"modified":"2016-04-23T18:26:49","modified_gmt":"2016-04-23T23:26:49","slug":"further-twists-of-the-moebius-strip","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/cleve\/2016\/04\/25\/further-twists-of-the-moebius-strip\/","title":{"rendered":"Further Twists of the Moebius Strip"},"content":{"rendered":"\r\n<div class=\"content\"><!--introduction--><p>The equations generating a <tt>surf<\/tt> plot of the Moebius strip can be parameterized and the parameters allowed to take on expanded values. The results are a family of surfaces that I have been displaying for as long as I have had computer graphics available.<\/p><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/moebius_movie.gif\" alt=\"\"> <\/p><!--\/introduction--><h3>Contents<\/h3><div><ul><li><a href=\"#9d2b153a-8385-4cda-86a2-f2d3520d5567\">Parametrized Moebius Strip<\/a><\/li><li><a href=\"#f7754f39-d832-4fa5-a733-04f2bdce80c2\">Parula<\/a><\/li><li><a href=\"#82a572af-df49-4068-ad95-6f71d73a303d\">HSV<\/a><\/li><li><a href=\"#f2c87dc2-e9f6-4612-ac7d-284b6b5666ba\">TripleTwist<\/a><\/li><li><a href=\"#2184478a-be52-4e96-b4c9-b14b8553aa76\">IEEE Computer, 1988<\/a><\/li><li><a href=\"#713c7236-4a71-42b7-94e5-2b997d5da309\">Kermit Sigmon<\/a><\/li><\/ul><\/div><h4>Parametrized Moebius Strip<a name=\"9d2b153a-8385-4cda-86a2-f2d3520d5567\"><\/a><\/h4><p>The animation shows the formation of a classic Moebius strip. Start with a long, thin rectangular strip of material.  Bend it into a cylinder.  Give the two ends a half twist.  Then join them together. The result is a surface with only one side and one boundary.  One could traverse the entire length of the surface and return to the starting point without ever crossing the edge.<\/p><p>I am going to investigate the effect of three free parameters:<\/p><div><ul><li>$c$: curvature of the cylinder.<\/li><li>$w$: width of the strip.<\/li><li>$k$: number of half twists.<\/li><\/ul><\/div><p>These parameters appear in a mapping of variables $s$ and $t$ from the square $-1 &lt;= s,t &lt;= 1$ to a generalized Moebius strip in 3D.<\/p><p>$$ r = (1-w) + w \\ s \\ \\sin{(k \\pi t\/2)} $$<\/p><p>$$ x = r \\ \\sin{(c \\pi t)}\/c $$<\/p><p>$$ y = r \\ (1 - (1-\\cos{(c\\pi t))}\/c) $$<\/p><p>$$ z = w \\ s \\ \\cos{(k \\pi t\/2)} $$<\/p><p>Here is the code.  The singularity at $c = 0$ can be avoided by using <tt>c = eps<\/tt>.<\/p><pre class=\"codeinput\">    type <span class=\"string\">moebius<\/span>\r\n<\/pre><pre class=\"codeoutput\">\r\nfunction [x,y,z,t] = moebius(c,w,k)\r\n% [x,y,z,t] = moebius(c,w,k)\r\n% [x,y,z] = surface of moebius strip, use t for color\r\n% c = curvature, 0 = flat, 1 = cylinder.\r\n% w = width of strip\r\n% k = number of half twists\r\n    if c == 0\r\n        c = eps;\r\n    end\r\n    m = 8;\r\n    n = 128;\r\n    [s,t] = meshgrid(-1:2\/m:1, -1:2\/n:1);\r\n    r = (1-w) + w*s.*sin(k\/2*pi*t);\r\n    x = r.*sin(c*pi*t)\/c;\r\n    y = r.*(1 - (1-cos(c*pi*t))\/c);\r\n    z = w*s.*cos(k\/2*pi*t);\r\nend\r\n<\/pre><p>The animation begins with a flat, untwisted strip of width 1\/4, that is<\/p><p>$$ c = 0, \\ w = 1\/4, \\ k = 0 $$<\/p><p>The classic Moebius strip is reached with<\/p><p>$$ c = 1, \\ w = 1\/4, \\ k = 1 $$<\/p><p>The final portion of the animation simply changes the viewpoint, not the parameters.<\/p><h4>Parula<a name=\"f7754f39-d832-4fa5-a733-04f2bdce80c2\"><\/a><\/h4><p>Let's play with colormaps.  I'll look at the classic Moebius strip and make the default MATLAB colormap periodic by appending a reversed copy.  I think this looks pretty nice.<\/p><pre class=\"codeinput\">   map = [parula(256); flipud(parula(256))];\r\n<\/pre><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/moebius_parula.jpeg\" alt=\"\"> <\/p><h4>HSV<a name=\"82a572af-df49-4068-ad95-6f71d73a303d\"><\/a><\/h4><p>The Hue-Saturation-Value color map has received a lot of criticism in MathWorks blogs recently, but it works nicely in this situation. This figure has $k = 4$, so there are two full twists.  That's very hard to see from this view.  The colors help, but it's important to be able to rotate the view, which we can't do easily in this blog.<\/p><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/moebius_fourleaf.jpeg\" alt=\"\"> <\/p><h4>TripleTwist<a name=\"f2c87dc2-e9f6-4612-ac7d-284b6b5666ba\"><\/a><\/h4><p>Here is the one with three half twists.  Like the classic Moebius strip, this has only one side.  I've grown quite fond of this guy, so I'll show two views.  The HSV color map, with its six colors, works well.<\/p><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/triple_twist1.jpeg\" alt=\"\"> <\/p><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/triple_twist2.jpeg\" alt=\"\"> <\/p><h4>IEEE Computer, 1988<a name=\"2184478a-be52-4e96-b4c9-b14b8553aa76\"><\/a><\/h4><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/titan_cover.jpeg\" alt=\"\"> <\/p><p>Source: IEEE<\/p><p>I have <a href=\"https:\/\/blogs.mathworks.com\/cleve\/2013\/12\/09\/the-ardent-titan-part-2\">written in this blog<\/a> about the glorious marriage between MATLAB and the Dore graphics system on the ill-fated Ardent Titan computer almost 30 years ago.  I somehow generated this image using MATLAB, Dore, these parametrized Moebius equations and the Titan graphics hardware in 1988.  This was fancy stuff back then.  The editors of IEEE Computer were really excited about this cover.<\/p><p>I've never been able to reproduce it.  I don't know what the parameters were.<\/p><h4>Kermit Sigmon<a name=\"713c7236-4a71-42b7-94e5-2b997d5da309\"><\/a><\/h4><p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/kermit_sigmon.jpg\" alt=\"\"> <\/p><p>Kermit Sigmon was a professor at the University of Florida. He was an excellent teacher and writer.  He wrote a short <i>MATLAB Primer<\/i> that was enormously popular and widely distributed in the early days of the web.  It went through several editions and was translated into a couple of other languages.<\/p><p>For the most part, people had free copies of the <i>MATLAB Primer<\/i> without fancy covers.  But CRC Press obtained the rights to produce a reasonably priced bound paperback copy which featured a cover with $k = 5$.<\/p><p>Kermit passed away in 1997 and Tim Davis took over the job of editing the <i>Primer<\/i>.  He generated more elaborate graphics for his covers.<\/p><script language=\"JavaScript\"> <!-- \r\n    function grabCode_142f142079db4887b91a41585a8f59da() {\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='142f142079db4887b91a41585a8f59da ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 142f142079db4887b91a41585a8f59da';\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 2016 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_142f142079db4887b91a41585a8f59da()\"><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; R2016a<br><\/p><\/div><!--\r\n142f142079db4887b91a41585a8f59da ##### SOURCE BEGIN #####\r\n%% Further Twists of the Moebius Strip\r\n% The equations generating a |surf| plot of the Moebius strip can be\r\n% parameterized and the parameters allowed to take on expanded values.\r\n% The results are a family of surfaces that I have been displaying for\r\n% as long as I have had computer graphics available.\r\n%\r\n% <<moebius_movie.gif>>\r\n%\r\n%% Parametrized Moebius Strip\r\n% The animation shows the formation of a classic Moebius strip.\r\n% Start with a long, thin rectangular strip of material.  Bend it into\r\n% a cylinder.  Give the two ends a half twist.  Then join them together.\r\n% The result is a surface with only one side and one boundary.  One could\r\n% traverse the entire length of the surface and return to the starting\r\n% point without ever crossing the edge.\r\n\r\n%%\r\n% I am going to investigate the effect of three free parameters:\r\n%\r\n% * $c$: curvature of the cylinder.\r\n% * $w$: width of the strip.\r\n% * $k$: number of half twists.\r\n\r\n%%\r\n% These parameters appear in a mapping of variables $s$ and $t$ from\r\n% the square $-1 <= s,t <= 1$ to a generalized Moebius strip in 3D.\r\n%\r\n% $$ r = (1-w) + w \\ s \\ \\sin{(k \\pi t\/2)} $$\r\n%\r\n% $$ x = r \\ \\sin{(c \\pi t)}\/c $$\r\n%\r\n% $$ y = r \\ (1 - (1-\\cos{(c\\pi t))}\/c) $$\r\n%\r\n% $$ z = w \\ s \\ \\cos{(k \\pi t\/2)} $$\r\n\r\n%%\r\n% Here is the code.  The singularity at $c = 0$ can be avoided by \r\n% using |c = eps|.\r\n\r\n    type moebius\r\n\r\n%%\r\n% The animation begins with a flat, untwisted strip of width 1\/4, that is\r\n%\r\n% $$ c = 0, \\ w = 1\/4, \\ k = 0 $$\r\n%\r\n% The classic Moebius strip is reached with\r\n%\r\n% $$ c = 1, \\ w = 1\/4, \\ k = 1 $$\r\n%\r\n% The final portion of the animation simply changes the viewpoint, not the\r\n% parameters.\r\n\r\n%% Parula\r\n% Let's play with colormaps.  I'll look at the classic Moebius strip\r\n% and make the default MATLAB colormap periodic by appending a reversed\r\n% copy.  I think this looks pretty nice.\r\n\r\n   map = [parula(256); flipud(parula(256))];\r\n \r\n%%\r\n%\r\n% <<moebius_parula.jpeg>>\r\n%\r\n\r\n%% HSV\r\n% The Hue-Saturation-Value color map has received a lot of criticism in\r\n% MathWorks blogs recently, but it works nicely in this situation.\r\n% This figure has $k = 4$, so there are two full twists.  That's very\r\n% hard to see from this view.  The colors help, but it's important to\r\n% be able to rotate the view, which we can't do easily in this blog.\r\n%\r\n% <<moebius_fourleaf.jpeg>>\r\n%\r\n\r\n%% TripleTwist\r\n% Here is the one with three half twists.  Like the classic Moebius\r\n% strip, this has only one side.  I've grown quite fond of this guy,\r\n% so I'll show two views.  The HSV color map, with its six colors,\r\n% works well.\r\n%\r\n% <<triple_twist1.jpeg>>\r\n%\r\n%\r\n% <<triple_twist2.jpeg>>\r\n%\r\n\r\n\r\n%% IEEE Computer, 1988\r\n%\r\n% <<titan_cover.jpeg>>\r\n%\r\n% Source: IEEE\r\n%\r\n% I have \r\n% <https:\/\/blogs.mathworks.com\/cleve\/2013\/12\/09\/the-ardent-titan-part-2\r\n% written in this blog> about the glorious marriage \r\n% between MATLAB and the Dore graphics system on the ill-fated Ardent\r\n% Titan computer almost 30 years ago.  I somehow generated this\r\n% image using MATLAB, Dore, these parametrized Moebius equations\r\n% and the Titan graphics hardware in 1988.  This was fancy stuff\r\n% back then.  The editors of IEEE Computer were really excited about\r\n% this cover.\r\n\r\n%%\r\n% I've never been able to reproduce it.  I don't know what the\r\n% parameters were.\r\n\r\n%% Kermit Sigmon\r\n%\r\n% <<kermit_sigmon.jpg>>\r\n%\r\n% Kermit Sigmon was a professor at the University of Florida.\r\n% He was an excellent teacher and writer.  He wrote a short _MATLAB Primer_\r\n% that was enormously popular and widely distributed in the early days\r\n% of the web.  It went through several editions and was translated into\r\n% a couple of other languages.\r\n\r\n%%\r\n% For the most part, people had free copies of the _MATLAB Primer_ \r\n% without fancy covers.  But CRC Press obtained the rights to produce\r\n% a reasonably priced bound paperback copy which featured a cover with\r\n% $k = 5$.\r\n\r\n%%\r\n% Kermit passed away in 1997 and Tim Davis took over the job of\r\n% editing the _Primer_.  He generated more elaborate graphics for\r\n% his covers.\r\n\r\n\r\n\r\n\r\n\r\n##### SOURCE END ##### 142f142079db4887b91a41585a8f59da\r\n-->","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img src=\"https:\/\/blogs.mathworks.com\/cleve\/files\/moebius_fourleaf.jpeg\" class=\"img-responsive attachment-post-thumbnail size-post-thumbnail wp-post-image\" alt=\"\" decoding=\"async\" loading=\"lazy\" \/><\/div><!--introduction--><p>The equations generating a <tt>surf<\/tt> plot of the Moebius strip can be parameterized and the parameters allowed to take on expanded values. The results are a family of surfaces that I have been displaying for as long as I have had computer graphics available.... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/cleve\/2016\/04\/25\/further-twists-of-the-moebius-strip\/\">read more >><\/a><\/p>","protected":false},"author":78,"featured_media":1445,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[5,23,4,8],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/1444"}],"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=1444"}],"version-history":[{"count":2,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/1444\/revisions"}],"predecessor-version":[{"id":1474,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/posts\/1444\/revisions\/1474"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/media\/1445"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/media?parent=1444"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/categories?post=1444"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/cleve\/wp-json\/wp\/v2\/tags?post=1444"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}