{"id":19536,"date":"2018-01-12T22:07:58","date_gmt":"2018-01-13T03:07:58","guid":{"rendered":"http:\/\/blog.kenperlin.com\/?p=19536"},"modified":"2018-01-12T22:07:58","modified_gmt":"2018-01-13T03:07:58","slug":"cg-programming-for-non-programmers-lesson-10","status":"publish","type":"post","link":"http:\/\/blog.kenperlin.com\/?p=19536","title":{"rendered":"CG programming for non-programmers, lesson 10"},"content":{"rendered":"<p>Today we are going to start making shapes &#8212; using a little high school math.<\/p>\n<p>You probably learned in high school that the radius squared (r<sup>2<\/sup>) of a circle is x*x + y*y.  That means we can use the expression x*x + y*y to measure the distance squared from the center of the image (that&#8217;s the place where both x and y are zero).<\/p>\n<p>If we then apply our handy dandy step function, we get a disk shape.<\/p>\n<p>Everything inside the disk is where r<sup>2<\/sup> is less than our cutoff value.  Everything outside our disk is where r<sup>2<\/sup> is greater than that cutoff value.<\/p>\n<p>And that is exactly what we do in lesson 10.<\/p>\n<p>You can see this lesson by <a href=http:\/\/mrl.nyu.edu\/~perlin\/cg\/lesson10>CLICKING HERE<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today we are going to start making shapes &#8212; using a little high school math. You probably learned in high school that the radius squared (r2) of a circle is x*x + y*y. That means we can use the expression x*x + y*y to measure the distance squared from the center of the image (that&#8217;s &hellip; <a href=\"http:\/\/blog.kenperlin.com\/?p=19536\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;CG programming for non-programmers, lesson 10&#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\/19536"}],"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=19536"}],"version-history":[{"count":1,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts\/19536\/revisions"}],"predecessor-version":[{"id":19537,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts\/19536\/revisions\/19537"}],"wp:attachment":[{"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=19536"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=19536"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=19536"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}