3

Maybe you can find a heuristic to detect when it gets stuck (e.g. gradient magnitude is too small, or it stays on the same triangle or returns to a recently visited triangle too many times in a row, or it hasn't moved at least X distance over the last N steps, etc) and just take a random step in some direction, e.g. to some randomly chosen neighboring ...


2

It seems to be just a scalar Bezier function to me, where the second coefficient is determined by $a$ $$(1-x)^2 + a 2 (1-x) x,$$ here $a \in [0, 1]$ is a normalized percentage. This gets you pretty close to the function that is graphed, but the function will not be as flat for $a = 0$ and $a = 1$. I suspect the function is of a higher degree: $$(1-x)^3 + a 3(...


1

Most 2D graphics programs are able to do linear gradients with arbitrary orientations. If you don't mind a little work, it is possible to set this up to imitate the 2D linear interpolation across a triangle. Set up two layers: Pick two of the colors, say red and green, and set up a linear gradient between those two colors along the red-green edge. In a ...


1

When solving the equation $(M - tL_C)u = \delta_\gamma$, you effectively have to invert the operator: $$ u = (M - tL_C)^{-1} \delta_\gamma $$ Note that while the individual operators $M$ and $L_C$ are only local, containing information about the individual vertices and edges of the mesh, the inverse operator is decidedly not local. Inversion is a global ...


1

Assuming a value is assigned to each vertex of the mesh and we use purely linear interpolation, then there will be a constant gradient vector within each tetrahedron. Linear interpolation can be expressed using barycentric coordinates, like $$ f(x,y,z) = f_1 w_1(x,y,z) + f_2 w_2(x,y,z) + f_3 w_3(x,y,z) + f_4 w_4(x,y,z) $$ where $f_1 \ldots f_4$ are the ...


Only top voted, non community-wiki answers of a minimum length are eligible