Smooth random motions with differentiable random providers

Real-world movements are restricted by the laws of physics. E.g, body is required to move in a continuous motion without any sudden jumps. When modelling NPCs, a realistic movement is essential. Furthermore, mostly is is desirable for the NPC to move randomly. Most programming languages include random number generators, sometimes even for pre-defined probability distributions. […]

, , , ,

Leave a comment

Matching error-prone sequences of numbers (e.g. time codes) to each other

Some form of events are common in most software systems. If those events are logged with a timestamp, you get an ordered number sequence (if the timestamp is interpreted as a number). Sometimes it is desirable to compare two logs to each other and evaluate how similar they are. E.g. two users want to determine […]

, , , ,

2 Comments

Generic Run-length encoding (RLE) for C#

RLE is a very simple form of data compression that deflates repeated elements in a sequence. For a current project, I needed an implementation of RLE in C#. So I looked around on the internet. I was surprised that most implementations were quite simplistic and didn’t nearly fit my needs. One shortcoming of many implementations […]

, , ,

5 Comments

Binding to a 2D-array in WPF

WPF’s binding feature is really great to create user interfaces. However, sometimes it has its boundaries. Binding to multi-dimensional arrays is one of those. In this post I will show an alternate approach how to make the binding work. Binding a UI-control to a one-dimensional array is quite simple. The following code will display the […]

, , , , ,

Leave a comment

The SDX SpriteTextRenderer now supports SharpDX

As already mentioned in several posts, I’ve been developing a library for rendering sprites and text with DirectX 11. Up to now this library was available exclusively for SlimDX applications. Up to now. With the help of the newest member of the STR team, Lior Lahav, the library was able to evolve to a framework, […]

, , , , ,

Leave a comment

Serialize a multi-dimensional array in a dynamic order

When you work with multi-dimensional arrays, sometimes you need to serialize the data into a one-dimensional array. This might be due to several reasons. Maybe some third-party method cannot handle multi-dimensionaly arrays, you want to store the array in a file or whatever reason there might be. There are several situations where multi-dimensional arrays are […]

Leave a comment

Elastic collision of circles and spheres

Inspired by a question on StackOverflow I decided to write a short article about the physics of elastic collisions. The principle is always the same. But for reasons of simplicity I will explain everything by taking the example of sphere collisions. Due to the nature of spheres the algorithms can be used directly for hyper […]

, ,

Leave a comment

Follow

Get every new post delivered to your Inbox.