n dimensional polar coordinates are given by the following: 
 rectangular x=(x[1],...,x[n])  corresponds to
   polar  (r,phi[1],...,phi[n-1]) by 
 x[1]  = r*cos(phi[1]) 
 x[j]  = r*prod(sin(phi[1:(j-1)]))*cos(phi[j]), 2 <= j <= n-1 
   ... 
 x[n]  = r*sin(phi[1])*sin(phi[2])*...*sin(phi[n-2])*sin(phi[n-1])
 
This is the defintion used in Wikipedia under the topic 'n-sphere'.
 There are variations of   this definition in use.
 Here phi[1],...,phi[n-2] are in [0,pi), and phi[n-1] is in [0,2*pi).
 For multivariate integration, the determinant of the Jacobian of the above tranformation
  is J(r,phi) = r^(n-1) * prod( sin(phi[1:(n-2)])^((n-2):1) );
  note that phi[n-1] does not appear in the Jacobian.