C/C#/C++ Portfolio

Here, you can find all of my C, C#, and C++ projects (continually updated with new and/or tuned projects)

Motion Capture

Using OpenCV and MediaPipe in Python, I was able to get the points of a human model as it moved through a 2D video. Using the points in each frame, I coded an animation text file. Through C#, I created points in Unity based off the x, y, and z coordinates for each object given in the file. That way the points created a 3D model and moved with the corresponding frames.

Caesar's Cipher

Caesar's Cipher is one of the oldest methods of encrypting a message. As an assignment in CS50, I coded a program in C that uses the same methodology as the cipher. It prompts a user for text, shifts the corresponding characters by value key (denoted when we run the program), and prints the now encrypted message.

Runoff

Runoff was a program designed to emulate a runoff election. I created six different functions to validate and count a vote, tabulate the votes, find the candidate with the minimum votes, eliminate those candidates wiht the lowest, and print the winner or print that there was a tie.

Scrabble

This assignment tasked me with created a program that determines the winner of a short scrabble game. The program prompts two users for words adn the highest score wins. To compute the score, I translated capital letters to lower letters and subtracted by 65 to get the correct ascii value. Then the score is summed up and a winner is assigned.

Plurality

Similar to runoff, this is another election method but with more than one candidate selection. This program promts users for their top candidates and tallies up who has the most votes in total, not just the preferred candidate.

Recover

This assignment tasked me with making a program that recovers JPEGs from a forensic image. I opened the memory card, searched until the end of the card for the JPEG, read 512 bytes into a buffer, and checked if the bytes indicated the start of a JPEG. Then the program would create an output file.

Filter

This assignment had me program functions for a user to apply grayscale, sepia, reflection, or blur filters to their image. For grayscale, the program combed through each row and column, converted the pixels to float, and found the average pixel value. Similarly for sepia, I used specific formulas to get the values for sepia red, blue, and green and updated the pixel value accordingly. For the reflection, I flipped the rows to be a mirror image. To blur the image, I created a copy of the image, combed through each row and column, got the neighboring pixels, found the image value and calculated the average of neighboring pixels, then I copied those pixels into the original image.

Inheritance

Inheritance was a lab assingment that simulates genetic inheritance of blood type. Each person has two parents and two alleles. Under the create_family function, I allocated memory for a new person, set parent pointers for the current person, and assigned the current person's alleles based off the parents'. I also set up a function to set the parent pointers to null if there were no more generations to create and randomly assigned alleles. Under the free_family function, I freed the parents recursively and used free() to free the child.

Speller

Speller is a program designed to spell-check a file after loading a dictionary of words from the disk onto memory. The challenge from this assignment was to implement check, hash, load, size, and unload as efficiently as possible, using a hash table. This was done in dictionary.c, where the main script, speller.c, was given and implemented the functions. I started with the function check to return if a word is in the dictionary or not. Next, hash was implemented to hash the word into a number. Load loaded the dictionary into memory and reutrned true if successful. Size returned the number of words in the dictionary if loaded. Last, unload unloaded the dictionary from memory and returned true if successful.