{"id":66795,"date":"2021-10-01T11:41:05","date_gmt":"2021-10-01T15:41:05","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/?p=66795"},"modified":"2021-10-01T11:41:05","modified_gmt":"2021-10-01T15:41:05","slug":"project-05-wallpaper-3","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/2021\/10\/01\/project-05-wallpaper-3\/","title":{"rendered":"Project 05: Wallpaper"},"content":{"rendered":"<!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/REC-html40\/loose.dtd\">\n<html><body><p>Emilio Bustamante <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" src=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/10\/pattern-2.png\" alt=\"\" class=\"wp-image-66796\" width=\"395\" height=\"395\" srcset=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/10\/pattern-2.png 800w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/10\/pattern-2-300x300.png 300w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/10\/pattern-2-150x150.png 150w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/10\/pattern-2-768x768.png 768w\" sizes=\"(max-width: 395px) 85vw, 395px\"><\/figure><\/div>\n\n\n\n<p>This wallpaper uses patterns inspired from Muslim culture. My main objective was to try to draw the least amount of lines to create the wallpaper. I noticed that if I rotated and repeated the shape shown below 4 times it would create the  pattern  I wanted without drawing much lines. After that I just repeated and translated the groups of lines four times. The initial group of lines drawn would be repeated 16 times. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/10\/pattern-1024x1024.jpg\" alt=\"\" class=\"wp-image-66797\" width=\"398\" height=\"398\" srcset=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/10\/pattern-1024x1024.jpg 1024w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/10\/pattern-300x300.jpg 300w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/10\/pattern-150x150.jpg 150w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/10\/pattern-768x768.jpg 768w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/10\/pattern-1536x1536.jpg 1536w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/10\/pattern-2048x2048.jpg 2048w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/10\/pattern-1200x1200.jpg 1200w\" sizes=\"(max-width: 398px) 85vw, 398px\"><\/figure><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>function setup() {\r\n  createCanvas(400, 400); \r\n} \r\nfunction draw() {\r\n  background(204); \r\n\/\/top left\r\n  pattern2(50, 50);\r\n\/\/top right\r\n  translate(-50,150)\r\n  pattern2(0,0)\r\n\/\/bottom right\r\n  translate(-50,-250)\r\n  pattern2(0,0)\r\n\/\/bottom left\r\n  translate(-50,150)\r\n  pattern2(0,0)\r\n}\r\nfunction pattern2(x,y){\r\n\/\/top left\r\n  pattern1(50,50) \r\n\/\/top right\r\n  rotate(radians(90));\r\n  rectMode(CENTER);\r\n  pattern1(0,-100)\r\n\/\/bottom right\r\n  rotate(radians(90));\r\n  rectMode(CENTER);\r\n  pattern1(0,-100)\r\n\/\/bottom left\r\n  rotate(radians(90));\r\n  rectMode(CENTER);\r\n  pattern1(0,-100)\r\n}\r\n\r\nfunction pattern1(x, y) {  \r\n  translate(x, y); \r\n  stroke(0); \r\n  strokeWeight(1);\r\n\/\/line 1\r\n  line(50,-33.3,26.5,-40);\r\n  line(26.5,-40,-4.5,-9);\r\n  line(-4.5,-9,-45, -33.3);\r\n  line(-45, -33.3,-50,-25);\r\n  line(-50,-25, -33.3, 7.5);\r\n  line(-33.3, 7.5, 33.3, -7.5);\r\n  line(33.3, -7.5,50,26);\r\n  line(50,26,45,33.3);\r\n  line(45,33.3,4.5,9);\r\n  line(4.5,9,-26.5,40);\r\n  line(-26.5,40,-50,33.3);\r\n\/\/line 2\r\n  line(33.3,-50,40,-26.5);\r\n  line(40,-26.5,9,4.5);\r\n  line(9,4.5,33.3,45.5);\r\n  line(33.3,45.5,26.5,50);\r\n  line(26.5,50, -7.5, 33.3);\r\n  line(-7.5, 33.3, 7.5, -33.3);\r\n  line(7.5, -33.3,-26,-50);\r\n  line(-26.5,-50,-33.3,-45.5);\r\n  line(-33.3,-45.5,-9,-4.5);\r\n  line(-9,-4.5,-40,26.5);\r\n  line(-40,26.5,-33.3,50);\r\n\/\/line 3\r\n  line(-37.5,-37.5,-36.5,10);\r\n  line(-36.5,10,-50,13.3);\r\n  line(-50,13.3,-20,20);\r\n  line(-20,20,-13.3,50);\r\n  line(-13.3,50,-10,36.5);\r\n  line(-10,36.5,37.5,37.5);\r\n  line(37.5,37.5,36.5,-10);\r\n  line(36.5,-10,50,-13.3);\r\n  line(50,-13.3,20,-20);\r\n  line(20,-20,13.3,-50);\r\n  line(13.3,-50,10,-36.5);\r\n  line(10,-36.5,-37.5,-37.5);\r\n}<\/code><\/pre><\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>Emilio Bustamante This wallpaper uses patterns inspired from Muslim culture. My main objective was to try to draw the least amount of lines to create the wallpaper. I noticed that if I rotated and repeated the shape shown below 4 times it would create the pattern I wanted without drawing much lines. After that I &hellip; <a href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/2021\/10\/01\/project-05-wallpaper-3\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Project 05: Wallpaper&#8221;<\/span><\/a><\/p>\n","protected":false},"author":641,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[104,58],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/posts\/66795"}],"collection":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/users\/641"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/comments?post=66795"}],"version-history":[{"count":1,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/posts\/66795\/revisions"}],"predecessor-version":[{"id":66798,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/posts\/66795\/revisions\/66798"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/media?parent=66795"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/categories?post=66795"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/tags?post=66795"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}