<p><div><div><div><div data-width="100" data-show-faces="false" data-send="true" data-layout="button_count" data-height="21" data-href="https://www.r-bloggers.com/gummy-worms/"></div></div><div><a data-url="https://www.r-bloggers.com/gummy-worms/" data-counturl="https://www.r-bloggers.com/gummy-worms/" data-count="horizontal" data-text="Gummy Worms" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="https://aschinchon.wordpress.com/2016/08/08/gummy-worms/"> Ripples</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<blockquote><p>Just keep swimming (Dory in Finding Nemo)</p>
</blockquote>
<p>Inspired by <a target="_blank" href="https://aschinchon.wordpress.com/2014/11/11/3d-harmonographs-in-motion/">this post</a>, I decided to create gummy worms like this:</p>
<p><img alt="worm" class="wp-image-3172" src="https://i0.wp.com/aschinchon.files.wordpress.com/2016/07/worm.png?w=456&ssl=1" data-recalc-dims="1"><br>
Or these:</p>
<p><a target="_blank" href="https://aschinchon.wordpress.com/2016/08/08/gummy-worms/gusano014/"><img data-image-description="" data-orig-file="https://aschinchon.files.wordpress.com/2016/07/gusano014.png" data-orig-size="256,256" data-image-title="gusano014" data-comments-opened="1" data-recalc-dims="1" data-attachment-id="3151" alt="gusano014" data-medium-file="https://aschinchon.files.wordpress.com/2016/07/gusano014.png?w=256" data-large-file="https://aschinchon.files.wordpress.com/2016/07/gusano014.png?w=256" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" src="https://i0.wp.com/aschinchon.files.wordpress.com/2016/07/gusano014.png?resize=150%2C150&ssl=1"></a><br>
<a target="_blank" href="https://aschinchon.wordpress.com/2016/08/08/gummy-worms/gusano009/"><img data-image-description="" data-orig-file="https://aschinchon.files.wordpress.com/2016/07/gusano009.png" data-orig-size="256,256" data-image-title="gusano009" data-comments-opened="1" data-recalc-dims="1" data-attachment-id="3146" alt="gusano009" data-medium-file="https://aschinchon.files.wordpress.com/2016/07/gusano009.png?w=256" data-large-file="https://aschinchon.files.wordpress.com/2016/07/gusano009.png?w=256" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" src="https://i2.wp.com/aschinchon.files.wordpress.com/2016/07/gusano009.png?resize=150%2C150&ssl=1"></a><br>
<a target="_blank" href="https://aschinchon.wordpress.com/2016/08/08/gummy-worms/gusano024/"><img data-image-description="" data-orig-file="https://aschinchon.files.wordpress.com/2016/07/gusano024.png" data-orig-size="256,256" data-image-title="gusano024" data-comments-opened="1" data-recalc-dims="1" data-attachment-id="3163" alt="gusano024" data-medium-file="https://aschinchon.files.wordpress.com/2016/07/gusano024.png?w=256" data-large-file="https://aschinchon.files.wordpress.com/2016/07/gusano024.png?w=256" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" src="https://i0.wp.com/aschinchon.files.wordpress.com/2016/07/gusano024.png?resize=150%2C150&ssl=1"></a><br>
<a target="_blank" href="https://aschinchon.wordpress.com/2016/08/08/gummy-worms/gusano013/"><img data-image-description="" data-orig-file="https://aschinchon.files.wordpress.com/2016/07/gusano013.png" data-orig-size="256,256" data-image-title="gusano013" data-comments-opened="1" data-recalc-dims="1" data-attachment-id="3150" alt="gusano013" data-medium-file="https://aschinchon.files.wordpress.com/2016/07/gusano013.png?w=256" data-large-file="https://aschinchon.files.wordpress.com/2016/07/gusano013.png?w=256" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" src="https://i1.wp.com/aschinchon.files.wordpress.com/2016/07/gusano013.png?resize=150%2C150&ssl=1"></a><br>
<a target="_blank" href="https://aschinchon.wordpress.com/2016/08/08/gummy-worms/gusano021/"><img data-image-description="" data-orig-file="https://aschinchon.files.wordpress.com/2016/07/gusano021.png" data-orig-size="256,256" data-image-title="gusano021" data-comments-opened="1" data-recalc-dims="1" data-attachment-id="3160" alt="gusano021" data-medium-file="https://aschinchon.files.wordpress.com/2016/07/gusano021.png?w=256" data-large-file="https://aschinchon.files.wordpress.com/2016/07/gusano021.png?w=256" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" src="https://i0.wp.com/aschinchon.files.wordpress.com/2016/07/gusano021.png?resize=150%2C150&ssl=1"></a><br>
<a target="_blank" href="https://aschinchon.wordpress.com/2016/08/08/gummy-worms/gusano010/"><img data-image-description="" data-orig-file="https://aschinchon.files.wordpress.com/2016/07/gusano010.png" data-orig-size="256,256" data-image-title="gusano010" data-comments-opened="1" data-recalc-dims="1" data-attachment-id="3147" alt="gusano010" data-medium-file="https://aschinchon.files.wordpress.com/2016/07/gusano010.png?w=256" data-large-file="https://aschinchon.files.wordpress.com/2016/07/gusano010.png?w=256" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" src="https://i1.wp.com/aschinchon.files.wordpress.com/2016/07/gusano010.png?resize=150%2C150&ssl=1"></a><br>
<a target="_blank" href="https://aschinchon.wordpress.com/2016/08/08/gummy-worms/gusano019/"><img data-image-description="" data-orig-file="https://aschinchon.files.wordpress.com/2016/07/gusano019.png" data-orig-size="256,256" data-image-title="gusano019" data-comments-opened="1" data-recalc-dims="1" data-attachment-id="3158" alt="gusano019" data-medium-file="https://aschinchon.files.wordpress.com/2016/07/gusano019.png?w=256" data-large-file="https://aschinchon.files.wordpress.com/2016/07/gusano019.png?w=256" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" src="https://i1.wp.com/aschinchon.files.wordpress.com/2016/07/gusano019.png?resize=150%2C150&ssl=1"></a><br>
<a target="_blank" href="https://aschinchon.wordpress.com/2016/08/08/gummy-worms/gusano005/"><img data-image-description="" data-orig-file="https://aschinchon.files.wordpress.com/2016/07/gusano005.png" data-orig-size="256,256" data-image-title="gusano005" data-comments-opened="1" data-recalc-dims="1" data-attachment-id="3142" alt="gusano005" data-medium-file="https://aschinchon.files.wordpress.com/2016/07/gusano005.png?w=256" data-large-file="https://aschinchon.files.wordpress.com/2016/07/gusano005.png?w=256" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" src="https://i0.wp.com/aschinchon.files.wordpress.com/2016/07/gusano005.png?resize=150%2C150&ssl=1"></a><br>
<a target="_blank" href="https://aschinchon.wordpress.com/2016/08/08/gummy-worms/gusano007/"><img data-image-description="" data-orig-file="https://aschinchon.files.wordpress.com/2016/07/gusano007.png" data-orig-size="256,256" data-image-title="gusano007" data-comments-opened="1" data-recalc-dims="1" data-attachment-id="3144" alt="gusano007" data-medium-file="https://aschinchon.files.wordpress.com/2016/07/gusano007.png?w=256" data-large-file="https://aschinchon.files.wordpress.com/2016/07/gusano007.png?w=256" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" src="https://i1.wp.com/aschinchon.files.wordpress.com/2016/07/gusano007.png?resize=150%2C150&ssl=1"></a></p>
<p>When I was young I used to eat them.</p>
<p>Do you want to try? This is the code:</p>
<pre>
library(rgl)
library(RColorBrewer)
t=seq(1, 6, by=.04)
f = function(a, b, c, d, e, f, t) exp(-a*t)*sin(t*b+c)+exp(-d*t)*sin(t*e+f)
v1=runif(6,0,1e-02)
v2=runif(6, 2, 3)
v3=runif(6,-pi/2,pi/2)
open3d()
spheres3d(x=f(v1[1], v2[1], v3[1], v1[4], v2[4], v3[4], t),
          y=f(v1[2], v2[2], v3[2], v1[5], v2[5], v3[5], t),
          z=f(v1[3], v2[3], v3[3], v1[6], v2[6], v3[6], t),
          radius=.3, color=sample(brewer.pal(8, &quot;Dark2&quot;),1))
</pre>
<p> <a target="_blank" rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/aschinchon.wordpress.com/3136/"><img alt="" src="http://feeds.wordpress.com/1.0/comments/aschinchon.wordpress.com/3136/" border="0"></a> <img alt="" src="https://i1.wp.com/pixel.wp.com/b.gif?resize=1%2C1&ssl=1" border="0" data-recalc-dims="1"></p>
<p><div><div><div><div data-width="55" data-show-faces="false" data-layout="box_count" data-send="true" data-height="62" data-href="https://www.r-bloggers.com/gummy-worms/"></div></div><div><a data-url="https://www.r-bloggers.com/gummy-worms/" data-counturl="https://www.r-bloggers.com/gummy-worms/" data-count="vertical" data-text="Gummy Worms" class="twitter-share-button" data-via="rbloggers" href="https://twitter.com/share"></a></div><div></div></div><div></div></div>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="https://aschinchon.wordpress.com/2016/08/08/gummy-worms/"> Ripples</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a title="The R Project for Statistical Computing" rel="nofollow" href="https://www.r-project.org/">R</a> news and <a title="R tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=tutorial">tutorials</a> on topics such as: <a title="Data science" rel="nofollow" href="https://www.r-bloggers.com/?s=data%20science">Data science</a>, <a title="Big Data" rel="nofollow" href="https://www.r-bloggers.com/?s=Big%20Data">Big Data, <a title="R jobs" rel="nofollow" href="https://www.r-users.com/">R jobs</a>, visualization (<a title="ggplot and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=ggplot2">ggplot2</a>, <a title="Boxplots using lattice and ggplot2 tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=boxplot">Boxplots</a>, <a title="Maps and gis" rel="nofollow" href="https://www.r-bloggers.com/?s=map">maps</a>, <a title="Animation in R" rel="nofollow" href="https://www.r-bloggers.com/?s=animation">animation</a>), programming (<a title="RStudio IDE for R" rel="nofollow" href="https://www.r-bloggers.com/?s=RStudio">RStudio</a>, <a title="Sweave and literate programming" rel="nofollow" href="https://www.r-bloggers.com/?s=sweave">Sweave</a>, <a title="LaTeX in R" rel="nofollow" href="https://www.r-bloggers.com/?s=LaTeX">LaTeX</a>, <a title="SQL and databases" rel="nofollow" href="https://www.r-bloggers.com/?s=SQL">SQL</a>, <a title="Eclipse IDE for R" rel="nofollow" href="https://www.r-bloggers.com/?s=eclipse">Eclipse</a>, <a title="git and github, Version Control System" rel="nofollow" href="https://www.r-bloggers.com/?s=git">git</a>, <a title="Large data in R using Hadoop" rel="nofollow" href="https://www.r-bloggers.com/?s=hadoop">hadoop</a>, <a title="Web Scraping of google, facebook, yahoo, twitter and more using R" rel="nofollow" href="https://www.r-bloggers.com/?s=Web+Scraping">Web Scraping</a>) statistics (<a title="Regressions and ANOVA analysis tutorials" rel="nofollow" href="https://www.r-bloggers.com/?s=regression">regression</a>, <a title="principal component analysis tutorial" rel="nofollow" href="https://www.r-bloggers.com/?s=PCA">PCA</a>, <a title="Time series" rel="nofollow" href="https://www.r-bloggers.com/?s=time+series">time series</a>, <a title="finance trading" rel="nofollow" href="https://www.r-bloggers.com/?s=trading">trading</a>) and more...
<img height="1" alt="" width="1" src="http://feeds.feedburner.com/~r/RBloggers/~4/f3hjBo57K18"></a></div>