Blog
Rendering thick lines with dashes
Rendering lines on the GPU is notoriously non-trivial. Especially if you want special features like dashing, or have high standards like proper blending of semi-transparent lines. In this post I explain how we render lines in pygfx.
read more ...GPU triangle tricks
In this post I list a couple of tricks that can be used in GPU shaders to bend the triangles to your will. Mostly as a reference for myself, but likely useful for others too.
read more ...On WebGPU, wgpu-py, and pygfx
I'm part of a team building a novel render engine based on WebGPU (the successor to OpenGL). In this post I explain what WebGPU is, how it came about, and how we're using it to power our graphics.
read more ...Using LogSeq to make notes and organize my thoughts
I've been trying LogSeq for organizing my notes and thoughts for a few months. I'm blown away and am now moving my previous notes into the system.
read more ...Gamma and sRGB in visualisation
Gamma correction and the sRGB colorspace are an often undervalued topic in computer graphics. Yet it's important to understand it if you work with colors. In this post I first give a brief explanation, and then dive deeper to explain different facets, and also explain how it affects render engines.
read more ...What I learned about collecting payments for digital goods in Europe
Selling (digital) products internationally is hard because of the complicated VAT rules. Fortunately there are services (MOR's) that make it easy to collect payments.
read more ...An effective approach to do Progressive Web Apps
This post explains the approach that I took to make TimeTagger a PWA (Progressive Web Application). There are many ways to implement a PWA (or in particular the Service Worker), and I don't claim that this approach is the best. But this approach is relatively simple and should be applicable in many cases.
read more ...Python and WebAssembly
Despite its name, WebAssembly is not limited to the browser. In fact, it's potential outside of the browser is at least as interesting. In this post I talk about some experimental work that we have done in combining WebAssembly with Python.
read more ...The thee language problem, and how Web Assembly will help solve it
Historically, languages are either easy to use *or* fast. Julia has shown us that we can have both. I argue that in this day and age, we may *also* aspire a language to run on the web and mobile devices. I'll explain how I think that Web Assembly will bring us closer to this goal.
read more ...Write Python 3, while supporting Python 2.7
In this post I discuss an approach for writing code in Python 3, and still support Python 2.7. I've recently used this approach in one of my own projects. Most projects should get away with only minor modifications and an automatic translation step during package-build. However, there are some pitfalls (bytes/str) that might need special attention.
read more ...We need more visualization libs - and a protocol to bind them
We have a rich ecosystem of visualization libraries, each with their own API. By splitting our libraries in a user-facing part and a rendering backend, and defining a standard to allow all these to connect, we can have a rich visualization ecosystem while users only have to learn one API.
read more ...The future of visualization in Python - are we going where we want to be?
Bokeh and VisPy are both awesome projects. However, I wonder whether we need to change where things are currently going. While Bokeh is great at 2D and the browser, 3D is not supported. While Vispy is super-fast and good at 3D and custom visualizations, it's support for the browser is poor. I don't want to tell scientists that they need two or three visualization libraries. I want it all in one library.
read more ...Performance gain for combining multiple GL objects into a single buffer
Rendering a set of 100.000 vertices with OpenGL is very fast. However, rendering 100 sets of 1000 vertices is significantly slower (even though the total number of vertices is the same). Therefore, in visualization libraries, collecting multiple objects in a single buffer can help increase performance. In this post I try to get a grip on how much this really matters. Result: it depends.
read more ...Comparing methods for box-layout in HTML
This post describes a small experiment that compares a few methods for doing a box-layout in HTML. On a variety of browsers the result was validated, and performance measured. The results show that the CSS ``display: flex`` method is the way to go.
read more ...Volume rendering in Vispy
We recently added volume rendering to [Vispy](http://vispy.org). In this post I'll describe the method that is used, what the advantages of this method are, and possible future additions. I tried to be gentle and explain the method without giving too much boring details. Plus there is some fancy footage to demonstrate the new functionality.
read more ...New task: don't forget to organize your ideas and knowledge too!
Like many people, I use todo lists to organize my tasks. I’ve tried different todo-list solutions and even made a few apps myself. In this post I try to explain what I learned from these tools, why organizing knowledge and ideas may be more important than organizing tasks, and why I like [Trello](http://trello.com) so much.
read more ...Scientists need a dynamic programming language
Dynamic programming languages provide great advantages due to their interactive workflow, especially in science where algorithms are complex and take many iterations to get right. Developer time is more important than CPU time; writing all your code in a static language is (often) a bad case of premature optimization. This post is a story about how I learned the importance of dynamic languages the hard way. I am sharing it here so that others might learn from it too. It also touches on some of the benefits of Python compared to Matlab.
read more ...The power of post-mortem debugging
Post-mortem debugging refers to the concept of entering debug mode *after* something has broken. There is no setting of breakpoints involved, so it's very quick and you *can* inspect the full stack trace, making it an effective way of tracing errors. This post explains some of the benefits and how it can be used from IEP and other environments.
read more ...The importance of open source software in science
For the first post in this blog I wanted to write something that really matters. At least to me. I tried to get at the core drivers behind what I do: what are the fundamental reasons why I love open source software so much? Here's why I think that open source is *necessary* to improve/fix the current scientific system and to guarantee our freedom to seek knowledge.
read more ...