Posts

Volko Hull - An Alternative to Convex Hull

When you have a point cloud and want to obtain the shape, you can use the convex hull or the alpha shape algorithm. In the computational geometry library I am using in my projects, CGAL, these algorithms are built-in, but they have a disadvantage: the points are not output in the correct order. I first tried to solve this problem by implementing a convex hull algorithm myself that outputs the points in the correct order, but this did not always help since it ignored concave corners. Therefore I wrote my own algorithm to replace it. My algorithm divides the rectangular area of the given cluster into four triangles and computes the points belonging to the outer border of each triangle. Thus it also includes concave corners. Imagine this to be the rectangle: -------- |\    /| | \ A/ | | C\/  | |  /\D | | /B \ | |/    \| -------- If it is a square, we can assume that its sides have a length of 2a. The coordinates of the mid point are always (0, 0). Then, the points have to fulfil the follo

Tiny Code Christmas

Every day until christmas, the organizers of Lovebyte post a new video with tutorials on creating size-limited intros for fantasy consoles. The first video can be watched here . The official website is located here .

Sol's Graphics Tutorial

Sol writes on Pouet : About a couple decades back I wrote a graphics/game programming tutorial based on SDL 1.2. It used to be a major driver of traffic to my site, so one or two of you may have come across it. Time has passed and because of the old SDL (and old compiler suites) the tutorial has been more or less obsolete. I've started to revamp it - not completely rewrite, as it still uses much of the old material (as basics don't really change). I'm basing it on SDL3, so it should be relevant for a while again. Well, as relevant as plotting pixels goes. As of this writing the first 10 chapters are here: solhsa.com/gp2/index.html  Go check it out!

Mesh Voxelizer in C#

Author: Adok A mesh voxelizer is an algorithm that converts arbitrary three-dimensional objects, usually specified as polygons, into voxels (vector objects), that is a collection of small rectangular objects. Such an algorithm is sometimes needed for processing and visualizing 3D objects. Some theoretical background on how a mesh voxelizer works is provided by the paper "An Accurate Method for Voxelizing Polygon Meshes" . In this article I would like to present you my solution in C#. My solution uses a simple data structure called Vert that can be defined as:     public class Vert     {         public double x, y, z;     } Moreover, it uses Verts, which is a list of elements of the Vert data type: using Verts = System.Collections.Generic.List<Vert>; The core of the mesh voxelizer is the following method:         public bool IsVoxelOnFace(double[] vc, double L, double Lx, double Ly, double Lz)         {             if (this.Verts.Count < 3) return false;            

SizeCoding.org

"SizeCoding.org is a wiki dedicated to the art of creating very tiny programs for most popular types of CPUs. [...] By 'very tiny programs', we mean programs that are 256 bytes or less in size, typically created by members of the demoscene as a show of programming skill. The size of these tiny programs is measured by their total size in opcode bytes, and are usually presented as an executable binary." http://www.sizecoding.org/

Hugi Online - Coding Collection

The collection of coding tutorials from Hugi #11 to #37 can be found at: https://www.hugi.scene.org/online/coding/ New coding tutorials will be posted to this blog.