{"id":1467,"date":"2024-01-25T03:02:00","date_gmt":"2024-01-25T08:02:00","guid":{"rendered":"http:\/\/brickisland.net\/DDGSpring2024\/?p=1467"},"modified":"2024-01-25T11:19:02","modified_gmt":"2024-01-25T16:19:02","slug":"a0-coding-combinatorial-surfaces","status":"publish","type":"post","link":"https:\/\/brickisland.net\/DDGSpring2024\/2024\/01\/25\/a0-coding-combinatorial-surfaces\/","title":{"rendered":"Assignment 0 (Coding): Combinatorial Surfaces"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1473\" src=\"http:\/\/brickisland.net\/DDGSpring2022\/wp-content\/uploads\/2019\/01\/CMU_DDG_Spring2019_A0_CombinatorialSurfaces_GUI-1.jpg\" alt=\"\" width=\"450\" height=\"460\" srcset=\"https:\/\/brickisland.net\/DDGSpring2024\/wp-content\/uploads\/2019\/01\/CMU_DDG_Spring2019_A0_CombinatorialSurfaces_GUI-1.jpg 900w, https:\/\/brickisland.net\/DDGSpring2024\/wp-content\/uploads\/2019\/01\/CMU_DDG_Spring2019_A0_CombinatorialSurfaces_GUI-1-294x300.jpg 294w, https:\/\/brickisland.net\/DDGSpring2024\/wp-content\/uploads\/2019\/01\/CMU_DDG_Spring2019_A0_CombinatorialSurfaces_GUI-1-768x784.jpg 768w\" sizes=\"(max-width: 450px) 85vw, 450px\" \/><\/p>\n<p>For the coding portion of your first assignment, you will implement some operations on simplicial complexes which were discussed in class and in Chapter 2 of the <a href=\"http:\/\/www.cs.cmu.edu\/~kmcrane\/Projects\/DDG\/paper.pdf\">course notes<\/a>. Once implemented, you will be able to select simplices and apply these operations to them by clicking the appropriate buttons in the viewer (shown above).<\/p>\n<p><b><u>Getting Started<\/u><\/b><\/p>\n<ul>\n<li>Decide whether you want to use the web skeleton (in JavaScript) or the desktop skeleton (in C++). The web skeleton should &#8220;just work&#8221; for anyone with a web browser. Setting up the C++ skeleton is also fairly automatic (just a few <tt>git<\/tt> commands), but requires a little more familiarity with coding environments. (The benefit of the C++ version is that it&#8217;s built on a richer, real-world mesh processing\/visualization library than the web version.)<\/li>\n<li>To use the JavaScript version, download or clone the files in the <a href=\"https:\/\/github.com\/cmu-geometry\/ddg-exercises-js\">ddg-exercises-js repository<\/a>.<\/li>\n<li>To use the C++ version, follow the instructions in the <a href=\"http:\/\/github.com\/geometrycollective\/ddg-exercises\">ddg-exercises repository<\/a>. <b>It is important that you follow the &#8220;Getting Started&#8221; instructions and do not simply <tt>git clone<\/tt> the repo.<\/b> Otherwise, dependencies will not be installed correctly, and the code will not build. If you struggle to get the C++ version working on your platform, we recommend you switch to the JavaScript version.<\/li>\n<li>Either way, you should need to download just one code skeleton for the whole semester (though we may push periodic updates to fix bugs, etc.).<\/li>\n<li>For this assignment, you will need to implement the following routines in <tt>projects\/simplicial-complex-operators\/simplicial-complex-operators.[js|cpp]<\/tt>:\n<ul>\n<li><tt>assignElementIndices<\/tt><\/li>\n<li><tt>buildVertexEdgeAdjacencyMatrix<\/tt><\/li>\n<li><tt>buildEdgeFaceAdjacencyMatrix<\/tt><\/li>\n<li><tt>buildVertexVector<\/tt><\/li>\n<li><tt>buildEdgeVector<\/tt><\/li>\n<li><tt>buildFaceVector<\/tt><\/li>\n<li><tt>star<\/tt><\/li>\n<li><tt>closure<\/tt><\/li>\n<li><tt>link<\/tt><\/li>\n<li><tt>isComplex<\/tt><\/li>\n<li><tt>isPureComplex<\/tt><\/li>\n<li><tt>boundary<\/tt><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><b><u>Notes<\/u><\/b><\/p>\n<ul>\n<li>The JavaScript assignment comes with a viewer <tt>projects\/simplicial-complex-operators\/index.html<\/tt> which lets you apply your operators to simplices of meshes and visualize the results. Likewise, the C++ version comes with a viewer with similar functionality. (Viewers will be available for all assignments throughout the semester.)<\/li>\n<li><b>Pay close attention to the course notes!<\/b> Some routines really must be implemented with sparse matrices, <em>not<\/em> directly with the halfedge mesh data structure.<\/li>\n<li>Selecting simplices will not work until you fill in the <tt>assignElementIndices<\/tt> function.<\/li>\n<li>The assignment also comes with a test script <tt>tests\/simplicial-complex-operators\/text.html<\/tt> which you can use to verify the correctness of your operators.<\/li>\n<li>The web framework is implemented in Javascript, which means no compilation or installation is necessary on any platform. You can simply get started by opening the <tt>index.html<\/tt> file in <tt>projects\/discrete-exterior-calculus\/<\/tt> in a web browser. We recommend using Chrome or Firefox. Safari has poor <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/WebGL_API\">WebGL<\/a> performance.<\/li>\n<li>If you do not have prior experience with Javascript, do not worry! You should be able to get a handle on Javascript syntax by reading through some of the code in the framework (a good place to start might be <tt>core\/geometry.js<\/tt>). The framework also contains extensive documentation (see <tt>docs\/index.html<\/tt>).<\/li>\n<li>All browsers come with tools for debugging (for instance the <a href=\"https:\/\/developers.google.com\/web\/tools\/chrome-devtools\/console\/\">JavaScript Console<\/a> in Chrome).<\/li>\n<\/ul>\n<p><b><u>Submission Instructions<\/u><\/b><\/p>\n<p>The assignment is due on the date listed on the calendar, at <strong>5:59:59pm Eastern<\/strong> (<em>not<\/em> at midnight!). Further hand-in instructions can be found on <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 some operations on simplicial complexes which were discussed in class and in Chapter 2 of the course notes. Once implemented, you will be able to select simplices and apply these operations to them by clicking the appropriate buttons in the viewer (shown above). Getting &hellip; <a href=\"https:\/\/brickisland.net\/DDGSpring2024\/2024\/01\/25\/a0-coding-combinatorial-surfaces\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Assignment 0 (Coding): Combinatorial Surfaces&#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\/1467"}],"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=1467"}],"version-history":[{"count":11,"href":"https:\/\/brickisland.net\/DDGSpring2024\/wp-json\/wp\/v2\/posts\/1467\/revisions"}],"predecessor-version":[{"id":2149,"href":"https:\/\/brickisland.net\/DDGSpring2024\/wp-json\/wp\/v2\/posts\/1467\/revisions\/2149"}],"wp:attachment":[{"href":"https:\/\/brickisland.net\/DDGSpring2024\/wp-json\/wp\/v2\/media?parent=1467"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/brickisland.net\/DDGSpring2024\/wp-json\/wp\/v2\/categories?post=1467"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/brickisland.net\/DDGSpring2024\/wp-json\/wp\/v2\/tags?post=1467"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}