Tuesday, 8 March 2011


Geo-Mipmapping is a GPU friendly technique to render huge landscapes in real time. The method is mainly used in games (CryEngine 2) and Google Earth seems to use a variant of the algorithm. It was introduced by W.H. de Boer in his article “Fast Terrain Rendering Using Geometrical MipMapping”. My implementation supports parallel generation of LOD patches and quad tree based frustum culling.
The demo program was written in the Go language. Go is a minimalistic programming language developed by some prominent Google employees (Ken Thomson, Rob Pike, ...). It has some unusual properties compared to other system programming languages like C, C++ or D:
  • Implicit interface inheritance: Go completely decouples interface definitions from their implementation. The Go inventors call it static duck typing.
  • Structural type system: Go doesn’t have classical type hierarchies. Types are just composed.
  • Built-in concurrency: The language uses goroutines and channels for concurrency (borrowed from T. Hoare’s CSP).
Go has still some rough edges but I think it fills a niche somewhere between high-level and low-level programming. In practise it feels like a hybrid of C and Python ;-)

Monday, 27 December 2010

Thursday, 9 September 2010

Software Rasterizer

Well, I'm back again! A long time has passed since my last post and I'm proud to announce my minimalistic software rasterizer.
You may think that software rasterization is a bit anachronistic in a world of super fast 3D accelerators, but this project is mainly for educational purposes. The API is roughly comparable to OpenGL and supports vertex and fragment shaders. All shaders are written in pure C.

Be warned, the rasterizer still produces some ugly artifacts (top-left filling rule is not implemented). There is also code included to load TGA and 3DS files.
The source is hosted on GitHub: https://github.com/chsc/LightGL
More demos with dot3 bump mapping are coming soon...

Saturday, 19 December 2009

Friday, 29 May 2009

Lisp/Scheme interpreter with Python

I wrote a simple Scheme/Lisp like interpreter some time ago. It was just a dumb idea after hours of of Scheme programming at university ;)
It currently supports define, quote, cdr, car, some arithmetical operations and even lambda functions.
If you want to extend the interpreter, you have to bind a new function to the global environment.

For car it looks like that:

def car_builtin(l, env, interp):
assert len(l) == 1
v = l.head().visit(interp, env)
return v.head()

env = Environment()
env.bind("car", Function(car_builtin))

There is a simple example script in the SVN repository to calculate the faculty of a given number.

(define fac
(lambda (f)
(if (< f 2) 1 (* (fac (- f 1)) f))

Call fac with

(fac 11)

and you you'll get the correct result: 39916800. hehe.

The complete python script can be downloaded from Google Code (http://code.google.com/p/dev-null). It only consists of a few lines of code for scanner, parser, AST, "runtime library" and interpreter.

Thursday, 28 May 2009

LaTeX & Blogger

After some time tinkering with blogger, I found a simple solution to get LaTeX working (http://www.botcyb.org/2008/10/rendering-latex-in-blogger.html).

Looks nice ;)


Edit: Latex rendering is not available anymore :(

Programming & CG Blog

This blog is about programming and computer graphics (especially raytracing and gi algorithms).
From time to time, I'll post some articles in this blog.