May 1, 2010

Pyth Compiler

An x86 compiler for Pyth (a Python dialect)

The core lexer and parser are generated using Flex and Bison, from which the parser outputs an AST tree. Static analysis is preformed on the tree generating errors or producing a tree decorated with declaration, type and scope information. The tree is then transformed into an intermediate language (IL) for a virtual machine. Optionally, the IL can also be compiled down to assembly language (IA32) and used to produce a standalone executable.

Download: Source (C++)

April 27, 2010

Angry Beard: Distortion Pedal

An audio distortion circuit

This was built based on the classic Angry Beard III circuit schematic, but heavily modified. A different OpAmp and transistor were used, the high-low switch was removed, added dual-power supply, I used an additional voltage divider to bring the gain down to a reasonable level at the output and I also added an on/off switch. The super-cheap OpAmp I used gives it a much grungier sound, which turned out surprisingly cool.

Download: Schematic (original)

April 26, 2010

Path/Ray Tracer

A ray tracer and Monte Carlo path tracer

The core engine supports two modes of rendering: path tracing or ray tracing. The geometry of the scene and the various renderer settings are specified in a simple text file format.

Noteworthy features: tweakable multi-threading, variable anti-aliasing (2x, 4x, …), an OBJ file format parser, area lights, soft shadows, video export, Python API for controlling the renderer.

Download: Source (C++, Python)

March 22, 2010

Mandelbrot Zoom

An auto-zooming Mandelbrot fractal

A Mandelbrot fractal is generated and then analyzed for the most “interesting” area to zoom in on.

The following animated gif shows the algorithm in action. The left side is the generated Mandelbrot fractal and the right side is a visualization of the activity detection algorithm. The algorithm is choosing how to zoom into the fractal in real-time (when the image was recorded).

Download: Source (Matlab)

December 16, 2009

PacMW

A master-worker distributed AI tournament

PacMW is specifically the distributed server component of U.C. Berkeley’s Pacman AI tournament. It provides basic primitives for distributed communication, schedules work to be preformed, collects results and stores the outcomes of individual matches in a sqlite database on the master server. It can be used to execute individual tournaments or run as a daemon process.

To learn more about the Pacman AI projects, check out the Official Site

Tournament Download: Source (Python)

February 14, 2009

3D News-Vis

A 3D visualization of Yahoo! news data

Created for the 2009 Berkeley Hackathon in 18 hours, this visualization queries data from the Yahoo! News API and displays each result as a cube. By clicking on cubes, a heuristic algorithm selects salient words from the existing news entry and re-queries the new topic.

Created in collaboration with Yiding Jia, we won 2nd pace in the Hackathon.

Download: Source (Java, requires JOGL)

August 18, 2008

Fractalizer

A Julia set fractal generator

Quickly after creating the generator, I found out that there are lots and lots of really boring fractals. The settings for this fractal came from Paul Bourke (thanks).

Download: Source (Java)

March 22, 2008

Sobel Edge Detector

Fast edge detection in .NET

My implementation of the Sobel Edge detection. The interesting part of this project is the inherent inefficiencies in the .NET runtime when dealing with BitMap objects. The entire process is documented in this post.

This project was based on various other implementations.

Download: Source (.NET)

February 5, 2008

Wave Analyzer

A simple wave superposition simulator

The Wave Analyzer allows you to plot multiple traveling waves, adjust their amplitude, frequency, wave length and phase angle. Also allows you to combine all waves into one (sum) to see their combined output.

Download: Source | Binary (Win)

September 1, 2007

Electroscope

Electric field visualizer

Electroscope allows you to assemble charged particles and visualizes the electric field around them. By selecting particles, you can change their charge value and see the net force acting upon them. It renders the electric field effects as a solid curve and electric field vectors as individual lines.

Download: Binary (Win)