{"id":66063,"date":"2021-09-18T21:14:18","date_gmt":"2021-09-19T01:14:18","guid":{"rendered":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/?p=66063"},"modified":"2021-09-18T21:15:36","modified_gmt":"2021-09-19T01:15:36","slug":"project-03-dynamic-drawing-6","status":"publish","type":"post","link":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/2021\/09\/18\/project-03-dynamic-drawing-6\/","title":{"rendered":"Project-03-Dynamic-Drawing"},"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\" href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/uploads\/2021\/09\/sketch-140.js\">sketch<\/a><iframe src=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-content\/plugins\/p5-embedder\/p5_iframe.html\" class=\"p5_exampleFrame\" width=\"\" height=\"\"><\/iframe><pre class=\"language-javascript\"><code class=\"p5_editor language-javascript\">\/\/Nami Numoto\n\/\/Section A\n\n\nfunction setup() {\n    createCanvas(600, 450);\n    background(0);\n}\n\nfunction draw() {\n    background(0); \/\/ initialize background\n    fill(255, 255, 0); \/\/ yellow\n    var m = max(min(mouseX, 600), 0); \/\/restrict x to the canvas (600)\n    var size = m * 350.0 \/ 400.0; \/\/ manipulate sizes of the circles\n    ellipse(mouseX, mouseY, size, size); \/\/yellow dot that follows mouse\n    fill(0, 0, 255); \/\/ blue\n    size = 400 - size;\n    ellipse((width - mouseX), (height - mouseY), size, size); \/\/blue dot that follows mouse inversely sort of\n}\n\n\/\/ everything the mouse 'draws' or hovers (yellow dot) should be mirrored about the y axis by the blue dot\n\/\/ make them change size contrarily<\/code><\/pre><\/div>\n\n\n\n<p>I wanted to go off of the example while keeping it original. I&rsquo;ve always been intrigued by mirror images and reflections, so I decided to reflect the user&rsquo;s mouse trails about the y-axis and practice using contrary sizing.<\/p>\n\n\n\n<p>I&rsquo;ve noticed that the blue ellipse is not showing up, although it works in my index.html file&hellip; trying to work that out still<\/p><\/body><\/html>\n","protected":false},"excerpt":{"rendered":"<p>sketch \/\/Nami Numoto \/\/Section A function setup() { createCanvas(600, 450); background(0); } function draw() { background(0); \/\/ initialize background fill(255, 255, 0); \/\/ yellow var m = max(min(mouseX, 600), 0); \/\/restrict x to the canvas (600) var size = m * 350.0 \/ 400.0; \/\/ manipulate sizes of the circles ellipse(mouseX, mouseY, size, size); \/\/yellow &hellip; <a href=\"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/2021\/09\/18\/project-03-dynamic-drawing-6\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Project-03-Dynamic-Drawing&#8221;<\/span><\/a><\/p>\n","protected":false},"author":663,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[100,55],"tags":[],"_links":{"self":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/posts\/66063"}],"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\/663"}],"replies":[{"embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/comments?post=66063"}],"version-history":[{"count":2,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/posts\/66063\/revisions"}],"predecessor-version":[{"id":66066,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/posts\/66063\/revisions\/66066"}],"wp:attachment":[{"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/media?parent=66063"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/categories?post=66063"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/courses.ideate.cmu.edu\/15-104\/f2021\/wp-json\/wp\/v2\/tags?post=66063"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}