Learn R Programming

uniformly (version 0.5.0)

surface_sphere: Sphere surface

Description

Surface of a sphere (arbitrary dimension).

Usage

surface_sphere(d, r = 1)

Value

The surface of the sphere of radius r in the d-dimensional space.

Arguments

d

dimension of the space

r

radius of the sphere

Examples

Run this code
r <- 2
surface_sphere(3, r)
4*pi*r^2
# perimeter of the unit circle:
surface_sphere(2)

Run the code above in your browser using DataLab