The function that computes the energy (or error) of the
deformation of the mesh from the flat outline to the sphere. This
depends on the locations of the points given in spherical
coordinates. The function is designed to take these as a vector
that is received from the optim
function.
E(
p,
Cu,
C,
L,
B,
T,
A,
R,
Rset,
i0,
phi0,
lambda0,
Nphi,
N,
alpha = 1,
x0,
nu = 1,
verbose = FALSE
)
Parameter vector of phi
and lambda
The upper part of the connectivity matrix
The connectivity matrix
Length of each edge in the flattened outline
Connectivity matrix
Triangulation in the flattened outline
Area of each triangle in the flattened outline
Radius of the sphere
Indices of points on the rim
Index of fixed point on rim
Latitude at which sphere curtailed
Longitude of fixed points
Number of free values of phi
Number of points in sphere
Area scaling coefficient
Area cut-off coefficient
Power to which to raise area
How much information to report
A single value, representing the energy of this particular configuration