Posts

Showing posts from September, 2023

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.