{"id":71940,"date":"2022-09-16T18:04:56","date_gmt":"2022-09-16T22:04:56","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/?p=71940"},"modified":"2022-09-16T18:04:56","modified_gmt":"2022-09-16T22:04:56","slug":"project-03-alexia-forsyth","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/09\/16\/project-03-alexia-forsyth\/","title":{"rendered":"Project 03: Alexia Forsyth"},"content":{"rendered":"<!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD HTML 4.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/REC-html40\/loose.dtd\">\n<html><body><div class=\"wp-block-file\"><a class=\"p5_sketch_link\" data-width=\"400\" data-height=\"400\" id=\"wp-block-file--media-7f76cf16-b5ec-4470-8e00-44d859917a04\" href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/09\/sketch-267.js\">sketch<\/a><iframe src=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/plugins\/p5-embedder\/p5_iframe.html\" class=\"p5_exampleFrame\" width=\"400\" height=\"400\"><\/iframe><pre class=\"language-javascript\"><code class=\"p5_editor language-javascript\">\/\/Alexia Forsyth\n\/\/aforsyth\n\/\/Section A\n\nvar hVelocity = 50;\nvar vVelocity = 50;\n\nvar w = 50;\nvar h = w * .8;\n\nvar count = 0;\n\nvar drawing = true;\n\nr = 20;\ng = 100;\nb = 120;\n\nfunction setup() {\n    createCanvas(400, 400);\n    background(220);\n}\n\nfunction draw() {\n\tif (drawing == true){\n\tprint(\"Move your mouse to draw...\")\n\tprint(count);\n\n\tif (count == 50 || count == 100 || count == 150 || count == 200){\n\t\tw = 70;\n\t\tr = random(5,50);\n\t\tg = random(50,200);\n\t\tb = random(50,220);\n\t}\n\telse if (count == 300){\n\t\tdrawing = false;\n\t}\n\n\tif (random(3) &lt;= 1){\n\t\tfill(r, g, b);\n\t}\n\telse if (random(3) &gt; 1 & random(3) < 2){\n\t\tfill(r+(.88*r), g+(.33*g), b+(.26*b));\n\t}\n\telse{\n\t\tfill(r+(3*r), g+(.59*g), b+(.37*b));\n\t}\n\n\tellipse(mouseX,mouseY, w, h);\n\n\tif(mouseX &gt;= width || mouseY &gt;= height || mouseY &lt;= 0 || mouseX &lt;= 0){\n\t\thVelocity = -hVelocity;\n\t\tvVelocity = -vVelocity;\n\t\tcount += 1;\n\t}\n\t\n}\nelse{\n\tprint(\"Stop\");\n}\n\n}\n<\/code><\/pre><\/div>\n\n\n\n<p>Some of my examples:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" src=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/09\/03-project-pic2.png\" alt=\"\" class=\"wp-image-71945\" width=\"350\" height=\"338\" srcset=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/09\/03-project-pic2.png 655w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/09\/03-project-pic2-300x290.png 300w\" sizes=\"(max-width: 350px) 85vw, 350px\"><\/figure><figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" src=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/09\/03-project-pic.png\" alt=\"\" class=\"wp-image-71946\" width=\"261\" height=\"260\" srcset=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/09\/03-project-pic.png 618w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/09\/03-project-pic-300x300.png 300w, https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-content\/uploads\/2022\/09\/03-project-pic-150x150.png 150w\" sizes=\"(max-width: 261px) 85vw, 261px\"><\/figure><\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>sketch \/\/Alexia Forsyth \/\/aforsyth \/\/Section A var hVelocity = 50; var vVelocity = 50; var w = 50; var h = w * .8; var count = 0; var drawing = true; r = 20; g = 100; b = 120; function setup() { createCanvas(400, 400); background(220); } function draw() { if (drawing == true){ &hellip; <a href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/2022\/09\/16\/project-03-alexia-forsyth\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Project 03: Alexia Forsyth&#8221;<\/span><\/a><\/p>\n","protected":false},"author":718,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/71940"}],"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\/718"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/comments?post=71940"}],"version-history":[{"count":3,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/71940\/revisions"}],"predecessor-version":[{"id":71948,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/posts\/71940\/revisions\/71948"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/media?parent=71940"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/categories?post=71940"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2022\/wp-json\/wp\/v2\/tags?post=71940"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}