{"id":73634,"date":"2022-10-01T23:24:44","date_gmt":"2022-10-02T03:24:44","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/?p=73634"},"modified":"2022-10-08T23:54:34","modified_gmt":"2022-10-09T03:54:34","slug":"project-5-wallpaper-9","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/10\/01\/project-5-wallpaper-9\/","title":{"rendered":"Project 5: 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>Red Textile Design <\/p>\n\n\n\n<p>The most challenging part of the project was getting the gradients and the for loops to work properly. <\/p>\n\n\n<div><a class=\"p5_sketch_link\" href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/10\/sketch-Copy.js\" data-width=\"570\" data-height=\"600\">sketch &ndash; Copy<\/a><iframe src=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/plugins\/p5-embedder\/p5_iframe.html\" class=\"p5_exampleFrame\" width=\"570\" height=\"600\"><\/iframe><pre class=\"language-javascript\"><code class=\"p5_editor language-javascript\">\/\/ Ana Furtado \n\/\/ Section E\n\/\/ Project 5 Textile\n\n\n\nfunction setup() {\n    createCanvas(570, 600);\n    background(255); \/\/ white background\n}\n\nfunction draw() {\n    noStroke();\n    fill(0,0,0);\n    rect(0,0,600,20);\n    fill(0,0,0);\n    rect(0,580,600,20);\n    long()\n    lines()\n    whitecircles()\n    whitecircles_1()\n    circles()\n    noLoop();\n}\n\n\nfunction long() { \/\/black to red to black ellipses \n    var red = 20\n\n    for (var y = 40; y &lt; 600; y += 40) {\n        if (y &lt;= 300){\n            red+=20\n        } if (y&gt;= 300) {\n            red -= 20;\n        } \n        for (var x = 0; x &lt; 600; x += 95*2) {\n            \/\/noStroke()\n            stroke(0);\n            strokeWeight(7);\n            fill(red, 0, 0);\n            ellipse(x,y,190,40);\n        }\n    }\n}\n\nfunction circles() { \/\/red to black to red circles and random red smaller circles\n    var red2 = 255\n    for (var y = 0; y &lt; 700; y += 40) {\n        if (y &lt;= 300){\n            red2-=35;\n        } if (y&gt;= 300) {\n            red2 += 35;\n        } \n        for (var x = 0; x &lt; 600; x += 95) {\n            stroke(0);\n            strokeWeight(1);\n            fill(red2, 0, 0);\n            circle(x, y, 30);\n            fill(random(0,255),0,0);\n            circle(x,y,15)\n        }\n    }\n\n}\n\nfunction whitecircles() { \/\/white inbetween circles \n    for (var y = 60; y &lt; 700; y += 40) {\n        for (var x = 50; x &lt; 600; x += 95) {\n            stroke(0);\n            strokeWeight(.75);\n            fill(255);\n            circle(x, y, 12);\n        }\n    }\n\n}\nfunction whitecircles_1() { \/\/row 1 white inbetween circles\n    for (var y = 20; y &lt; 60; y += 40) {\n        for (var x = 50; x &lt; 600; x += 95) {\n            stroke(0);\n            strokeWeight(.75);\n            fill(255);\n            circle(x, y, 12);\n        }\n    }\n\n}\nfunction lines() { \/\/white lines and thin black lines to make grid \n    for (var x = 50; x &lt; 600; x += 95) {\n        stroke(255);\n        strokeWeight(2);\n        line(x,0, x, 600);\n        stroke(0);\n        strokeWeight(.25);\n        line(x,0, x, 600);\n        for (var y=60; y&lt;600; y+=40){\n            \/\/stroke(255);\n            \/\/strokeWeight(2);\n            \/\/line(0,20,570,20);\n            \/\/line(0,y,570,y);\n            \/\/stroke(0);\n            \/\/strokeWeight(.25);\n            \/\/line(0,20,570,20);\n            \/\/line(0,y,570,y);\n        }\n    }\n}<\/code><\/pre><\/div><\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>Red Textile Design The most challenging part of the project was getting the gradients and the for loops to work properly. sketch &ndash; Copy \/\/ Ana Furtado \/\/ Section E \/\/ Project 5 Textile function setup() { createCanvas(570, 600); background(255); \/\/ white background } function draw() { noStroke(); fill(0,0,0); rect(0,0,600,20); fill(0,0,0); rect(0,580,600,20); long() lines() whitecircles() &hellip; <a href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/10\/01\/project-5-wallpaper-9\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Project 5: Wallpaper&#8221;<\/span><\/a><\/p>\n","protected":false},"author":749,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[104,121],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/73634"}],"collection":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/users\/749"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/comments?post=73634"}],"version-history":[{"count":1,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/73634\/revisions"}],"predecessor-version":[{"id":73638,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/73634\/revisions\/73638"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/media?parent=73634"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/categories?post=73634"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/tags?post=73634"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}