{"id":296,"date":"2021-09-03T15:40:28","date_gmt":"2021-09-03T19:40:28","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/60-428\/f2021\/?p=296"},"modified":"2021-09-03T15:40:28","modified_gmt":"2021-09-03T19:40:28","slug":"sweetcorn-molnarrecode","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/60-428\/f2021\/sweetcorn\/09\/03\/sweetcorn-molnarrecode\/","title":{"rendered":"sweetcorn &#8211; MolnarRecode"},"content":{"rendered":"<p>Assertions<br \/>\n1. The artwork is square<br \/>\n2. A grid of axis-aligned squares underlies the artwork<br \/>\n3. A rectangle can be created out of multiple squares<br \/>\n4. The squares used to create rectangles can be shared<br \/>\n5. Each rectangle can either be shaded, unshaded, or half-shaded along a diagonal<br \/>\n6. If a rectangle is half-shaded, its other half is unshaded<br \/>\n7. Equally spaced lines parallel to one of the rectangle\u2019s 2 diagonals create shading<br \/>\n8. The strokes are all of uniform weight and color<br \/>\n9. The number of lines per rectangle is variable<br \/>\n10. There are more shaded squares than unshaded squares<\/p>\n<p><a href=\"https:\/\/courses.ideate.cmu.edu\/60-428\/f2021\/wp-content\/uploads\/2021\/09\/plot.svg\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-medium wp-image-297\" src=\"https:\/\/courses.ideate.cmu.edu\/60-428\/f2021\/wp-content\/uploads\/2021\/09\/plot.svg\" alt=\"\" width=\"640\" height=\"480\" \/><\/a><img decoding=\"async\" loading=\"lazy\" class=\"alignnone wp-image-298 size-large\" src=\"https:\/\/courses.ideate.cmu.edu\/60-428\/f2021\/wp-content\/uploads\/2021\/09\/Screen-Shot-2021-09-03-at-3.22.17-PM-1024x1024.png\" alt=\"\" width=\"840\" height=\"840\" srcset=\"https:\/\/courses.ideate.cmu.edu\/60-428\/f2021\/wp-content\/uploads\/2021\/09\/Screen-Shot-2021-09-03-at-3.22.17-PM-1024x1024.png 1024w, https:\/\/courses.ideate.cmu.edu\/60-428\/f2021\/wp-content\/uploads\/2021\/09\/Screen-Shot-2021-09-03-at-3.22.17-PM-479x480.png 479w, https:\/\/courses.ideate.cmu.edu\/60-428\/f2021\/wp-content\/uploads\/2021\/09\/Screen-Shot-2021-09-03-at-3.22.17-PM-150x150.png 150w, https:\/\/courses.ideate.cmu.edu\/60-428\/f2021\/wp-content\/uploads\/2021\/09\/Screen-Shot-2021-09-03-at-3.22.17-PM-768x769.png 768w, https:\/\/courses.ideate.cmu.edu\/60-428\/f2021\/wp-content\/uploads\/2021\/09\/Screen-Shot-2021-09-03-at-3.22.17-PM-1200x1202.png 1200w, https:\/\/courses.ideate.cmu.edu\/60-428\/f2021\/wp-content\/uploads\/2021\/09\/Screen-Shot-2021-09-03-at-3.22.17-PM.png 1532w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>I&#8217;m not sure what it is exactly, but my recreation doesn&#8217;t have the same simplicity and elegance as Moln\u00e1r&#8217;s. I think I allow too much overlap, which makes the final a bit too busy. Moln\u00e1r has only a touch of overlap which isn&#8217;t too distracting. It was fun trying to imagine the underlying structure of Moln\u00e1r&#8217;s work, and to imagine the possibilities of future artwork with similar underlying structures as well.<\/p>\n<div>\n<pre>var numEdges = 50;\r\n\r\nfunction setup() {\r\n     createCanvas(816, 816, SVG).position((windowWidth-width)\/2, (windowHeight-height)\/2);\r\n\r\n     noSmooth();\r\n     noFill();\r\n     stroke(0);\r\n\r\n     var squares= [];\r\n     for(i=0; i&lt;numEdges; i++){\r\n          for(j=0; j&lt;numEdges; j++){\r\n               squares.push(new structure_square(i, j));\r\n          }\r\n     }\r\n\r\n     save(\"plot.svg\");\r\n}\r\n\r\nclass structure_square {\r\n     constructor(i, j) {\r\n          self.index_x=i;\r\n          self.index_y=j;\r\n          var spread_max=1;\r\n          var spread_n=ceil(random(spread_max));\r\n          var spread_s=ceil(random(spread_max));\r\n          var spread_e=ceil(random(spread_max));\r\n          var spread_w=ceil(random(spread_max));\r\n\r\n          if(j==0){\r\n               spread_n=0;\r\n          } else if(j == numEdges-1){\r\n               spread_s=0;\r\n          }\r\n\r\n         if(i==0){\r\n               spread_e=0;\r\n         } else if(i == numEdges-1){\r\n               spread_w=0;\r\n         }\r\n\r\n         newstructure_rectangle(i-spread_e, j-spread_n, i+spread_w, j+spread_s);\r\n     }\r\n}\r\n\r\nclass structure_rectangle {\r\n     constructor(i_0, j_0, i_1, j_1) {\r\n         let rect_w= (i_1-i_0) *width\/numEdges;\r\n         let rect_h= (j_1-j_0) *width\/numEdges;\r\n         let x_0=i_0*width\/numEdges;\r\n         let y_0=j_0*width\/numEdges;\r\n\r\n         stroke(0);\r\n         strokeWeight(0.5);\r\n\r\n         let max_shade_lines=12;\r\n         let num_shade_lines=ceil(random(max_shade_lines));\r\n         let h_space=rect_w\/num_shade_lines;\r\n         let v_space=rect_h\/num_shade_lines;\r\n\r\n         if(random() &lt;0.5){\r\n              if(random() &lt;0.25) {\r\n                   for(varline_num=0; line_num&lt;num_shade_lines; line_num++) {\r\n                        line(x_0+line_num*h_space, y_0, x_0+rect_w, y_0+rect_h-line_num*v_space);\r\n                   }\r\n              }\r\n         if(random() &lt;0.25) {\r\n              for(varline_num=0; line_num&lt;num_shade_lines; line_num++){\r\n                   line(x_0, y_0+line_num*v_space, x_0+rect_w-line_num*h_space, y_0+rect_h);\r\n              }\r\n         }\r\n       } else {\r\n         if(random() &lt;0.25) {\r\n              for(varline_num=0; line_num&lt;num_shade_lines; line_num++){\r\n                   line(x_0+line_num*h_space, y_0, x_0+rect_w, y_0-rect_h+line_num*v_space);\r\n              }\r\n         }\r\n         if(random() &lt;0.25) {\r\n              for(varline_num=0; line_num&lt;num_shade_lines; line_num++){\r\n                   line(x_0, y_0-line_num*v_space, x_0+rect_w-line_num*h_space, y_0-rect_h);\r\n              }\r\n         }\r\n       }\r\n     }\r\n}<\/pre>\n<\/div>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Assertions 1. The artwork is square 2. A grid of axis-aligned squares underlies the artwork 3. A rectangle can be created out of multiple squares 4. The squares used to create rectangles can be shared 5. Each rectangle can either be shaded, unshaded, or half-shaded along a diagonal 6. If a rectangle is half-shaded, its &hellip; <a href=\"https:\/\/courses.ideate.cmu.edu\/60-428\/f2021\/sweetcorn\/09\/03\/sweetcorn-molnarrecode\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;sweetcorn &#8211; MolnarRecode&#8221;<\/span><\/a><\/p>\n","protected":false},"author":6,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-428\/f2021\/wp-json\/wp\/v2\/posts\/296"}],"collection":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-428\/f2021\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-428\/f2021\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-428\/f2021\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-428\/f2021\/wp-json\/wp\/v2\/comments?post=296"}],"version-history":[{"count":6,"href":"https:\/\/courses.ideate.cmu.edu\/60-428\/f2021\/wp-json\/wp\/v2\/posts\/296\/revisions"}],"predecessor-version":[{"id":304,"href":"https:\/\/courses.ideate.cmu.edu\/60-428\/f2021\/wp-json\/wp\/v2\/posts\/296\/revisions\/304"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/60-428\/f2021\/wp-json\/wp\/v2\/media?parent=296"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-428\/f2021\/wp-json\/wp\/v2\/categories?post=296"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/60-428\/f2021\/wp-json\/wp\/v2\/tags?post=296"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}