{"id":13151,"date":"2013-09-08T23:34:24","date_gmt":"2013-09-09T04:34:24","guid":{"rendered":"http:\/\/blog.kenperlin.com\/?p=13151"},"modified":"2013-09-08T23:35:50","modified_gmt":"2013-09-09T04:35:50","slug":"fun-with-particles","status":"publish","type":"post","link":"http:\/\/blog.kenperlin.com\/?p=13151","title":{"rendered":"Fun with particles"},"content":{"rendered":"<p>This evening, in response to a question over email, I started wondering whether Javascript is fast enough to do simulations with many particles.  So I wrote a little test program with 500 particles.  Since every particle needs to interact with every other, the program needs to do more than a hundred thousand particle\/particle comparisons at each animation frame.<\/p>\n<p>I was happily surprised to discover that this performs just fine in my web browser.  You can try it by clicking on the image below:<\/p>\n<p><center><br \/>\n<a href=http:\/\/mrl.nyu.edu\/~perlin\/particles\/ target=1><img decoding=\"async\" src=\"http:\/\/blog.kenperlin.com\/wp-content\/uploads\/2013\/09\/particles1.jpg\"><\/a><br \/>\n<\/center>&nbsp;<\/p>\n<p>Then, just for fun, I started playing around with how the particles interact.  I tried making them &#8220;sticky&#8221; so that instead of bouncing off each other they would clump together.<\/p>\n<p>I was happy to see that the particles started forming and re-forming weird shapes, which make me think of alien creatures.  Some of these creatures look a little scary.  It&#8217;s a good thing they only exist inside a computer!  Click on the image below to see the simulation:<\/p>\n<p><center><br \/>\n<a href=http:\/\/mrl.nyu.edu\/~perlin\/particles\/sticky.html target=1><img decoding=\"async\" src=\"http:\/\/blog.kenperlin.com\/wp-content\/uploads\/2013\/09\/particles2.jpg\"><\/a><br \/>\n<\/center><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This evening, in response to a question over email, I started wondering whether Javascript is fast enough to do simulations with many particles. So I wrote a little test program with 500 particles. Since every particle needs to interact with every other, the program needs to do more than a hundred thousand particle\/particle comparisons at &hellip; <a href=\"http:\/\/blog.kenperlin.com\/?p=13151\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Fun with particles&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts\/13151"}],"collection":[{"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=13151"}],"version-history":[{"count":6,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts\/13151\/revisions"}],"predecessor-version":[{"id":13159,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts\/13151\/revisions\/13159"}],"wp:attachment":[{"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=13151"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=13151"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=13151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}