<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="/feed.xml" rel="self" type="application/atom+xml" /><link href="/" rel="alternate" type="text/html" /><updated>2026-02-03T18:23:51+00:00</updated><id>/feed.xml</id><title type="html">Andrew Matzureff - Shortfolio</title><subtitle>Hi folks! This site is WIP at the moment. For now feel free to check out my YouTube channel linked on the &quot;About&quot; page for random demos of various projects.</subtitle><entry><title type="html">NewForce SOPs: Index</title><link href="/newforce/sop/2026/02/03/NewForce_SOP-index.html" rel="alternate" type="text/html" title="NewForce SOPs: Index" /><published>2026-02-03T00:00:00+00:00</published><updated>2026-02-03T00:00:00+00:00</updated><id>/newforce/sop/2026/02/03/NewForce_SOP-index</id><content type="html" xml:base="/newforce/sop/2026/02/03/NewForce_SOP-index.html"><![CDATA[<p>Included on this page are supplementary resources describing a set of formalized “<em>standard operating procedures</em>” students may reference while executing various tasks as part of the NewForce data analysis training program by Generation West Virginia. SOPs were created during and in reference to my participation in Cohort 12 of NewForce.</p>

<div style="border: 1px solid white; padding: 10px;"><h3>Need help setting up your repo for a new solo project?</h3></div>
<ul>
  <li>Visit: <a href="/newforce/sop/2026/01/29/NewForce_SOP-new_solo_project.html">New Solo Project</a></li>
</ul>

<div style="border: 1px solid white; padding: 10px;"><h3>Need a quick refresher on how to push your changes to GitHub?</h3></div>
<ul>
  <li>Visit: <a href="/newforce/sop/2026/01/30/NewForce_SOP-push_changes_to_github.html">Push Changes To GitHub</a></li>
</ul>]]></content><author><name></name></author><category term="newforce" /><category term="sop" /><summary type="html"><![CDATA[Included on this page are supplementary resources describing a set of formalized “standard operating procedures” students may reference while executing various tasks as part of the NewForce data analysis training program by Generation West Virginia. SOPs were created during and in reference to my participation in Cohort 12 of NewForce.]]></summary></entry><entry><title type="html">Push Changes To GitHub</title><link href="/newforce/sop/2026/01/30/NewForce_SOP-push_changes_to_github.html" rel="alternate" type="text/html" title="Push Changes To GitHub" /><published>2026-01-30T01:00:00+00:00</published><updated>2026-01-30T01:00:00+00:00</updated><id>/newforce/sop/2026/01/30/NewForce_SOP-push_changes_to_github</id><content type="html" xml:base="/newforce/sop/2026/01/30/NewForce_SOP-push_changes_to_github.html"><![CDATA[<ol>
  <li>First off, be sure to save any work you’ve done in whichever application you’re working from!
<br />	<img src="/assets/newforce/sop/push_changes_to_github/step-1-save_work.png" alt="step-1-save_work.png" />
    <pre><b>⚠ NOTE: <i>If you have your work saved to a location outside of your local git repo you will need to copy or move the saved file(s) into your local repo!</i></b></pre>
  </li>
  <li>
    <p>Using GitBash or your terminal of choice navigate to the folder containing your local git repo and then <code class="language-plaintext highlighter-rouge">cd</code> into it.
<br />	<img src="/assets/newforce/sop/push_changes_to_github/step-2-cd_repo.png" alt="step-2-cd_repo.png" /></p>
  </li>
  <li>It’s always helpful to perform a cursory <code class="language-plaintext highlighter-rouge">git status</code> and/or <code class="language-plaintext highlighter-rouge">git log</code> to remind yourself of the current state of your working tree. If you don’t see your changes under “modified files” (if you’ve edited an existing file) or “untracked files” (if you’ve created a new file since your last commit) or you are not checked out to the branch you intended then this is your opportunity to investigate why the contents of your repo are not as you expect. If everything checks out (no pun intended) then proceed with confidence!
<br />	<img src="/assets/newforce/sop/push_changes_to_github/step-3-git_status.png" alt="step-3-git_status.png" />
    <div style="border: 1px solid yellow; padding: 10px;">
 <pre><b>⚠ NOTE: <i>You can get a detailed printout of your working tree's commit history including commit messages and branches using `git log`. <br />To get a more concise, formatted, visual representation of your commit history you can use an alias such as `git lol` to output the log in a specific, desired format: <br /></i></b>```<br /># Assign a concise, pretty-formatted commit log command to a short, convenient alias ("git lol"). This only needs to be run once to be able to use "git lol" whenever and wherever.<br />git config --global alias.lol "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)&lt;%an&gt;%Creset' --abbrev-commit"<br />```</pre>
 </div>
  </li>
  <li>
    <p>Once you have confirmed that your changes are ready and your local git environment accurately reflects your expectations, go ahead and stage your new/modified files using <code class="language-plaintext highlighter-rouge">git add</code> making sure to continue validating your expectations using <code class="language-plaintext highlighter-rouge">git status</code> and/or <code class="language-plaintext highlighter-rouge">git log</code> as you go.
<br />	<img src="/assets/newforce/sop/push_changes_to_github/step-4-git_add.png" alt="step-4-git_add.png" /></p>
  </li>
  <li>After you’ve staged all the files you’d like to include in your commit, you may save their current state to the tip of your current local branch while providing a helpful message to describe the changes by using: <code class="language-plaintext highlighter-rouge">git commit -m "Your message here."</code>.
<br />	<img src="/assets/newforce/sop/push_changes_to_github/step-5-git_commit.png" alt="step-5-git_commit.png" />
    <div style="border: 1px solid yellow; padding: 10px;">
 <pre><b>⚠ NOTE: <i>Make sure that you are checked out to the very tip (latest commit) of your current branch! <br />You can verify this by using `git lol` (see note at step 3 for instructions on how to set up `git lol`) to check for `(HEAD -&gt; your-branch-name)` where `your-branch-name` refers to the branch you want to make changes to. <br />After committing your changes another `git lol` should show 1 new line above the previous latest commit (e.g: the current state of your remote repo at `origin/main` and `origin/HEAD`) containing your new commit alongside your message at the tip of your branch. <br /></i></b>```<br /># Print out a concise, pretty-formatted commit log so that you can visually verify the state of your working tree.<br />git lol<br />```</pre>
 </div>
  </li>
  <li>If everything looks good locally you are free to <code class="language-plaintext highlighter-rouge">git push</code> your latest changes to GitHub!
<br />	<img src="/assets/newforce/sop/push_changes_to_github/step-6-git_push.png" alt="step-6-git_push.png" />
    <div style="border: 1px solid yellow; padding: 10px;">
 <pre><b>⚠ NOTE: <i>Make sure that your remote branch is now synced to your local branch! <br />You can verify this by using `git lol` (see note at step 3 for instructions on how to set up `git lol`) to check for `(HEAD -&gt; your-branch-name)` where `your-branch-name` refers to the branch whose latest changes you just pushed. <br />After pushing your changes another `git lol` should show that the current state of your remote repo (e.g.: at `origin/main` and `origin/HEAD`) now corresponds to the latest commit you just created at the tip of your local branch. <br /></i></b>```<br /># Print out a concise, pretty-formatted commit log so that you can visually verify the state of your working tree.<br />git lol<br />```</pre>
 </div>
  </li>
</ol>

<div style="border: 1px solid white; padding: 10px;"><h3>Looking for another SOP?</h3></div>
<ul>
  <li>Visit: <a href="/newforce/sop/2026/02/03/NewForce_SOP-index.html">NewForce SOP Index</a></li>
</ul>]]></content><author><name></name></author><category term="newforce" /><category term="sop" /><summary type="html"><![CDATA[First off, be sure to save any work you’ve done in whichever application you’re working from! ⚠ NOTE: If you have your work saved to a location outside of your local git repo you will need to copy or move the saved file(s) into your local repo!]]></summary></entry><entry><title type="html">New Solo Project</title><link href="/newforce/sop/2026/01/29/NewForce_SOP-new_solo_project.html" rel="alternate" type="text/html" title="New Solo Project" /><published>2026-01-29T02:00:00+00:00</published><updated>2026-01-29T02:00:00+00:00</updated><id>/newforce/sop/2026/01/29/NewForce_SOP-new_solo_project</id><content type="html" xml:base="/newforce/sop/2026/01/29/NewForce_SOP-new_solo_project.html"><![CDATA[<ol>
  <li>
    <p>Click the GitHub classroom link sent by instructors.
<br />	<img src="/assets/newforce/sop/step-1-click_link.png" alt="step-1-click_link.png" /></p>
  </li>
  <li>
    <p>Accept the assignment invitation.
<br />	<img src="/assets/newforce/sop/step-2-accept_invite.png" alt="step-2-accept_invite.png" /></p>
  </li>
  <li>
    <p>Click the link to visit the newly created repository.
<br />	<img src="/assets/newforce/sop/step-3-click_link.png" alt="step-3-click_link.png" />
<br />	Alternatively, if you no longer have access to the generated repository link, then you can locate it by visiting the NewForce organization dashboard for our cohort. To visit the dashboard navigate to <a href="https://github.com">github.com</a>, click the button with your GitHub username in the upper left of the page and then select “NewForce-Data-Cohort-12”.
<br />	<img src="/assets/newforce/sop/step-3-goto_org.png" alt="step-3-goto_org.png" />
<br />	Your repo should show up among the recently forked repos.
<br />	<img src="/assets/newforce/sop/step-3-org_dash.png" alt="step-3-org_dash.png" /></p>
  </li>
  <li>
    <p>After navigating to your project repo copy the link you’ll use to clone the remote repo into your local workspace.
<br />	<img src="/assets/newforce/sop/step-4-copy_link.png" alt="step-4-copy_link.png" /></p>
  </li>
  <li>
    <p>Using Git Bash or your terminal of choice navigate to the folder within your workspace in which you want the folder containing your local repo to exist. After this step you can then “<code class="language-plaintext highlighter-rouge">cd</code>” into the new folder created by “<code class="language-plaintext highlighter-rouge">git clone</code>” to house your local repo and then get started!
<br />	<img src="/assets/newforce/sop/step-5-git_clone.png" alt="step-5-git_clone.png" /></p>
  </li>
</ol>

<div style="border: 1px solid white; padding: 10px;"><h3>Looking for another SOP?</h3></div>
<ul>
  <li>Visit: <a href="/newforce/sop/2026/02/03/NewForce_SOP-index.html">NewForce SOP Index</a></li>
</ul>]]></content><author><name></name></author><category term="newforce" /><category term="sop" /><summary type="html"><![CDATA[Click the GitHub classroom link sent by instructors.]]></summary></entry><entry><title type="html">My First Unity Game (DEMO)!</title><link href="/digest/update/2025/07/02/My_First_Unity_Game.html" rel="alternate" type="text/html" title="My First Unity Game (DEMO)!" /><published>2025-07-02T00:00:00+00:00</published><updated>2025-07-02T00:00:00+00:00</updated><id>/digest/update/2025/07/02/My_First_Unity_Game</id><content type="html" xml:base="/digest/update/2025/07/02/My_First_Unity_Game.html"><![CDATA[<h1 id="hi-folks"><strong>Hi, folks!</strong></h1>

<p>Well it finally happened! After years of telling myself that I’d learn to use a modern, commercial game engine “eventually” I finally buckled down, found <a href="https://www.youtube.com/watch?v=XtQMytORBmM">a great Unity beginner’s tutorial</a> which inspired me to keep going after completion!</p>

<p>Anywho, without further ado, I’ll leave you to give the game a spin and perhaps even get enough entertainment out of it to beat my high score (55 as of writing)!</p>

<h2 id="objective">Objective</h2>
<p>Fly between as many pairs of pipes as you can without hitting any!</p>

<h2 id="controls">Controls</h2>
<ul>
  <li><em>Click the <strong>left mouse button</strong></em> or <em>press the <strong>spacebar</strong></em> (desktop) or <strong><em>tap the screen</em></strong> (mobile) to flap your wings and briefly ascend!</li>
  <li>Click anywhere outside the game widget to pause the game and then click anywhere back on the widget to resume (just beware that the resume click will still register as a “flap” so be careful!).</li>
</ul>

<p><br /></p>

<iframe frameborder="0" src="https://itch.io/embed-upload/14183969?color=333333" allowfullscreen="" width="980" height="688"><a href="https://andrewmatzureff.itch.io/dollar-store-flappy-bird">Play Dollar Store Flappy Bird on itch.io</a></iframe>

<p><br /></p>

<p>This was a huge step for me because in the past I’d always inevitably abandon such endeavors before almost immediately going right back to writing everything from scratch (an admittedly laborious, yet comfortably familiar feat). I naturally find the frustration that comes with navigating a complicated UI to be particularly exhausting (which was undoubtedly a contributing factor to the reality that it took me 7 years, as well as an actual job in software development, to finally make the switch from BlueJ to IntelliJ as my daily driver Java IDE). In addition to the brilliant tutorial from <a href="https://www.youtube.com/watch?v=XtQMytORBmM">GMTK</a> I also found that the process of familiarizing myself with the Unity editor’s UI was exponentially more intuitive this time around given my recent attempt at implementing a Unity-like, composition-based Entity-component system in one of my homebrew game engine projects! Suddenly, it made sense to me just “why” we were “wiring” things up the way we were in the editor and before too long I was able to intuit just “what” to plug in “where” as well as which objects need to communicate with one another in general. Maybe I’ll end up writing a blog post about my entity-component system and composition pattern insights!</p>

<p>I plan to keep developing simple clones and custom copy-cats of popular, minimalist games until I get comfortable enough with Unity to start working on my own original ideas! So, feel free to give me a follow on itch.io!</p>

<iframe frameborder="0" src="https://itch.io/embed/3689038" width="552" height="167"><a href="https://andrewmatzureff.itch.io/dollar-store-flappy-bird">Dollar Store Flappy Bird by AndrewMatzureff</a></iframe>

<p>Thanks for stopping by!</p>]]></content><author><name></name></author><category term="digest" /><category term="update" /><summary type="html"><![CDATA[Hi, folks!]]></summary></entry><entry><title type="html">PDE Raycaster (preview)</title><link href="/digest/update/2025/05/21/pde_raycaster_digest_preview.html" rel="alternate" type="text/html" title="PDE Raycaster (preview)" /><published>2025-05-21T00:00:00+00:00</published><updated>2025-05-21T00:00:00+00:00</updated><id>/digest/update/2025/05/21/pde_raycaster_digest_preview</id><content type="html" xml:base="/digest/update/2025/05/21/pde_raycaster_digest_preview.html"><![CDATA[<pre>
<b>⚠ NOTE: <i>this post is a preview!</i></b>
Many areas throughout are unfinished, unnecessary, or missing entirely.
The page is likely littered with random garbage like a scratch pad.
Code snippets may contain errors, inconsistencies, or complete nonsense as, in many cases, excerpts are taken straight from local projects (possibly years old) so they must be adapted to make sense out of context and revised to promote best practices.
</pre>

<h1 id="hi-folks"><strong>Hi, folks!</strong></h1>

<p>Lately I’ve been contending with a bout of emotional strife. My struggle with general anxiety in particular has been exacerbated by the guilt I feel from subjecting the people in my life to the worst of my avoidant tendencies. What’s more is that phases of intermittent apathy amidst a seemingly ever-increasing backlog of obligations have left me yearning for a respite. This has prompted me, for better or worse, to seek refuge in the sanctuary of escapism.</p>

<div style="width: 100%; height: 150px; overflow: hidden; border: 1px solid brown;">
    <img alt="Artwork of a person with their hands on either side of their face: swirling arrows emanating from the person's head chaotically permeate the surrounding space. Evocative phrases, 'certainly' and 'I'm stuck', are positioned along the contour of some arrows." src="https://grizzlygrowler.org/wp-content/uploads/2021/10/adhd-image-900x506.jpg" style="margin: -245px 0 0 0;" />
</div>

<p><br /></p>

<p>So, without further ado please join me in this babbling stream of consciousness fueled by the onset of hyperfixation! Allow yourself to become entranced by a flame of nostalgia ignited by the spark of an old obsession of mine: <strong><em>raycasting!</em></strong></p>

<p><br /></p>

<h1 id="what-is-raycasting"><strong>What Is Raycasting?</strong></h1>

<p>I’m not certain, but over the years I’ve got the impression that there exists some contention or, at the very least, some “fuzziness” as to the <em>exact</em> boundaries of what may <em>formally</em> be considered a raycaster. As a result, I set out to identify some qualities which precisely distinguish raycasting from its derivatives (e.g.: ray marching, ray tracing, etc.) and unambiguously define the relationship between them.</p>

<div>
    <div style="float: right">
        <img alt="A diagram describing the relationships between the concept of raycasting and several of its derivatives flowing from top to bottom as follows: at the very top position is the raycasting class of rendering technique (i.e.: any renderer which represents geometric scene elements visually based on their interactions with view rays). At the next position down, 3 options are shown: Discrete Ray Traversal (a.k.a.: Ray Marching), Continuous Ray Traversal, and Varied Ray Traversal. Arrow lines flow from the top-level raycasting class to the Discrete Ray Traversal option and the Continuous Ray Traversal option suggesting that these options enable 2 distinct forms of raycasting. The 2 distinct options together enable a 3rd option which is a hybrid of discrete and continuous ray traversal. The discrete and varied options both flow into 2 distinct rendering classes at the next position down: Sphere Tracing (i.e.: any raycaster which tests scene elements against a signed distance function at discrete intervals) and Volume Raycasting (i.e.: any raycaster which samples the volume of scene elements at discrete intervals). All 3 options flow into another distinct rendering class at the next position down: Ray Tracing (i.e.: any raycaster which enables light sources and casts subsequent nested rays as a result of the interaction between view rays and scene geometry). At the next position down, 3 options are shown: Light Source Feeler Rays (a.k.a.: Shadow Feelers), Recursive Rays (a.k.a.: indirect lighting), and other material interactions &amp; optical effects. Arrow lines flow from the Ray Tracing class to the 3 options mentioned suggesting that these options enable at least 3 distinct forms of ray tracing. The recursive rays option is further specialized into 2 example variants: perfect mirror (i.e.: where the angle of the new ray is a reflection of the angle of incidence across the surface normal at the location of the initial interaction) and diffuse material (i.e.: where the angle of the new ray is computed as a function of the angle of incidence and the surface normal at the location of the initial interaction; for instance, a random distribution of angles between the angle of incidence and the angle of a perfect reflection may yield results resembling a rough surface or matte material)." src="/assets/raycasting_derivatives.png" />
    </div>
    For the purposes of this series I'll clarify some of the relevant terms using a framework that makes sense to me. Thus, we'll proceed with the caveat that this framework is based on my own mental model which may not be consistent with other sources or the broader consensus among industry folks and/or other hobbyists. I invite any feedback to help improve my understanding and, ultimately, this series for the benefit of anyone following along!
</div>

<p><br /></p>

<h4 id="my-interpretation"><strong>My Interpretation</strong></h4>

<p>In general, I consider raycasting to be a broad class of computer graphics rendering techniques all characterized by their ability to visualize geometric entities in a scene based on those entities’ interactions with “view rays”. From this perspective, anything which tests <strong>objects</strong> for intersection with <strong>view rays</strong> and then renders some representation of those intersections is a raycaster.</p>

<p>What distinguishes various raycasting derivatives from one another, in my estimation, lies within the finer details: <em>how do we arrive at an intersection in the first place and how do we represent the resulting interaction and any subsequent interactions?</em></p>

<p><img alt="Animated GIF showing a scene from a pseudo-3D, 1st person perspective alongside the same scene shown from a 2D, overhead-like perspective as the field of view can be seen rotating about the viewer's vertical axis from both perspectives." src="https://upload.wikimedia.org/wikipedia/commons/e/e7/Simple_raycasting_with_fisheye_correction.gif" width="100%" /></p>

<h1 id="my-first-raycaster"><strong>My First Raycaster</strong></h1>
<p><img alt="Animated GIF showing a texture-mapped scene from a pseudo-3D, 1st person perspective as the view pans along the scene vertically." src="/assets/ll3d_raycaster.gif" width="100%" /></p>

<p>I have written a raycaster in the past. Granted, it was a certifiable mess, but it served its purpose as a worthwhile learning experience. It featured texture-mapped walls, vertical camera panning via <a href="https://zdoom.org/wiki/Y-shearing">Y-shearing</a> in addition to neat post-processing effects like a reflective “water” floor effect as well as a frame-blending-style motion blur effect.</p>
<div class="language-java highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kd">public</span> <span class="kd">class</span> <span class="nc">Edges</span> <span class="o">{</span>
    <span class="c1">// ...</span>

    <span class="kd">public</span> <span class="kd">static</span> <span class="kt">float</span><span class="o">[]</span> <span class="nf">intersection</span><span class="o">(</span>
        <span class="kt">float</span> <span class="n">xa1</span><span class="o">,</span> <span class="kt">float</span> <span class="n">ya1</span><span class="o">,</span>
        <span class="kt">float</span> <span class="n">xb1</span><span class="o">,</span> <span class="kt">float</span> <span class="n">yb1</span><span class="o">,</span>
        <span class="kt">float</span> <span class="n">xa2</span><span class="o">,</span> <span class="kt">float</span> <span class="n">ya2</span><span class="o">,</span>
        <span class="kt">float</span> <span class="n">xb2</span><span class="o">,</span> <span class="kt">float</span> <span class="n">yb2</span>
    <span class="o">)</span> <span class="o">{</span>
        <span class="kt">float</span> <span class="n">r1</span><span class="o">=(</span><span class="n">xb1</span><span class="o">-</span><span class="n">xa1</span><span class="o">);</span>
        <span class="kt">float</span> <span class="n">r2</span><span class="o">=(</span><span class="n">xb2</span><span class="o">-</span><span class="n">xa2</span><span class="o">);</span>
        <span class="kt">float</span> <span class="n">m1</span><span class="o">=(</span><span class="n">yb1</span><span class="o">-</span><span class="n">ya1</span><span class="o">)/</span><span class="n">r1</span><span class="o">;</span>
        <span class="kt">float</span> <span class="n">m2</span><span class="o">=(</span><span class="n">yb2</span><span class="o">-</span><span class="n">ya2</span><span class="o">)/</span><span class="n">r2</span><span class="o">;</span>
        <span class="kt">float</span> <span class="n">y1Int</span><span class="o">=</span><span class="n">ya1</span><span class="o">-</span><span class="n">xa1</span><span class="o">*</span><span class="n">m1</span><span class="o">;</span>
        <span class="kt">float</span> <span class="n">y2Int</span><span class="o">=</span><span class="n">ya2</span><span class="o">-</span><span class="n">xa2</span><span class="o">*</span><span class="n">m2</span><span class="o">;</span>
        <span class="c1">// NOTE: replace "==" &amp; "!=" with threshold</span>
        <span class="k">if</span><span class="o">(</span><span class="n">m1</span><span class="o">!=</span><span class="n">m2</span><span class="o">)</span><span class="c1">//slopes are not equal; not parallel</span>
        <span class="o">{</span>
            <span class="kt">float</span> <span class="n">x</span><span class="o">;</span>
            <span class="kt">float</span> <span class="n">y</span><span class="o">;</span>
            <span class="k">if</span><span class="o">(</span><span class="n">r1</span><span class="o">==</span><span class="mi">0</span><span class="o">)</span><span class="c1">//vertical line 1</span>
            <span class="o">{</span>
                <span class="n">x</span><span class="o">=</span><span class="n">xa1</span><span class="o">;</span>
                <span class="n">y</span><span class="o">=</span><span class="n">m2</span><span class="o">*</span><span class="n">x</span><span class="o">+</span><span class="n">y2Int</span><span class="o">;</span>
            <span class="o">}</span>
            <span class="k">else</span> <span class="nf">if</span><span class="o">(</span><span class="n">r2</span><span class="o">==</span><span class="mi">0</span><span class="o">)</span><span class="c1">//vertical line 2</span>
            <span class="o">{</span>
                <span class="n">x</span><span class="o">=</span><span class="n">xa2</span><span class="o">;</span>
                <span class="n">y</span><span class="o">=</span><span class="n">m1</span><span class="o">*</span><span class="n">x</span><span class="o">+</span><span class="n">y1Int</span><span class="o">;</span>
            <span class="o">}</span>
            <span class="k">else</span>
            <span class="o">{</span>
                <span class="n">x</span><span class="o">=(</span><span class="n">y2Int</span><span class="o">-</span><span class="n">y1Int</span><span class="o">)/(</span><span class="n">m1</span><span class="o">-</span><span class="n">m2</span><span class="o">);</span>
                <span class="n">y</span> <span class="o">=</span> <span class="n">m1</span><span class="o">*</span><span class="n">x</span><span class="o">+</span><span class="n">y1Int</span><span class="o">;</span>
            <span class="o">}</span>
            <span class="c1">//if(Math.signum(x-xa1)==Math.signum(ra) &amp;&amp; Math.signum(y-ya1)==Math.signum(yb1-ya1))</span>
            <span class="kt">float</span><span class="o">[]</span> <span class="n">hit</span><span class="o">={</span><span class="n">x</span><span class="o">,</span><span class="n">y</span><span class="o">,(</span><span class="n">xa2</span><span class="o">-</span><span class="n">x</span><span class="o">)*(</span><span class="n">xa2</span><span class="o">-</span><span class="n">x</span><span class="o">)+(</span><span class="n">ya2</span><span class="o">-</span><span class="n">y</span><span class="o">)*(</span><span class="n">ya2</span><span class="o">-</span><span class="n">y</span><span class="o">)};</span>
            <span class="k">if</span><span class="o">(</span><span class="n">isInView</span><span class="o">(</span><span class="n">hit</span><span class="o">)</span> <span class="o">&amp;&amp;</span> <span class="n">isOnEdge</span><span class="o">(</span><span class="n">hit</span><span class="o">,</span><span class="n">xa2</span><span class="o">,</span><span class="n">ya2</span><span class="o">,</span><span class="n">xb2</span><span class="o">,</span><span class="n">yb2</span><span class="o">))</span> <span class="o">{</span>
                <span class="k">return</span> <span class="n">hit</span><span class="o">;</span>
            <span class="o">}</span>
        <span class="o">}</span>
        <span class="k">return</span> <span class="kc">null</span><span class="o">;</span>
    <span class="o">}</span>

    <span class="kd">private</span> <span class="kd">static</span> <span class="kt">boolean</span> <span class="nf">isOnEdge</span><span class="o">(</span><span class="kt">float</span><span class="o">[]</span> <span class="n">hit</span><span class="o">,</span> <span class="kt">float</span> <span class="n">xa</span><span class="o">,</span> <span class="kt">float</span> <span class="n">ya</span><span class="o">,</span> <span class="kt">float</span> <span class="n">xb</span><span class="o">,</span> <span class="kt">float</span> <span class="n">yb</span><span class="o">)</span>
    <span class="o">{</span>
        <span class="c1">//*</span>
        <span class="kt">float</span> <span class="n">dotProduct</span> <span class="o">=</span> <span class="o">(</span><span class="n">hit</span><span class="o">[</span><span class="mi">0</span><span class="o">]</span> <span class="o">-</span> <span class="n">xa</span><span class="o">)</span> <span class="o">*</span> <span class="o">(</span><span class="n">xb</span> <span class="o">-</span> <span class="n">xa</span><span class="o">)</span> <span class="o">+</span> <span class="o">(</span><span class="n">hit</span><span class="o">[</span><span class="mi">1</span><span class="o">]</span> <span class="o">-</span> <span class="n">ya</span><span class="o">)*(</span><span class="n">yb</span> <span class="o">-</span> <span class="n">ya</span><span class="o">);</span>
        <span class="k">if</span> <span class="o">(</span><span class="n">dotProduct</span> <span class="o">&lt;</span> <span class="mi">0</span><span class="o">)</span> <span class="k">return</span> <span class="kc">false</span><span class="o">;</span>
        <span class="kt">float</span> <span class="n">lengthSqrdba</span> <span class="o">=</span> <span class="o">(</span><span class="n">xb</span> <span class="o">-</span> <span class="n">xa</span><span class="o">)*(</span><span class="n">xb</span> <span class="o">-</span> <span class="n">xa</span><span class="o">)</span> <span class="o">+</span> <span class="o">(</span><span class="n">yb</span> <span class="o">-</span> <span class="n">ya</span><span class="o">)*(</span><span class="n">yb</span> <span class="o">-</span> <span class="n">ya</span><span class="o">);</span>
        <span class="k">if</span> <span class="o">(</span><span class="n">dotProduct</span> <span class="o">&gt;</span> <span class="n">lengthSqrdba</span><span class="o">)</span> <span class="k">return</span> <span class="kc">false</span><span class="o">;</span>
        <span class="k">return</span> <span class="kc">true</span><span class="o">;</span>
    <span class="o">}</span>

    <span class="kd">private</span> <span class="kd">static</span> <span class="kt">boolean</span> <span class="nf">isInView</span><span class="o">(</span><span class="kt">float</span><span class="o">[]</span> <span class="n">hit</span><span class="o">)</span>
    <span class="o">{</span>
        <span class="k">return</span> <span class="n">hit</span><span class="o">[</span><span class="mi">1</span><span class="o">]</span> <span class="o">&gt;</span> <span class="mi">0</span><span class="o">;</span>
    <span class="o">}</span>

    <span class="c1">// ...</span>
<span class="o">}</span>
</code></pre></div></div>

<p>By testing the equations of each ray with that of each element of the unorganized list of line segments and then either sorting (<a href="https://en.wikipedia.org/wiki/Painter%27s_algorithm">painter’s algorithm</a>) or filtering (<a href="https://en.wikipedia.org/wiki/Z-buffering">Z-buffering</a>) the resulting set of intersection points by distance to the camera we are able to solve <a href="https://en.wikipedia.org/w/index.php?title=Visibility_problem&amp;redirect=yes">the visibility problem</a> by brute force ultimately enabling us to render the nearest edge in view if one exists. Because we are essentially solving for the intersection point of a pair of arbitrary, infinite lines, it means that we impose no restrictions on the orientation (position, angle, length or otherwise) of scene elements (“edges” or “walls” if you prefer) relative to one another. This is in contrast to what most of us may be accustomed to observing among titles from the primordial era of 3D games which utilized raycasting. Specifically, consider the likes of Hovertank 3D, Catacomb 3D, Wolfenstein 3D and its derivatives, etc.</p>

<p><img src="/assets/pde_raycaster_3x_480p.gif" alt="/assets/pde_raycaster_3x_480p.gif" /></p>

<pre>
<b>⚠ NOTE: <i>if you stopped by to check out this preview I appreciate it!</i></b>
Soon I'll add the full digest post serving as the overview of a series of posts I intend to create which will include additional narrative entries with code snippets to follow along with in your local project!
</pre>]]></content><author><name></name></author><category term="digest" /><category term="update" /><summary type="html"><![CDATA[⚠ NOTE: this post is a preview! Many areas throughout are unfinished, unnecessary, or missing entirely. The page is likely littered with random garbage like a scratch pad. Code snippets may contain errors, inconsistencies, or complete nonsense as, in many cases, excerpts are taken straight from local projects (possibly years old) so they must be adapted to make sense out of context and revised to promote best practices.]]></summary></entry><entry><title type="html">Welcome to my Shortfolio!</title><link href="/general/update/2024/12/05/welcome-to-jekyll.html" rel="alternate" type="text/html" title="Welcome to my Shortfolio!" /><published>2024-12-05T06:01:52+00:00</published><updated>2024-12-05T06:01:52+00:00</updated><id>/general/update/2024/12/05/welcome-to-jekyll</id><content type="html" xml:base="/general/update/2024/12/05/welcome-to-jekyll.html"><![CDATA[<p>There isn’t much that’s ready to post about just yet but check out my <a href="/about/">“About” page</a> for an introduction!</p>]]></content><author><name></name></author><category term="general" /><category term="update" /><summary type="html"><![CDATA[There isn’t much that’s ready to post about just yet but check out my “About” page for an introduction!]]></summary></entry></feed>