Articles

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.




Programming / Algorithm articles

Overview:



Understanding and implementing fixed point numbers

Date : April 2017

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

View article online





Calculating permutations

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





Understanding and implementing Base64

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





Understanding and implementing CRC (Cyclic Redundancy Check) calculation

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





Algorithms for calculating the difference of dates in days

Date : December 2014

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

View article online





(Projected) Point on Line (2D) Algorithm

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





Applying Hough Transform for detecting lines in images

Date : December 2012

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

View article online





Software Rasterization Algorithms for Filling Triangles

Date : May 2012

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

View article online





Point-In-Triangle Algorithms

Date : December 2011

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

View article online





Parsing Algorithms

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





14-15 Puzzle

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





Welzl's 'Smallest enclosing disk' Algorithm

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





Cohen-Hodgman-Algorithm

Date : December 2007

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

View article online





Cohen-Sutherland-Algorithm

Date : December 2007

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

View article online





Bresenham-Algorithm

Date : December 2010

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

View article online





Polygon Algorithms

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





Introduction to Curves

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





Simple Collision of Two Balls

Date : May 2006

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)




Inserting a splash screen into an Exe file (through a dll) - "The easy way"

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)




Writing a Patcher in Delphi

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)




Writing a Loader in Delphi

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)


back to top



Math / Theory articles

Overview:



Derivation of the two-dimensional dot product

Date : May 2017

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

Download (PDF, 1062KB)





Rotation Derivation

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)





The Birthday Paradox

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)





Proof of Pascal's Rule

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)





The Derivative of Bernstein Polynomials

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)



back to top


This site is part of Sunshine's Homepage