INTERFACE SPRange; IMPORT SPTriang; TYPE Point = SPTriang.Coords; Triangle = ARRAY[0..2] OF Point; Function = PROCEDURE (READONLY p: Point): LONGREAL; PROCEDURE OnTriangle( READONLY p, q, r: Point; func: Function; order: CARDINAL ): LONGREAL; (* Computes the maximum absolute function value "ABS(func(p))" over the spherical triangle with corners "p,q,r", using "(order+1)(order+2)/2" sample points. *) PROCEDURE OnSphere( func: Function; order: CARDINAL ): LONGREAL; (* Calls OnTriangle for 8 triangles that cover the sphere, and returns the MAX of all results. *) END SPRange.