What has always fascinated me about computer demos is that they often contained highly optimized code. Back then, this was out of necessity, because computers at the time weren’t very powerful, and it was the only way to display on screen what these demos were meant to show. Later on, it simply became a tradition. I myself took part in a coding contest in 1998 where participants had to implement a given specification in assembly language, and the program with the smallest code size would win. I took first place in that contest. I’d be interested to know if you could come up with a program as small as mine—or perhaps even smaller. That could serve as a measure of whether AI has already reached human-level intelligence. The following protocol is mainly in German. You can use tools such as DeepL for translation. An Computerdemos hat mich immer fasziniert, dass sie oft sehr stark optimierten Code enthielten. Früher war das aus Notwendigkeit heraus, weil die damaligen Rechner nicht se...
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). Th...
Gargaj wrote a tutorial for newbies who want to code demos. It shows how to make a simple demo in less than 400 lines of C++ code. Link: https://gargaj.github.io/demos-for-dummies/
Comments
Post a Comment