The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Math::nSphere - calculate volumen and surface of n-spheres

SYNOPSIS

  use Math::nSphere qw(nsphere_surface nshepere_volumen);

  my $sur = nsphere_surface($dim - 1, $radius);
  my $vol = nsphere_volumen($dim - 1, $radius);

DESCRIPTION

This module provides functions to calculate the surface and the volumen of n-spheres of any dimension.

Note that n + 1 equals the space dimension. For instace, a circunference is a 1-sphere and a sphere is a 2-sphere.

$sur = nsphere_surface($n, $r)

Returns the surface of the n-sphere of the given radius (1.0 by default).

$vol = nsphere_volumen($n, $r)

Returns the volumen of the n-sphere of the given radius (1.0 by default).

SEE ALSO

n-sphere entry at the Wikipedia: http://en.wikipedia.org/wiki/N-sphere

COPYRIGHT AND LICENSE

Copyright (C) 2011 by Salvador Fandino (sfandino@yahoo.com)

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.12.3 or, at your option, any later version of Perl 5 you may have available.