The Little Grasshopper

Tips and Tricks from a Graphics Programmer

Looking for the code samples from my book, iPhone 3D Programming? They can be downloaded here.

Quad Tessellation with OpenGL 4.0

This is the second of a two-part article on tessellation shaders with OpenGL 4.0+. This entry walks through simple Bézier patch subdivision by showing how to render Ed Catmull’s Gumbo model from the raw patch data.

September 6th, 2010 at 4:38 am

Triangle Tessellation with OpenGL 4.0

Sphere Tessellation

This is the first of a two-part article on tessellation shaders with OpenGL 4.0+. This entry gives an overview of tessellation and walks through an example of simple triangle subdivision.

September 6th, 2010 at 4:37 am

Patch Surfaces and Vertex Welding

This post is a follow-up to my previous post on mesh generation with Python. This time I’ll show how to evaluate Bézier spline patches. I’ll also show how to use Python to perform a vertex welding optimization.

August 21st, 2010 at 4:29 am

Mesh Generation with Python

Python is beautiful language for generating 3D mesh data. In this entry, I use the pyeuclid module combined with OpenCTM. I explore various ways to generate mathematical shapes, including polyhedra subdivision, parametric surfaces, and rule-based generation.

August 2nd, 2010 at 2:23 am

“iPhone 3D” In Stock At Amazon!

Word cloud of 'iPhone 3D Programming'Amazon has replaced the “Pre-order” button for my book with “Add to Cart”. To celebrate, I created a word cloud of the entire book using wordle.net and a python script.

May 19th, 2010 at 2:42 pm

PEZ: A Teeny Tiny GLUT Alternative

Pez Mesh
Pez consists of 1 source file and 1 header file. Like GLUT, it lets you quickly build simple OpenGL apps that will run on any platform. Unlike GLUT, Pez never makes any OpenGL calls on your behalf. Your job is to provide Pez with a render method, an initialize method, and a mouse handler. That’s it!

May 16th, 2010 at 4:40 pm

X to OpenCTM Converter

I wrote a quick-and-dirty X to OpenCTM model converter.

May 9th, 2010 at 6:43 pm

Is C++0x Useful for Vector Math?

Rvalue references and the new auto keyword are cool new features in C++0x. Now that all platforms support these two features (Visual Studio 2010 on Windows, gcc on everything else), I tried playing with rvalue references to see how they can help us graphics geeks.

May 7th, 2010 at 1:19 am

Antialiased Cel Shading

Cel Shader

Cel shading is a fun way to learn about shaders. This post walks through the development of a simple OpenGL 3.0+ demo for cel shading that antialiases the boundaries between color bands — without using multisampling!

May 2nd, 2010 at 9:34 pm

The OpenGL Shader Wrangler

GLSW is a tiny set of safe ANSI C functions that makes it easy to group shader strings into simple effect files. GLSW automatically prepends #line for proper error reporting.

April 29th, 2010 at 12:26 pm

Lua as an Effect File Format

Lua + OpenGLI discuss Lua as a way of organizing GLSL shader strings, with plenty of code samples.

April 20th, 2010 at 4:30 am