Plate_Plate::SolEm

Forums: 

Hello,

I am reading the source code of class Plate_Plate. There are many magic constants like 1644 in the method SolEm(). Apparently they come from some mathematics. Could someone give me some hints about the reference literature for these formulas? Thanks.

- xzx

Zhongxing Xu's picture

I think I have figured them out after days of researching. They are the constants of the partial derivatives of the Thin Plate Splines: R^{degree} log(R), where R is the square of the distance of (u,v) to a center point (u_i, v_i).

Zhongxing Xu's picture

This is the sympy program to reproduce the expressions in SolEm. Terrific.

from sympy import *

U, V, m = symbols('U V m', real=True)
R = symbols('R', real=True)

f = (U**2+V**2)**(m-1) * log(U**2+V**2)

pd10 = diff(f, U)

result = simplify(factor(pd10))

print(result)

pd11 = diff(f, U, V)

result = simplify(factor(pd11))
print(result)

pd20 = diff(f, U, U)

result = simplify(factor(pd20.subs(V**2, R-U**2)))

print(result)

pd21 = diff(f, U, U, V)

result = simplify(factor(pd21.subs(V**2, R-U**2)))

print(result)

pd60 = diff(f, U, U, U, U, U, U)

result = simplify(factor(pd60.subs(V**2, R-U**2)))

print(result)