{"id":40,"date":"2011-02-15T18:47:18","date_gmt":"2011-02-15T18:47:18","guid":{"rendered":"http:\/\/classes.visitsteve.com\/hacking\/?p=40"},"modified":"2011-02-15T18:47:18","modified_gmt":"2011-02-15T18:47:18","slug":"excercise-6-2","status":"publish","type":"post","link":"https:\/\/classes.visitsteve.com\/hacking\/excercise-6-2\/","title":{"rendered":"Excercise 6 &#8211; 2"},"content":{"rendered":"<p>Using a FOR Loop to draw a series of lines<\/p>\n<p><script type=\"application\/processing\">\r\n\/\/Info: http:\/\/processingjs.org\/reference\r\nsize(200,200); \r\nbackground(255);\r\n\r\nfor (int y = 0; y <= height; y+=10) \r\n    \/\/ this for loop initialized y as 0\r\n    \/\/ and as long as y is less than or equal to the height\r\n    \/\/ it increments y by 10 pixels on each cycle through the \"for\" loop\r\n       { \r\n       stroke(0); \/\/ set stroke to black\r\n       line(0,y,width,y); \/\/ make a line that is the width of the canvas\r\n       print(\"cycle \"); \/\/ print cycle below so we can see what's happening\r\n    } \/\/ end of \"for\" loop, then go and cycle again until the conditions change\r\n<\/script><\/p>\n<h2>code<\/h2>\n<p><code><br \/>\nsize(200,200);<br \/>\nbackground(255);<\/p>\n<p>for (int y = 0; y <= height; y+=10) \n    \/\/ this for loop initialized y as 0\n    \/\/ and as long as y is less than or equal to the height\n    \/\/ it increments y by 10 pixels on each cycle through the \"for\" loop\n       { \n       stroke(0); \/\/ set stroke to black\n       line(0,y,width,y); \/\/ make a line that is the width of the canvas\n       print(\"cycle \"); \/\/ print cycle below so we can see what's happening\n    } \/\/ end of \"for\" loop, then go and cycle again until the conditions change\n\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Using a FOR Loop to draw a series of lines code size(200,200); background(255); for (int y = 0; y<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-40","post","type-post","status-publish","format-standard","hentry","category-classnews"],"_links":{"self":[{"href":"https:\/\/classes.visitsteve.com\/hacking\/wp-json\/wp\/v2\/posts\/40","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/classes.visitsteve.com\/hacking\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/classes.visitsteve.com\/hacking\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/classes.visitsteve.com\/hacking\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/classes.visitsteve.com\/hacking\/wp-json\/wp\/v2\/comments?post=40"}],"version-history":[{"count":0,"href":"https:\/\/classes.visitsteve.com\/hacking\/wp-json\/wp\/v2\/posts\/40\/revisions"}],"wp:attachment":[{"href":"https:\/\/classes.visitsteve.com\/hacking\/wp-json\/wp\/v2\/media?parent=40"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/classes.visitsteve.com\/hacking\/wp-json\/wp\/v2\/categories?post=40"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/classes.visitsteve.com\/hacking\/wp-json\/wp\/v2\/tags?post=40"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}