Geiger counter data logging in C#

I got my hands on a Geiger counter the other day. It’s a GMC-300E, they’re affordable, and the build quality is decent.

The device has an unlocked serial interface via USB, and the manufacturer has published the protocol documentation. This allows you to download the logged data and read life data from the Geiger-Müller tube, and with the 320 model also from the temperature sensor and gyroscope.

This is a quick guide on how to access the GMC-300E serial interface in C#.

Continue reading Continue reading

in dev by Comments Off on Geiger counter data logging in C#

Dev Notes: Seamless LODs, pt. 2 – Normal interpolation

It’s been a while since the last post in this series, in which I described how to gradually blend geometric levels of detail. Now that we have seamless geometry, it’s time to compute the geometry normals, so we can tell in which way the terrain is oriented relative to a light source, and calculate the lightness.

Now, this whole article is just a workaround for a very basic problem – a problem that might not even exist if it wasn’t for the strange ways the OpenGL API has grown and mutated over the years. Continue reading Continue reading

in dev by Comments Off on Dev Notes: Seamless LODs, pt. 2 – Normal interpolation

Simplicity and software

computerI’m trying to make the things I program simpler. This is true for the graphics stuff I’ve been doing but even more so for UI applications.

Not too long ago, I firmly believed in the mantra: the more settings, the more ways to tweak something, the better. This was important in a world of slow computers, crappy operating systems and overall shittyness. Everything is broken anyway, so if all of the internal workings are exposed, we can at least try and work around it.

I also remember reinstalling my operating system at least once every three months, with ISOs generated with a special tool that allowed me to strip out some of the garbage that came with the vanilla install. Getting a computer to run properly was mostly an exercise of fighting everything from the hardware layer up to the software itself. Hence, the “more settings are better” thing. Continue reading Continue reading

in dev by Comments Off on Simplicity and software

Dev Notes: Seamless LODs, pt. 1

In my previous articles, I’ve often mentioned Levels of Detail (LOD). In a nutshell, it means that things that are further away get rendered with a lower amount of detail. Since there is only limited memory and computational power available, it makes sense to put more effort into rendering things that are closer to the camera.

When rendering terrain, the typical approach is to divide the total area into multiple layers or rings that are centered on the camera position. Each layer will be rendered with about the same detail “count”. That means that they all have the same amount of detail relative to their area, but the bigger, outer layers will have a lower absolute amount of detail. These rings are called Levels of Detail. Continue reading Continue reading

in dev by Comments Off on Dev Notes: Seamless LODs, pt. 1

Binary file download in C# .Net with speed limiter

Downloading files over HTTP is easy in C#/.Net – in fact, it’s as easy as writing a single line of code:

new WebClient().DownloadFile("http://your.url", "saveAs_Filename.jpg");

However, there’s no .Net library function that allows you to limit the download speed. Here’s how you can write your own.

What you’ll need is at its core a simple TCP client. It will connect to a HTTP server, send a GET command, then receive the reply packets from the server until the server stops sending. This allows us to add speed measurement and speed limiting.
Continue reading Continue reading

in dev by Comments Off on Binary file download in C# .Net with speed limiter

Dev notes: The (un-)uncanny valley

Recently I’ve been working my way deeper into the area of landscape generation. The big question was: When does a landscape “look nice”?

If you enter “nice landscape” into a search engine of your choice, chances are you’ll end up with something like this. Continue reading

Continue reading

in dev by Comments Off on Dev notes: The (un-)uncanny valley

Procedural Planet in WebGL and Three.js

Holger Ludvigsen – Procedural Planet in WebGL and Three.js (part one, part two)

The articles discuss the concepts of cube to sphere transformation by normalizing the vertices, perlin noise, bump mapping and using the GPU to increase rendering speed. If you’ve been following my recent articles, this might be interesting to you as well.

Click “continue reading” for an embedded live demo. Continue reading Continue reading

in dev, echo by Comments Off on Procedural Planet in WebGL and Three.js