Here is an overview of my articles which cover various topics. It's mainly a summary because many of the these articles are also linked from elsewhere on my site.

*Overview:*

- Writing a simple generic tokenizer (2022)
- Vector reflection at a surface (2021)
- Understanding and implementing a simple big (unsigned) integer library (2020)
- Sample implementation of C memory functions (2019)
- Understanding and implementing fixed point numbers (2017)
- Calculating permutations (2016)
- Understanding and implementing Base64 (2016)
- Understanding and implementing CRC (Cyclic Redundancy Check) calculation (2015)
- Algorithms for calculating the difference of dates in days (2014)
- (Projected) Point on Line (2D) Algorithm (2013)
- Applying Hough Transform for detecting lines in images (2012)
- Software Rasterization Algorithms for Filling Triangles (2012)
- Point-In-Triangle Algorithms (2011)
- Parsing Algorithms (2010 / Updated: 2015)
- 14-15 Puzzle (2010)
- Welzl's 'Smallest enclosing disk' Algorithm (2008)
- Cohen-Hodgman-Algorithm (2007)
- Cohen-Sutherland-Algorithm (2007)
- Bresenham-Algorithm (2007)
- Polygon Algorithms (2007 - 2009)
- Introduction to Curves (2007)
- Simple Collision of Two Balls (2006)
- Inserting a splash screen into an Exe file (through a dll) - "The easy way" (2003)
- Writing a Patcher in Delphi (2002)
- Writing a Loader in Delphi (2002)

*Overview:*

- Simplistic fixed camera to perspective screen transformation (2020)
- Notes about the (two-dimensional) perp dot product (2019)
- Derivation of the two-dimensional dot product (2017)
- Rotation Derivation (2011)
- The Birthday Paradox (2010)
- Proof of Pascal's Rule (2008)
- The Derivative of Bernstein Polynomials (2007)

**Date :** January 2022

**Description :**

Article that describes the implementation of a generic, versatile tokenizer that can be used as base for development of own tokenizers and parsers. It explains the imlementation of the generic tokenizer library as well as its usage in detail.

View article online

**Date :** March 2021

**Description :**

Article that describes the reflection of a vector at a surface. It provides a detailed mathematical derivation and description of the formula. A Typescript implementation (with source code) visualizes the approach.

View article online

**Date :** August 2020

**Description :**

Article describing a simple implementation of an (unsigned) big integer library with the most important arithmetic operatons. C# source code with different implementation variants including test cases for download.

View article online

**Description :**

Article about example implementations of the C dynamic memory management functions malloc(), free, realloc() and calloc(). C source code of the two implementation variants including test cases for download.

View article online

**Date :** April 2017

**Description :**

Article about implementing a fixed point number class and the main arihmetic operations. C# source code and a basic javascript implementation available for download.

View article online

**Date :** October 2016

**Description :**

Article about the generation of all possible permutations (without repetition) of set set. Presents three different algorithms with examples. Implementation with source code of eight different algorithms in total available for download.

View article online

**Date :** January 2016

**Description :**

Article about the calculation of Base64. It discusses the general idea of Base64 and and shows different implementation variants. Source code for all algorithms available for download.

View article online

**Date :** February 2015 (Updated: May 2015)

**Description :**

Article about the calculation of CRC (Cyclic Redundancy Check). It discusses the general idea of CRC and evolves step by step different algorithms for CRC calculation. Source code for all algorithms available for download.

View article online

**Date :** December 2014

**Description :**

Article and source code about three different algorithm to calculate the difference of dates (in days).

View article online

**Date :** December 2013

**Description :**

Article and source code about the relation of a given point to a given line in the two-dimension case.

View article online

**Date :** December 2012

**Description :**

Article and source code about how the hough transformation for detecting lines in images works.

View article online

**Date :** May 2012

**Description :**

Article and source code about three different algorithms how to rasterize a triangle.

View article online

**Date :** December 2011

**Description :**

Article and source code about how to detect if a point is inside a traingle.

View article online

**Date :** November 2015 (Updated September 2015, Original: October 2010)

**Description :**

Article and source code about evaluating mathematical expressions using three different algorithms.

View article online

**Date :** February 2010

**Description :**

Personal notes I made while I coded an applet as well as an automatic solver for the 14-15 puzzle.

View article online

**Date :** May 2008

**Description :**

My own notes about Welzl's algorithm for calculating a smallest enclosing disk (minimal enclosing circle) of a set of points in the plane.

View article online

**Date :** December 2007

**Description :**

My own notes about the Sutherland-Hodgman-Algorithm for clipping a polygon against a rectangle.

View article online

**Date :** December 2007

**Description :**

My own notes about the Cohen-Sutherland-Algorithm for clipping 2D lines against a rectangle.

View article online

**Date :** December 2010

**Description :**

My own notes about the Cohen-Sutherland-Algorithm for clipping 2D lines against a rectangle.

View article online

**Date :** September 2007 - July 2009

**Description :**

Discusses Polygon Convexity, Polygon Filling with the Scanline Algorithm and Polygon Triangulation with Kong's Algorithm.

View article online

**Date :** July 2007

**Description :**

Discusses Linear Interpolation of two points, Quadratic & Cubic Bezier Curves, The Bernstein Form of a Bézier Curve, The de Casteljau Algorithm and Degree Elevation.

View article online

**Description :**

Some time ago I dealt with 2D collisions of balls. So why not share what I have thought of :-) Here are some notes concerning simple 1D/2D collision of balls and two applets showing this stuff in action. Source included in the archive file.

View article online

Download article & sources (55KB)

**Date :** November 2003

**Description :**

Demonstrates how to add a splash screen to a PE file. To make less changes as possible to the exe file, we'll code a dll with the splash screen and add it simply to the import table.

View article online

Download article & sources (225KB)

**Date :** May 2002

**Description :**

Demonstrates how to code your own little tool which changes bytes in another file. Useful if you want to write something like a savegame editor. In my example we'll change a string. In this tut 2 ways are covered: one using delphi functions, the other using Win API functions for file-access.

View article online

Download article & sources (56KB)

**Date :** May 2002

**Description :**

Demonstrates how to manipulate another program's memory in order to change its behaviour. Only Windows API functions are used, so it should be no problem to convert it into another language.

View article online

Download article & sources (27KB)

**Date :** October 2020

**Description :**

This article addresses an key point in the projection pipeline of a 3D engine: the transformation of camera coordinates to perspective coordinates and finally to screen coordinates. Based on a very simplistic camera model (LHS system, camera at the origin, no translation or rotation), the single steps are mathematically derived step-by-step. Comes with a simpe C# demo application for visualization.

View article online

**Date :** December 2019

**Description :**

An article explaining the two-dimensional perp dot product and its geometric interpretation.

Download (PDF, 1434KB)

**Date :** May 2017

**Description :**

An article about the derivation of the two-dimensional dot product and its geometric interpretation.

Download (PDF, 1062KB)

**Date :** September 2011

**Description :**

A short primer on how to derivate the rotation of a point around the x-, y- and z-axis.

Download (PDF, 480KB)

**Date :** April 2010

**Description :**

This document contains my own notes about the so-called Birthday Problem or Birthday Paradox. This was written due to personal interest, in order to fully understand everything but also to get the required knowledge to explain this problem others in a logical way. Therefore, I also compare it to a similar problem and emphasize the difference. You should have a basic understanding of logic and probability calculation.

Download (PDF, 579KB)

**Date :** March 2008

**Description :**

Again I delt with Bezier curves and especially with the recursive formula of the de Casteljau Algorithm which bases on the recursive formula of Bernstein polynomials which finally bases on Pascal's Rule. None of the books here lying on my table contains the proof so here it is - in fact short and really simple!

Download (PDF, 29KB)

**Date :** August 2007

**Description :**

While reading about Bézier curves, I came several times across the formula for the derivative of Bernstein polynomials but I found nowhere how to get there. Also the fact that a Bernstein polynomial has just one maximum in [0,1], more specific at t = i/n, is easy to see but I did not find the proof in any book so here is my try to show it.

Download (PDF, 38KB)

This site is part of Sunshine's Homepage