Donald Knuth

"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil."

Polygonal Approximation of (p,q)-Torus-Knots

Oct 26, 2008 by Johannes Diemke

Lately I have been playing around with space curves. My aim was to obtain a polygonal approximation of a (p,q)-torus-knot. At first glance the frenet-frame seemed to be a convincing solution since it defines an orthonormal basis gliding through the space curve that could be used to span polygons along the curve. Unfortunately the frenet-frames normal and hence its binormal do 180-degree-twists in the inflection-points of the curve. This leads to grafical artifacts while spanning polygons along the curve.

Highslide JS
This image shows a solid, textured and lit (6,8)-Torus-Knot with a modulated radius along the space curve.

The solution is to calculate the frame not using the second derivation but using an arbitrary vector that is never parallel to the tangent. This gets around the nasty 180-degree-twist however the arbitary vector you have to chose is dependent on the particular space curve you want to display.

And while we are at it, we can as well approximate the tangent of the frenet-frame instead of using the expensive to calculate first derivation of our curve. Another reason for this approach beside its quite convincing results is that it works for every curve contrary to the first derivation that is different for different space curves. The pseudocode for calculating the frenet-frame-approximation using the forward difference approach is as follows:

point1 := curve(t); point2 := curve(t + delta); unitTangent := normalize(point2 - point1); unitNormal := crossProduct(unitTangent, <0, 1, 0>); unitBinormal := crossProduct(unitTangent, unitNormal);

A better way to approximate the tangent is using the central difference approach as shown below:

point1 := curve(t - delta/2); point2 := curve(t + delta/2); unitTangent := normalize(point2 - point1); Highslide JS
This image shows the space curve of a Trefoil-Torus-Knot and the corresponding Frenet-Frame gliding through the curve.
Highslide JS
This image shows a solid, textured and lit (6,8)-Torus-Knot with a modulated radius along the space curve.

Fig. 1. (a) the space curve of a Trefoil-Torus-Knot and it's corresponding Frenet-Frame gliding through the curve. (b) a solid, textured and lit (6,8)-Torus-Knot with a modulated radius along the space curve. (click to enlarge).

eXtensible Procedural Texturing System

Jun 20, 2008 by Johannes Diemke

The development of eXtensible Procedural Texturing System (XPTS), a visual programming tool for procedural texture generation, has started. The tool is based on the operator stacking paradigm first introduced by Dirk Olrich in late 2001 and is primarily intended for the creation of beautiful procedural textures for games, demos, 3d models, websites and so forth. According to the proposed plan XPTS will feature a powerful graphical user interface, a xml-based file format and a plugin mechanism for developers to extend the default set of functionality. Figure 1 demonstrates the visual quality of textures produced with an early beta version.

Highslide JS
(a) This image shows a marble texture created with XPTS.
Highslide JS
(b) This image shows a mucus texture created with XPTS.
Highslide JS
(c) This image shows a clastic rock texture created with XPTS.
Highslide JS
(d) This image shows a normal map texture created with XPTS.

Fig. 1. Some textures created with XPTS (click to enlarge).

Whereas figure 2 shows the graphical user interface of eXtensible Procedural Texturing System.

Highslide JS
The graphical user interface of of XPTS.

Fig. 2. The graphical user interface of of XPTS (click to enlarge).

OpenGL with Java Assignment

May 18, 2008 by Johannes Diemke

Last summer I attended a lecture named "OpenGL with Java" at the Carl von Ossietzky University of Oldenburg. In fact my decision to attend this lecture really payed off. We started out with the fundamentals and quickly moved on to more advanced topics such as normal mapping, shadow mapping, cell shading, shadow volumes and finally vertex and pixel shaders. Beside weekly excercises we had to deliver an assessed assignment in the form of a java application. A captured video of my assignment can be found on YouTube.

Domain Name Allocation

Apr 4, 2008 by Johannes Diemke

Within the scope of a seminar on internet law I gave a talk about the domain name allocation with an emphasis on the legal questions that arise from the allocation through the german top level domain registrar denic. The slides and the handout can already be found in the publications section. Unfortunately I am still working on the corresponding paper and it may take some time until it is available for download.

Software Product Lines

Mar 31, 2008 by Johannes Diemke

Some time ago I wrote an introductory paper and gave a talk about software product lines within the scope of a software system engineering seminar. The paper does not go too much into depth although it probably serves as a fairly nice survey of a range of topics treated in the development of a software productline. The paper and the slides can be found in the publications section. For an in depth coverage of software product lines I recommend you to to visit the website of the SEI.