{"id":2183,"date":"2024-02-10T10:22:00","date_gmt":"2024-02-10T15:22:00","guid":{"rendered":"https:\/\/brickisland.net\/DDGSpring2024\/?p=2183"},"modified":"2024-02-10T10:22:52","modified_gmt":"2024-02-10T15:22:52","slug":"assignment-1-coding-exterior-calculus-due-2-28","status":"publish","type":"post","link":"https:\/\/brickisland.net\/DDGSpring2024\/2024\/02\/10\/assignment-1-coding-exterior-calculus-due-2-28\/","title":{"rendered":"Assignment 1 (Coding): Exterior Calculus (Due 2\/22)"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" 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>EDIT:\u00a0<\/em>You can compute the ratio of dual edge lengths to primal edge lengths using the\u00a0<em>cotan formula<\/em>, which can be found on Slide 28 of the\u00a0<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\u2019t have to do the exercise for this homework).<\/p>\n<p><b>Submission Instructions<\/b><\/p>\n<p>Please submit your\u00a0<tt>geometry.[js|cpp]<\/tt>\u00a0and\u00a0<tt>discrete-exterior-calculus.[js|cpp]<\/tt>\u00a0files 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 the date listed on the calendar, at\u00a0<strong>5:59:59pm Eastern<\/strong>\u00a0(<em>not<\/em>\u00a0at midnight!). Further hand-in instructions can be found on\u00a0<a href=\"http:\/\/brickisland.net\/DDGSpring2024\/assignments\/\">this page<\/a>.<\/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\/DDGSpring2024\/2024\/02\/10\/assignment-1-coding-exterior-calculus-due-2-28\/\" 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":{"inline_featured_image":false,"footnotes":"","_links_to":"","_links_to_target":""},"categories":[4],"tags":[],"_links":{"self":[{"href":"https:\/\/brickisland.net\/DDGSpring2024\/wp-json\/wp\/v2\/posts\/2183"}],"collection":[{"href":"https:\/\/brickisland.net\/DDGSpring2024\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/brickisland.net\/DDGSpring2024\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/brickisland.net\/DDGSpring2024\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/brickisland.net\/DDGSpring2024\/wp-json\/wp\/v2\/comments?post=2183"}],"version-history":[{"count":11,"href":"https:\/\/brickisland.net\/DDGSpring2024\/wp-json\/wp\/v2\/posts\/2183\/revisions"}],"predecessor-version":[{"id":2253,"href":"https:\/\/brickisland.net\/DDGSpring2024\/wp-json\/wp\/v2\/posts\/2183\/revisions\/2253"}],"wp:attachment":[{"href":"https:\/\/brickisland.net\/DDGSpring2024\/wp-json\/wp\/v2\/media?parent=2183"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/brickisland.net\/DDGSpring2024\/wp-json\/wp\/v2\/categories?post=2183"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/brickisland.net\/DDGSpring2024\/wp-json\/wp\/v2\/tags?post=2183"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}