{"id":2408,"date":"2022-02-03T01:05:02","date_gmt":"2022-02-03T06:05:02","guid":{"rendered":"http:\/\/brickisland.net\/DDGSpring2022\/?p=2408"},"modified":"2022-01-17T16:29:23","modified_gmt":"2022-01-17T21:29:23","slug":"assignment-1-coding-exterior-calculus","status":"publish","type":"post","link":"https:\/\/brickisland.net\/DDGSpring2022\/2022\/02\/03\/assignment-1-coding-exterior-calculus\/","title":{"rendered":"Assignment 1 (Coding): Exterior Calculus (due 2\/22)"},"content":{"rendered":"<p><img loading=\"lazy\" class=\"aligncenter size-large\" src=\"http:\/\/brickisland.net\/DDGFall2017\/wp-content\/uploads\/2017\/09\/CMU_DDG_FA17_A1_Coding_icon.jpg\" width=\"500\" height=\"390\" \/><\/p>\n<p>For the coding portion of your first assignment, you will implement the discrete exterior calculus (DEC) operators $\\star_0, \\star_1, \\star_2, d_0$ and $d_1$. Once implemented, you will be able to apply these operators to a scalar function (as depicted above) by pressing the \u201c$\\star$\u201d and \u201c$d$\u201d button in the viewer. The diagram shown above will be updated to indicate what kind of differential <em>k<\/em>-form is currently displayed. These basic operations will be the starting point for many of the algorithms we will implement throughout the rest of the class; the visualization (and implementation!) should help you build further intuition about what these operators mean and how they work<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Getting Started<\/strong><\/span><\/p>\n<ul>\n<li>For this assignment, you need to implement the following routines:\n<ol type=\"1\">\n<li>in <tt>core\/geometry.[js|cpp]<\/tt>\n<ol type=\"a\">\n<li><tt>cotan<\/tt><\/li>\n<li><tt>barycentricDualArea<\/tt><\/li>\n<\/ol>\n<\/li>\n<li>in <tt>core\/discrete-exterior-calculus.[js|cpp]<\/tt>\n<ol type=\"a\">\n<li><tt>buildHodgeStar0Form<\/tt><\/li>\n<li><tt>buildHodgeStar1Form<\/tt><\/li>\n<li><tt>buildHodgeStar2Form<\/tt><\/li>\n<li><tt>buildExteriorDerivative0Form<\/tt><\/li>\n<li><tt>buildExteriorDerivative1Form<\/tt><\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n<p>In practice, a simple and efficient way to compute the cotangent of the angle $\\theta$ between two vectors $u$ and $v$ is to use the cross product and the dot product rather than calling any trigonometric functions directly; we ask that you implement your solution this way. (<b>Hint<\/b>: how are the dot and cross product of two vectors related to the cosine and sine of the angle between them?)<\/p>\n<p>In case we have not yet covered it in class, the <i>barycentric dual area<\/i> associated with a vertex $i$ is equal to one-third the area of all triangles $ijk$ touching $i$.<\/p>\n<p><em><span style=\"text-decoration: underline;\">EDIT: <\/span><\/em> You can compute the ratio of dual edge lengths to primal edge lengths using the <em>cotan formula<\/em>, which can be found on Slide 28 of the <a href=\"http:\/\/brickisland.net\/DDGSpring2019\/wp-content\/uploads\/2019\/02\/DDG_458_SP19_Lecture09_DiscreteExteriorCalculus.pdf\">Discrete Exterior Calculus lecture<\/a>, or in exercise 36 of the notes (you don&#8217;t have to do the exercise for this homework).<\/p>\n<p><span style=\"text-decoration: underline;\"><b>Submission Instructions<\/b><\/span><\/p>\n<p>Please submit your <tt>geometry.[js|cpp]<\/tt> and <tt>discrete-exterior-calculus.[js|cpp]<\/tt> files to Gradescope.\u00a0 You should not submit any other source files (and therefore, should not edit any other source files to get your code working!).<\/p>\n<p>The assignment is due on <strong>February 22, 2022 at 5:59:59pm Eastern<\/strong> (<em>not<\/em> at midnight!).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For the coding portion of your first assignment, you will implement the discrete exterior calculus (DEC) operators $\\star_0, \\star_1, \\star_2, d_0$ and $d_1$. Once implemented, you will be able to apply these operators to a scalar function (as depicted above) by pressing the \u201c$\\star$\u201d and \u201c$d$\u201d button in the viewer. The diagram shown above will &hellip; <a href=\"https:\/\/brickisland.net\/DDGSpring2022\/2022\/02\/03\/assignment-1-coding-exterior-calculus\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Assignment 1 (Coding): Exterior Calculus (due 2\/22)&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_links_to":"","_links_to_target":""},"categories":[4],"tags":[],"_links":{"self":[{"href":"https:\/\/brickisland.net\/DDGSpring2022\/wp-json\/wp\/v2\/posts\/2408"}],"collection":[{"href":"https:\/\/brickisland.net\/DDGSpring2022\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/brickisland.net\/DDGSpring2022\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/brickisland.net\/DDGSpring2022\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/brickisland.net\/DDGSpring2022\/wp-json\/wp\/v2\/comments?post=2408"}],"version-history":[{"count":4,"href":"https:\/\/brickisland.net\/DDGSpring2022\/wp-json\/wp\/v2\/posts\/2408\/revisions"}],"predecessor-version":[{"id":3391,"href":"https:\/\/brickisland.net\/DDGSpring2022\/wp-json\/wp\/v2\/posts\/2408\/revisions\/3391"}],"wp:attachment":[{"href":"https:\/\/brickisland.net\/DDGSpring2022\/wp-json\/wp\/v2\/media?parent=2408"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/brickisland.net\/DDGSpring2022\/wp-json\/wp\/v2\/categories?post=2408"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/brickisland.net\/DDGSpring2022\/wp-json\/wp\/v2\/tags?post=2408"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}