Interpolation on Triangles

This tutorial is devoted to the implementation of an interpolation algorithm for two dimensional simplicial topologies (triangle elements). Scalar and vectorial functions given on vertices can be interpolated to the complete domain. Using point location each point can be assigned a covering cell which covers interpolation coefficients. The source files from the last tutorials can be used.

Tasks

Hints

Each triangle consists of 3 vertices so you have 3 equations for each of the vertices.

f_1 (x, y) = a + b \cdot x_1 + c \cdot y_1

f_2 (x, y) = a + b \cdot x_2 + c \cdot y_2

f_3 (x, y) = a + b \cdot x_3 + c \cdot y_3

Solve this equation system for a, b, c