top of page
Stereogram Generator

This is code for a individual project I made to create a program that generates stereogram images.  More commonly called "Magic Eye" images, after the collection of books. These images use a horizontally repeating pattern with shifts that make a 3D image if the viewer focuses their eyes on a point in front of, or behind, the image. This code creates these images by using a repeating pattern, and using a separate depth image in black and white to shift pixels in the pattern according to the white value. Which creates the appearance of depth in the image.

This code is capable of creating two types of said images, one to create random dot stereograms, which uses a random static pattern for the underlying repeating image, and one that can use a custom loaded image as the repeating pattern (similar to the "Magic Eye" books).

 

​​

Sample outputs:

Depth image used

Random Dot Stereogram generated

Tiled Image Stereogram generated

StereogramImage2.png

Stereogram Images C++ Header

SGI_HEADER_CODE.PNG

Stereogram Images C++ Implementation

SGI_CODE.png
Morse Code Puzzle Solver

The idea for this code came from a puzzle I encountered as part of a mystery game that asked players to decode a sentence in Morse code that did not have clear spaces between the characters. This means something like
.--.-...-.. would give both "email" (. -- .- .. .-..) and "acid" (.- -.-. .. -..) as possible solutions. Rather than trying to brute force these by hand, I made a program to give possible solutions. The program solves these efficiently by using Trie Tree data structures to recursively check possible Morse code conversions, but stopping when a possible partially converted word can not lead to any valid complete words. 

​​

Sample output:

MorseCodeOutput.PNG

Trie Tree (Generic) C++ Implementation

TT_Code.PNG

Morse Code C++ Header

Morse Code C++ Implementation

MC_Code.PNG
bottom of page