<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Saptarshi Dey</title>
    <description>The latest articles on DEV Community by Saptarshi Dey (@darkmortal).</description>
    <link>https://dev.to/darkmortal</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F801796%2Fe3431a64-0ac9-45e3-a1e6-63f69a09aca5.jpeg</url>
      <title>DEV Community: Saptarshi Dey</title>
      <link>https://dev.to/darkmortal</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/darkmortal"/>
    <language>en</language>
    <item>
      <title>Wake up to reality</title>
      <dc:creator>Saptarshi Dey</dc:creator>
      <pubDate>Tue, 09 May 2023 16:55:26 +0000</pubDate>
      <link>https://dev.to/darkmortal/wake-up-to-reality-45gj</link>
      <guid>https://dev.to/darkmortal/wake-up-to-reality-45gj</guid>
      <description>&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/darkmortal/embed/zYmWWPW?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>codepen</category>
      <category>madra</category>
      <category>uchiha</category>
      <category>sharingan</category>
    </item>
    <item>
      <title>Shortest Path Planning using wavefront Propagation</title>
      <dc:creator>Saptarshi Dey</dc:creator>
      <pubDate>Sat, 31 Dec 2022 17:00:11 +0000</pubDate>
      <link>https://dev.to/darkmortal/shortest-path-planning-using-wavefront-propagation-4pom</link>
      <guid>https://dev.to/darkmortal/shortest-path-planning-using-wavefront-propagation-4pom</guid>
      <description>&lt;p&gt;This algorithm is guaranteed to find the shortest path &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--c0ZVaLwj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tai6ifrhnf42q2tjihth.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--c0ZVaLwj--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tai6ifrhnf42q2tjihth.gif" alt="Demonstration" width="640" height="637"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The basic idea is to explore all possible neighboring cells and calculating the minimum cost (represented by their d-value) of getting to that cell.&lt;br&gt;
If the d-value of a cell is -1, that means it's a obstruction&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--mxK7MJ9S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/80an9isiv8alwvuavi2a.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--mxK7MJ9S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/80an9isiv8alwvuavi2a.gif" alt="Updating d-values" width="640" height="637"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the class that handles most of the computing&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Wrapper class for tuple
class tuple implements Comparable&amp;lt;tuple&amp;gt;{
    public int x,y,d;
    tuple(int a,int b,int c){
        x = a; y = b; d = c;
    }
    @Override
    int compareTo(tuple other) {
      return this.d - other.d;
    }
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The d-values are computed by the &lt;strong&gt;updateAllDvalues()&lt;/strong&gt; function and the shortest path is computed by the &lt;strong&gt;drawRetracePath()&lt;/strong&gt; function.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/DarkMortal/Processing-Projects/tree/main/Wave_Propagation"&gt;Source Code&lt;/a&gt;&lt;br&gt;
If you like this short project, consider following me on GitHub&lt;/p&gt;

</description>
      <category>java</category>
      <category>processing</category>
      <category>algorithms</category>
    </item>
  </channel>
</rss>
