{"id":19557,"date":"2018-01-17T23:43:51","date_gmt":"2018-01-18T04:43:51","guid":{"rendered":"http:\/\/blog.kenperlin.com\/?p=19557"},"modified":"2018-01-17T23:44:49","modified_gmt":"2018-01-18T04:44:49","slug":"cg-programming-for-non-programmers-lesson-15","status":"publish","type":"post","link":"http:\/\/blog.kenperlin.com\/?p=19557","title":{"rendered":"CG programming for non-programmers, lesson 15"},"content":{"rendered":"<p>In lesson 15 we learn about the <code>for<\/code> loop.<\/p>\n<p>Sometimes you just want to do a variation on something five times, or ten times, or fifty times.  The <code>for<\/code> loop lets you do things multiple times.  For example, the following code:<\/p>\n<pre>\r\n\r\n   for (int i = 0 ; i < 6 ; i++) {\r\n      ...\r\n   }\r\n\r\n<\/pre>\n<p>lets you do something six times, depending on what you put inside the loop.  The value of <code>i<\/code> can be used to change how you do it each time.<\/p>\n<p>Today we use the <code>for<\/code> loop to make six disks that circle around each other in a cool animated pattern.<\/p>\n<p>You can see this lesson by <a href=http:\/\/mrl.nyu.edu\/~perlin\/cg\/lesson15>CLICKING HERE<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In lesson 15 we learn about the for loop. Sometimes you just want to do a variation on something five times, or ten times, or fifty times. The for loop lets you do things multiple times. For example, the following code: for (int i = 0 ; i < 6 ; i++) { ... } &hellip; <a href=\"http:\/\/blog.kenperlin.com\/?p=19557\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;CG programming for non-programmers, lesson 15&#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\/19557"}],"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=19557"}],"version-history":[{"count":3,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts\/19557\/revisions"}],"predecessor-version":[{"id":19560,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=\/wp\/v2\/posts\/19557\/revisions\/19560"}],"wp:attachment":[{"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=19557"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=19557"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.kenperlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=19557"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}