September 30, 2018

Suppose that, having two 3D objects, we need to render the mesh that is obtained by subtracting one from the other. That is, we take one object, and remove from it the points belonging intersection between itself and the other object. For concretness, if we have a rectangular mesh B, and a shpere A, as in the drawing below, then the red outline corresponds to the set of points B - A.

September 6, 2017

While working on my webgl library for purescript, puregl, I needed to develop a scene graph structure to keep track of spatial relations between objects in a scene, and update all their transformation matrices. We can take as a simple model for a scene graph something like in the image below: one root node which represents the spatial origin, and the rest of the tree, consisting of nodes holding spatial properties like position, rotation, scale and the node’s transformation matrix.