skal

Skal's corner: code snippets & demos

My day-job is -amongst other things- to write open-sourced code (like webp or sjpeg). But! I also like to write open-sourced code for fun :) Here are some side-projects demo pages:

Gaussian splats (aka 3DGS)

3DGS

Gaussian splats are the new cool in scene rendering, here’s my WebGPU version… It’s a good opportunity to use the compute pass on GPU.

Stippling toy

stipple

Some LBG algorithm live action, with a lot of parameters to play with.

Ising Model simulated with WebGPU

Ising-Model

Using WebGPU compute-shader, we can perform Monte-Carlo sampling (aka Metropolis method) for the 3D cubic Ising model of magnetic spins, at interactive frame-rate! Back in the days, these sort of computations would require days of work on a Pentium!

Curly thing

Curly thing!

An experimental WebGPU demo with some dynamic tesselation generated during the compute-shader pass. Kind of fun and demomaker-ish.

Welzl algorithm demo

A short demo in HTML showing convex hull and Welzl’s smallest enclosing circle algo (in 2D). Its main interest is the code, not really the page in itself.

Kruskal algorithm demo

Very simple and elegant way to extract the Minimum-Spanning Tree out of a set of points.

Triangle-based compression demo

Using triangulation + colormap to compress images into a very tight preview (compressed data is a base64 string).
The decoder is ~400 lines of javascript + WebGL.

See the paper presented at ICIP 2018.

What’s up with the root of Trees?

tree

The root of a tree is not that particular, as seen with this simple visualization of a random tree that lets you pick any node as root.

Thinning algorithms

thinning

Implementation of two thinning algorithms that extract skeletons from binarized images.

Exploring Difference Of Gaussian

DoG

Difference of Gaussian operator (as described in the original paper) has a lot of different parameters to play with.
This HTML+WebGL page lets you do just that.

QR Code generator

QR Code

Embed pictures in QR codes

My custom MPU9255 Gyro / AK8963 Magnetometer / MCP2221 micro library

I couldn’t find a library for this IMU, so i rewrote one. I also rewrote some I2C functions for a MCP2221 USB<->I2C micro-controller, so i could play with my IMU directly from my MacBook laptop. No longer have to use a Raspberry Pi!

Particles from life_code project

Explore randomly interacting particles. Click on ‘Random exploration’ button for interesting things to happen!

animation of the CVM algorithm library

CVM The CVM algorithm produces an online estimate of the number of unique elements in an input stream. This javascript animation shows how the estimation histogram evolves depending on the parameters.

Some shaders made with ShaderToy…

… and a Minishader to convert simple ShaderToy code to a standalone HTML + WebGL page.

shaders