Objective-C Class Properties

Saturday, April 2nd, 2011

In Objective-C, an instance variable is simply an object member variable whose value is stored uniquely for each instance of the object. In a similar manner, instance member functions operate on a particular instance of an object, and have access to the object's instance variables. Interestingly, there is also the notion of a class member function, which must be called without respect to a particular object instance, and cannot access instance variables.


So far these concepts are fairly familiar to C++ programmers, as they are very similar to the concepts of static member variables, member functions (or methods), and static methods, respectively.


Judging by a quick scan of the popular programming websites however, it's clear that significant confusion arises from the fact that Objective-C provides no direct support for class member variables, similar to the notion of a static member variable in C++.

Continue reading...

Basics of Huffman Coding

Sunday, January 9th, 2011

Compression is the process of reducing the storage space requirement for a set of data by converting it into a more compact form than its original format. Huffman coding is one of the most well known compression schemes and it dates back to the early 1950s, when David Huffman first described it in his paper, "A Method for the Construction of Minimum Redundancy Codes."


Historical Note: Huffman invented this algorithm during a graduate university course.

In 1951, Huffman was a graduate student at the Massachusetts Institute of Technology (MIT). He was taking a course in information theory taught by Professor Robert Fano, a prominent figure in the field. To complete the course, Huffman chose to write a term paper about efficient encoding of data – a problem closely tied to Claude Shannon's emerging theories about entropy.

Huffman spent weeks on the paper, and managed to invent the eponymous algorithm in the process. He not only received an A+ in the course, but his algorithm was recognized as a major breakthrough. It was later proven to produce the most efficient prefix-free code for a given set of symbol frequencies.



Huffman coding works by deriving an optimal prefix code for a given alphabet that reduces the cost of frequent symbols, at the expense of less common ones. Let's walk through a simple example that demonstrates the process of building a Huffman code.

Continue reading...

De-3D: Watch 3D Movies in Comfortable 2D

Saturday, October 2nd, 2010

Like many people, I rushed to theatres in late 2009 to watch Avatar in stereo 3D. I viewed it with a large group of people and found that several members of the party experienced nausea or fatigue throughout the film. It turns out a significant percentage of the population1 is either stereo-blind or experiences discomfort when viewing 3D content, so this result isn't too surprising.

Immediately after finishing my first viewing of Avatar, I drove across town to catch a second showing using a different stereo technology and made a few observations that I believe may have contributed to viewer discomfort.

Ultimately, even the best stereo 3D content will still cause discomfort for some percentage of the population due to the inherent nature of the technology. As a result, given a sufficiently large group of moviegoers, some percentage is likely to prefer a 2D version over a 3D one. In these circumstances, a simple tweaking of the free 3D glasses given out at the theatre will allow a viewer to watch a 3D movie in the comfort of 2D.

Continue reading...

Introducing Stereoscopic 3D Studio

Saturday, March 14th, 2010

Stereo Studio is a lightweight stereo pre-visualization tool that provides a high performance shader driven framework for decoding and encoding stereo content for all display types. In addition to its functionality as a stereo movie player, this tool also provides support for motion matching, floating window and stereoscopic calibration adjustments, and collaborative workspaces. At a high level, the top features of this tool include:


Continue reading...

Avatar Technical Review (Film)

Friday, December 18th, 2009

Over the last several days I've been pouring over the reviews of Avatar, hoping to find one that offered an in depth analysis of the stereoscopic quality. I haven't found one yet, so I decided to write at least a basic one. Tonight I watched the movie twice - first using Real-D technology, and second (and immediately after) in IMAX 3D. I expected the Real-D experience to be better due to the following (perhaps gross) assumptions:

Continue reading...

Optimizing a Terrain System for Mobile

Saturday, August 8th, 2009

In 2001 the Vision 3D engine featured large outdoor environments supported by smooth and dynamically deformable terrain. The initial version of this engine was PC only, but almost eight years later I decided to update the engine to run on mobile devices. At the start of this process I quickly realized that the terrain system was both a storage and performance hog, and a number of features would need to be dropped.

The most significant cost to contend with was the file size of terrain maps and textures. These files were massive, as they supported very large open worlds with a high degree of detail. Optimizing this content for mobile meant sacrificing a number of features in order to significantly reduce the size of each terrain vertex.

Continue reading...



previous page    |    1    2    3    4    5    6    |    next page