Visualizing Algorithms

Visualizing Algorithms

Skills: Implementing Algorithms, Java

GitHub link: Available upon request

The following two small projects were made in my Fundies 2 class and are examples of implementing algorithms and visualizing them. Also note that both of these algorithms were pair programmed with Nicholas Miklaucic.

Seam Carving

Seam Carving is a content-aware image-resizing algorithm. The algorithm tries to find “seams” of pixels to remove that are “uninteresting” to the overall picture. In the image below to the left, you can see the seams visualized that the algorithm chooses and wants to remove. In the image below to the right, you can see this algorithm in action, removing “uninteresting” parts of the image, trying to just keep the most interesting part: the tree.

This animation shows visual seams being carved through an image to reduce the image's size.
This animation shows visual seams being carved through an image to reduce the image's size.
This animation shows an image of a tree being reduced in size via the seam carving algorithm.
This animation shows an image of a tree being reduced in size via the seam carving algorithm.

Maze Solving

Maze solving is a classic algorithm to implement. First, Nicholas and I implemented a maze generator, which used Kruskal’s algorithm to make a minimum spanning tree to represent the maze. Nicholas and I implemented both DFS and BFS algorithms to find a way through both a hexagonal and a grid type of maze. It’s important to note here that good abstraction was necessary here because fundamentally, hexagonal mazes and grid mazes are similar and should be in the same type of data structure so that we only needed to implement BFS and DFS once on that one data structure.

This animation shows a grid maze being solved by a DFS algorithm.
This animation shows a grid maze being solved by a DFS algorithm.
This animation shows a hexagonal maze being solved by a DFS algorithm.
This animation shows a hexagonal maze being solved by a DFS algorithm.
Garrett Smith

Garrett Smith

Learning how to improvise better on guitar/bass 🎸 and keyboard/synth 🎹

rss facebook twitter github gitlab youtube mail spotify lastfm instagram linkedin google google-plus pinterest medium vimeo stackoverflow reddit quora quora