/ Programming


Raytracer

I wrote my raytracer as a part of my CS488 Graphics course. It’s pretty straight-forward: single-threaded, non-AA non-accelerated raytracer. It renders polygons and spheres.


Parser

My work-in-progress compiler. So far I have a working SLR(1) parser for any BNF grammar and a simple lexer. Github code here.


Quadcopter

I sponsored and did quite a bit of work to help with my brother’s quadcopter when he was back in highschool. Here’s the code Github page.


Audio Transform

Fooling around with wavelet-like transforms. I would like something that has both a high frequency resolution & bandwidth along with a high temporal resolution for high frequencies. By comparison, regular (non-windowed) FFT transforms the entire signal, with no temporal axis. A windowed FFT has a temporal resolution of SIG_LENGTH / WINDOW_LENGTH. A STFT transform (FFT with sliding window) is better, but its temporal resolution is still low-frequency. My transform is inspired by the way ears work, as I believe that is a better space for what I am trying to achieve. Constant Q transforms / Morlet wavelet transform solve this problem on some level as well.

The top picture is the transform of the signal in the bottom picture (two sines added together).


Specular + Diffuse Shading

An implementation of Phong shading. Video here.


Game, Wired

This is from back when I was in highschool. It was my entry for JayIsGames’s very first CGDC competition. It’s just one level. Try out the game here.


Rasterization with Perspective-correct Texturing

A friend of mine wrote a simple 2.5D texture renderer using an algorithm from the Doom & Quake era. I whipped up a Matlab script to see how much difference would a "correct" algoritm make. The script takes in any 4 verteces and renders the texture over them with a wide (90*) FOV.

Kirsch Edge Detection

In my ECE327 course, the final project was to implement a Kirsch Edge Detector in VHDL for an FPGA.

Denoising

In my fourth year, there was an assignment dealing with different types of denoising. One of them was black-white grain noise, so I made a shader that only resampled those pixels. I was quite impressed with the result.

CS488 Final Project

This is my final project for the CS488 Graphics course. It has OpenGL rendering a few cubes with specular+diffuse shading and parallax mapping. Originally, the idea was to get a simulated windowing environment, but there's never enough time.

Tetris

I wrote a functional 3D-rendered Tetris game as a part of my CS488 Graphics course. The game is still "flat", it's just rendered using cubes in OpenGL. Most of the game logic was provided.

Software Rasterization

As a part of my CS488 Graphics course, I wrote a software implementation of edge rasterization. Features a full projection matrix, screen clipping, frustum culling, etc + object transformation. The 2 RGB gnomons represent the model-space and world-space. A line drawing API was given.

M68K GDB Stub

As part of ECE354, each student grouped up into a team and wrote a RTOS for the Motorola 68000 CPU / Coldfire board. The first two weeks of my team’s work was getting GDB working on the board. Check it out here. It also works with the CPU emulator.


Zoom effect

I was looking at a website with a "louppe" effect (disqus.com, the site has changed since then), so I wanted to try doing it with a shader. Then, I added a "drop-off" effect - it seemed aesthetically pleasing.

Mars Rover Webcam Pano

I helped out with UW's Mars Rover team. One of the things I did was try to get a merged view of the webcams that were on the rover. Since there wasn't much time before the competition (and I had a huge workload during that semester), I didn't have time to try any fancy approaches (RANSAC), and approximated with an affine transform. This didn't end up being used for the rover, as anything other than the ground would diverge.

Teensy chip programming

I wanted to make the closed-loop response of my quadcopter faster (AHRS to ESC path). I got a Teensy 2.0 to read serial from AHRS, send PWM to the ESCs, and read USB from the motherboard for direction info. I only got as far as making a blinking LED and interfacing with x86 through raw USB. See projects here and here.