INTERFACE VarKamSpring; IMPORT Energy; TYPE T <: Public; Public = Energy.T OBJECT length: REAL; (* Ideal edge length for. *) strength: REAL; (* Edge strength factor. *) METHODS init(): T; END; (* In Kamada's energy, a spring is placed between every pair of triangulation vertices u, v, adjacent or not, whose length is equal to the graph-theoretical distance between u and v in T. In this version, the distances are computed by setting each edge's length to "length * sqrt (Na/Nb + Nb/Na)" where "Na" and "Nb" are the endpoint degrees. *) END VarKamSpring. (* Last edited on 2001-05-21 02:35:52 by stolfi *)