Aaron Gadberry

Help – v. helped, help·ing, helps

Was this site helpful?
My Amazon.com Wishlist

Archive for the 'Programming' Category

Any programming tips, techniques, bug solutions, or work arounds.

Changing Stylesheets Dynamically

22nd February 2006 - By Paradochs

Introduction

If you are one of those select few who have multiple stylesheets for their website, then this article is for you. On the other hand, whether you know CSS or not, this might be a good way for you to learn.
I know of 4 ways to change between styles dynamically in a page. They are listed below with some code examples.

Read the rest of this entry »

Posted in Programming | 1 Comment »

Pop up Photographs (Automatic 2D -> 3D Scene Creation)

26th January 2006 - By Paradochs

Pop up Photographs (P.u.P.)
Travis Gadberry
Christopher Skelton
CPSC 641(485) – Dr. John Keyser
December 13, 2005

Introduction

Our original plan had been to implement our own version of the SIGGRAPH paper “Automatic Photo Pop-up”, from the 2005 SIGGRAPH proceedings. We researched ourselves into a corner, realizing that what we had taken on a project that was going to take many, many more months to complete than the time we had to work on this project. We decided, then, to plan out and research what we would have done if we had more time to work on this. This paper explains the approach that we took in an attempt to implement the paper. Even the simplified version that we had planned on still turned out to be too much to tackle in one semester.

Summary

The user loads the image by passing the image filename as a parameter to the executable file. The program then reads the file and sets the height and width accordingly. The image is then broken into regions with region codes. Each region makes up one polygon of the final scene. Once all the regions are created and coded, the region map is created. This is an image with the same dimensions as the original and contains the regions scan converted using a parallel view. Each region code has a different color, 0 = red, 1 = blue, and 2 = green. Then the regions are given world points based on the pixels vertically below it in the region map. Once all the regions are converted to world space, they are then drawn in the final scene and texture mapped. The user can then use the fly-through ability to view the scene from any angle.

Read the rest of this entry »

Posted in Programming | No Comments »

Rule-Based Tic Tac Toe

26th January 2006 - By Paradochs

Summary

This program is an implementation of a rule-based AI game. The game has 5 difficulty levels based on how good you want the computer to be. It can range from making many mistakes to being impossible to beat. There is also an option for who gets to move first.

Read the rest of this entry »

Posted in Programming | 1 Comment »

Cryptarithmatic

26th January 2006 - By Paradochs

Original Assignment

Write a program to solve a simple class of cryptarithmetic problems MORE EFFICIENTLY THAN BY BRUTE FORCE (EXHAUSTIVE SEARCH) by using deductions about even/odd, digit range, etc. For example, in the test case

CADET
+CORPS
———
TROOP

Read the rest of this entry »

Posted in Programming | 3 Comments »

Inference Engine

26th January 2006 - By Paradochs

Statement of Problem

The purpose of this assignment is to create a Horn clause solver. This solver must read in logical expressions, or rules, and then be able to determine if it is possible to prove a certain variable true or false. The structure of the input, rules maintenance, and proving algorithm is not specified. The significance of this problem is simple. Input can be related to percepts, and deductions can be related to actions. This program is a simple way of representing logical thinking in an AI machine. A simple conditional agent responds logically based on the rules the user/programmer inputs. Although limited, it can be very powerful if implemented correctly.

Read the rest of this entry »

Posted in Programming | No Comments »