{"id":1054,"date":"2014-12-02T02:09:31","date_gmt":"2014-12-02T02:09:31","guid":{"rendered":"http:\/\/astoryisnotatree.net\/?p=1054"},"modified":"2020-05-06T20:00:43","modified_gmt":"2020-05-06T20:00:43","slug":"exercise-3-amusement-park","status":"publish","type":"post","link":"https:\/\/r6g.ad7.mwp.accessdomain.com\/?p=1054","title":{"rendered":"Games from Nothing: Black &#038; White Exercise #3 \u2014 Amusement Park"},"content":{"rendered":"<p><a href=\"http:\/\/astoryisnotatree.net\/wp-content\/uploads\/2014\/12\/sketch1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-1055\" src=\"http:\/\/astoryisnotatree.net\/wp-content\/uploads\/2014\/12\/sketch1-300x225.png\" alt=\"sketch1\" width=\"501\" height=\"376\" srcset=\"https:\/\/r6g.ad7.mwp.accessdomain.com\/wp-content\/uploads\/2014\/12\/sketch1-300x225.png 300w, https:\/\/r6g.ad7.mwp.accessdomain.com\/wp-content\/uploads\/2014\/12\/sketch1-624x468.png 624w, https:\/\/r6g.ad7.mwp.accessdomain.com\/wp-content\/uploads\/2014\/12\/sketch1.png 1024w\" sizes=\"auto, (max-width: 501px) 100vw, 501px\" \/><\/a><\/p>\n<p>For this exercise I chose to make a rotation-based &#8216;ride&#8217; that spins, but also modulates the shape of the ride itself. I envisioned something that started with one shape and morphed to another shape while spinning. I wanted to create diversity of movement, and I also wanted to play with forced-perspective. \u00a0The code is very simple<\/p>\n<p>float angle = 0.0;<br \/>\nfloat radius = 0.0;<br \/>\nfloat change = 1;<\/p>\n<p>void setup() {<br \/>\n\/\/ orientation(LANDSCAPE);<br \/>\nsize(1024,768);<br \/>\n}<\/p>\n<p>void draw() {<\/p>\n<p>\/\/I decided to make two different &#8216;centers&#8217; with two different rotating systems<br \/>\ntranslate(mouseX+300, mouseY);<br \/>\nrotate(angle);<br \/>\n<span style=\"line-height: 1.714285714; font-size: 1rem;\">rect(0, 0, radius, radius, radius);<br \/>\n<\/span><span style=\"line-height: 1.714285714; font-size: 1rem;\">angle += 0.1;<br \/>\n<\/span>if(radius&gt;150) change *= -1;<\/p>\n<p>if(radius&lt;-150) change *= -1;<br \/>\nradius += change;<\/p>\n<p>\/\/here is the second &#8216;system&#8217;<br \/>\n<span style=\"line-height: 1.714285714; font-size: 1rem;\">translate(mouseX-300, mouseY);<\/span><\/p>\n<p>rotate(angle);<br \/>\nrect(0, 0, radius, radius, radius);<br \/>\nangle += 0.1;<br \/>\nif(radius&gt;150) change *= -1;<br \/>\nif(radius&lt;-150) change *= -1;<br \/>\nradius += change;<br \/>\n}<\/p>\n<p><a href=\"http:\/\/astoryisnotatree.net\/wp-content\/uploads\/2014\/12\/sketch2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-1056\" src=\"http:\/\/astoryisnotatree.net\/wp-content\/uploads\/2014\/12\/sketch2-300x225.png\" alt=\"sketch2\" width=\"501\" height=\"376\" srcset=\"https:\/\/r6g.ad7.mwp.accessdomain.com\/wp-content\/uploads\/2014\/12\/sketch2-300x225.png 300w, https:\/\/r6g.ad7.mwp.accessdomain.com\/wp-content\/uploads\/2014\/12\/sketch2-624x468.png 624w, https:\/\/r6g.ad7.mwp.accessdomain.com\/wp-content\/uploads\/2014\/12\/sketch2.png 1024w\" sizes=\"auto, (max-width: 501px) 100vw, 501px\" \/><\/a><\/p>\n<p>As the &#8216;radius&#8217; float changes between 150 and -150, the shape changes wildly since it is also changing\u00a0the radius of the corners of the rectangle. Once the radius becomes negative, the corners invert and it looks like this ^^^. I might\u00a0not want to ride this ride, because you would clearly get transported to another dimension, BUT if there&#8217;s Pizza and Beer on the other side it could be worth it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For this exercise I chose to make a rotation-based &#8216;ride&#8217; that spins, but also modulates the shape of the ride itself. I envisioned something that started with one shape and morphed to another shape while spinning. I wanted to create&#8230;<\/p>\n","protected":false},"author":28,"featured_media":1055,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[92,16],"class_list":["post-1054","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-games-from-nothing","tag-transforms","tag-black-white-exercises","wpcat-5-id"],"_links":{"self":[{"href":"https:\/\/r6g.ad7.mwp.accessdomain.com\/index.php?rest_route=\/wp\/v2\/posts\/1054","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/r6g.ad7.mwp.accessdomain.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/r6g.ad7.mwp.accessdomain.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/r6g.ad7.mwp.accessdomain.com\/index.php?rest_route=\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/r6g.ad7.mwp.accessdomain.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1054"}],"version-history":[{"count":3,"href":"https:\/\/r6g.ad7.mwp.accessdomain.com\/index.php?rest_route=\/wp\/v2\/posts\/1054\/revisions"}],"predecessor-version":[{"id":13988,"href":"https:\/\/r6g.ad7.mwp.accessdomain.com\/index.php?rest_route=\/wp\/v2\/posts\/1054\/revisions\/13988"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/r6g.ad7.mwp.accessdomain.com\/index.php?rest_route=\/wp\/v2\/media\/1055"}],"wp:attachment":[{"href":"https:\/\/r6g.ad7.mwp.accessdomain.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1054"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/r6g.ad7.mwp.accessdomain.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1054"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/r6g.ad7.mwp.accessdomain.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1054"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}