{"id":519,"date":"2018-09-18T19:18:18","date_gmt":"2018-09-18T19:18:18","guid":{"rendered":"https:\/\/www.courses.tegabrain.com\/cc18\/?p=519"},"modified":"2018-09-19T15:58:26","modified_gmt":"2018-09-19T15:58:26","slug":"variable-face-project","status":"publish","type":"post","link":"https:\/\/www.courses.tegabrain.com\/cc18\/2018\/09\/18\/variable-face-project\/","title":{"rendered":"Variable Face Project"},"content":{"rendered":"<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"529\" data-permalink=\"https:\/\/www.courses.tegabrain.com\/cc18\/2018\/09\/18\/variable-face-project\/puppy2\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.courses.tegabrain.com\/cc18\/wp-content\/uploads\/2018\/09\/puppy2.png?fit=809%2C714&amp;ssl=1\" data-orig-size=\"809,714\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"puppy2\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.courses.tegabrain.com\/cc18\/wp-content\/uploads\/2018\/09\/puppy2.png?fit=300%2C265&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.courses.tegabrain.com\/cc18\/wp-content\/uploads\/2018\/09\/puppy2.png?fit=809%2C714&amp;ssl=1\" class=\" wp-image-529 aligncenter\" src=\"https:\/\/i0.wp.com\/www.courses.tegabrain.com\/cc18\/wp-content\/uploads\/2018\/09\/puppy2.png?resize=202%2C180&#038;ssl=1\" alt=\"\" width=\"202\" height=\"180\" \/><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"528\" data-permalink=\"https:\/\/www.courses.tegabrain.com\/cc18\/2018\/09\/18\/variable-face-project\/puppymoving4\/\" data-orig-file=\"https:\/\/i0.wp.com\/www.courses.tegabrain.com\/cc18\/wp-content\/uploads\/2018\/09\/PuppyMoving4.gif?fit=1016%2C757&amp;ssl=1\" data-orig-size=\"1016,757\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"PuppyMoving4\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/www.courses.tegabrain.com\/cc18\/wp-content\/uploads\/2018\/09\/PuppyMoving4.gif?fit=300%2C224&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/www.courses.tegabrain.com\/cc18\/wp-content\/uploads\/2018\/09\/PuppyMoving4.gif?fit=1016%2C757&amp;ssl=1\" class=\" wp-image-528 aligncenter\" src=\"https:\/\/i0.wp.com\/www.courses.tegabrain.com\/cc18\/wp-content\/uploads\/2018\/09\/PuppyMoving4.gif?resize=269%2C200&#038;ssl=1\" alt=\"\" width=\"269\" height=\"200\" \/><\/p>\n<p>For the variable face project, I took my portrait of a dog and simplified it in code (it used to have a body). When the mouse is pressed, the dog&#8217;s ears &#8220;move&#8221; and the dog itself is colored by the shades of a randomly selected color. The dog is also going to have a random mouth from 3 options: a closed mouth, an open mouth, or have it&#8217;s tongue sticking out. The sizes of its nose, mouth, and tongue is also random with each click. The placement of the dog&#8217;s eyes and nose will be random somewhere on the top part of the dog&#8217;s face. While working on the project, I had difficulty with showing off the different mouths the dog could have. When the mouse was clicked, the dog would show a mouth, but only for a fraction of a second before &#8220;erasing&#8221; it. This issue was solved when I moved the if statements relating to the mouths into draw() instead of mousePressed().<\/p>\n<p>Link to project: <a href=\"https:\/\/www.openprocessing.org\/sketch\/590649\">https:\/\/www.openprocessing.org\/sketch\/590649<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>For the variable face project, I took my portrait of a dog and simplified it in code (it used to have a body). When the mouse is pressed, the dog&#8217;s ears &#8220;move&#8221; and the dog itself is colored by the shades of a randomly selected color. The dog is also going to have a random<a class=\"more-link button\" href=\"https:\/\/www.courses.tegabrain.com\/cc18\/2018\/09\/18\/variable-face-project\/\">Read More<\/a><\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-519","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/paeb9f-8n","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/www.courses.tegabrain.com\/cc18\/wp-json\/wp\/v2\/posts\/519","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.courses.tegabrain.com\/cc18\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.courses.tegabrain.com\/cc18\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.courses.tegabrain.com\/cc18\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.courses.tegabrain.com\/cc18\/wp-json\/wp\/v2\/comments?post=519"}],"version-history":[{"count":7,"href":"https:\/\/www.courses.tegabrain.com\/cc18\/wp-json\/wp\/v2\/posts\/519\/revisions"}],"predecessor-version":[{"id":527,"href":"https:\/\/www.courses.tegabrain.com\/cc18\/wp-json\/wp\/v2\/posts\/519\/revisions\/527"}],"wp:attachment":[{"href":"https:\/\/www.courses.tegabrain.com\/cc18\/wp-json\/wp\/v2\/media?parent=519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.courses.tegabrain.com\/cc18\/wp-json\/wp\/v2\/categories?post=519"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.courses.tegabrain.com\/cc18\/wp-json\/wp\/v2\/tags?post=519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}