hypersphere_surface, a MATLAB code which investigates a procedure for estimating the location of points on a hypersurface implicitly defined by a characteristic function or by a signed function.

In M dimensions, a characteristic function F for a region of points S has the property that F(X) is 1 for points inside S, and 0 otherwise. A characteristic function is thus discontinous. The set of discontinuity points for F is the boundary of S.

In M dimensions, suppose that the function F, presumably continuous, takes on both positive and negative values. Then we may be interested in the set of points X such that F(X) = 0, which we regard as the boundary between the sets where F is negative or positive. Assuming that F is continuous, or better yet, differentiable, then this boundary may be substantially easier to locate than in the characteristic function case.


The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.


hypersphere_surface is available in a MATLAB version.

Related Data and Programs:

edge, a MATLAB code which defines some test functions in 1D, 2D and 3D for the detection of edges.

hypersphere_properties, a MATLAB code which carries out various operations for an M-dimensional hypersphere, including converting between Cartesian and spherical coordinates, stereographic projection, sampling the surface of the sphere, and computing the surface area and volume.


levels, a MATLAB code which makes a contour plot, choosing the contour levels using random sampling.

shoreline, a MATLAB code which tries to identify and triangulate the 2D domain over which some function f(x,y) is nonnegative.

Source Code:

Last revised on 01 February 2019.