I am *Damix* and I welcome you to my website, *Tangent Space*! A blog about the theory and practice of computer graphics. I am a rendering engineer and I like to write programs that display pretty things: games, scientific visualizations, maps, and more. Few things are more exciting than coding a graphic rendering algorithm and then seeing it in action on screen. This is why I made a blog to share what I learn about this exciting area of software development. *– Damix*

# Recent Articles

# The TBN Matrix

Let \(p_1\), \(p_2\) and \(p_3\) be the vertices of a triangle in a 3D space \(S\), with texture coordinates \((u_1, v_1)\), \((u_2, v_2)\) and \((u_3, v_3)\) respectively. Vectors \(\vec{p_1 p_2}\) and \(\vec{p_1 p_3}\) lie in a plane \(P\). Let \((\vec{t}, \vec{b})\) be a base of \(P\). then, there must exist \(\alpha, \beta, \gamma, \delta\) such that:
$$ \vec{p_1 p_2} = \alpha \vec{t} + \beta \vec{b} $$
$$ \vec{p_1 p_3} = \gamma \vec{t} + \delta \vec{b} $$

read more
# Coordinate systems

Let \(\vec{v}\) be a vector on a plane. Let’s assume that there exist two other vectors \(\vec{i}\) and \(\vec{j}\) on the same plane such that we can express \(\vec{v}\) as:
$$ \vec{v} = x \vec{i} + y \vec{j} $$
Where \(x, y \in \mathbb{R} \).
In such a scenario, we can call the ordered list \((\vec{i}, \vec{j})\) a coordinate system for the plane and we call the pair \((x, y)\) the coordinates of \(\vec{v}\) in that coordinate system.

read more
# The Pythagorean theorem

In this post I will provide an intuitive proof of a very foundational little result in elementary geometry: the Pythagorean theorem.
Statement Given a right triangle as the one in Figure 1.i with legs a and b and hypothenuse c, the Pythagorean theorem states that the area of the square whose side is c is the sum of the areas of the two squares having sides a and b. See Figure 1.

read more