sphgrid

Generates spherical grids including solid angles.

Syntax
grid = sphgrid(GridSymmetry,GridSize)
[grid,tri] = sphgrid(GridSymmetry,GridSize)
Description

sphgrid generates triangular grids of orientations over parts of the unit sphere and returns the grid knots and the solid angle of the Voronoi cells associated with the knots (orientations).

GridSymmetry specifies the symmetry of the grid. The higher the symmetry, the smaller the needed sphere surface can be, since rotational and reflectional symmetry makes parts of the surface redundant for EPR calculations.

Since all spectra in EPR are invariant with respect to inversion of the system, only centrosymmetric point groups are supported. For each point group, sphgrid returns a grid only over its unique surface. The following table lists the possible values for GridSymmetry together with the unique surface boundaries.

[eqn]

Note that some unique surfaces have open φ borders. This is treated correctly by sphgrid. There are never knots on open borders.

GridSize specifies the number of knots on the quarter meridian θ = [0, π/2], φ=0, i.e. from the North pole to the equator. The number of knots along the equator depends on the range of φ. Roughly, GridSize knots are taken for each quarter of the equator.

The output grid is a structure with the fields vecs, phi, theta, and weights. vecs is a 3xn array containing the orientations as column vectors. phi and theta are the polar angles in radians. weights is a vector giving the solid angle of the surface patch that can be attributed to each knot, i.e. the (spherical) area of the Voronoi cell. The sum of all weight is normalised to 4π.

tri is a structure with the fields idx and areas from a Delaunay triangulation of the orientational grid. idx is a nx3 array containing indices for the triangles along the rows. areas is a vector giving the (spherical) area of each Delaunay triangle.

Examples

A three-point grid over an octant gives

grid = sphgrid('D2h',4,'c');
[grid.phi; grid.theta]*180/pi, grid.weights
ans =
  Columns 1 through 6
         0         0   90.0000         0   45.0000   90.0000
         0   30.0000   30.0000   60.0000   60.0000   60.0000
  
  Columns 7 through 10
         0   30.0000   60.0000   90.0000
   90.0000   90.0000   90.0000   90.0000

ans =
  Columns 1 through 6
    0.4282    1.6262    1.6262    1.4083    2.8167    1.4083

  Columns 7 through 10
    0.5421    1.0841    1.0841    0.5421

and hence really the ten knots expected for a triangular grid. The weights of knots on the unique surface boundary are smaller than those of knots within the surface.

To plot a spherical grid over the upper hemisphere, use

[grid,tri] = sphgrid('Ci',10);
v = grid.vecs;
trisurf(tri.idx,v(1,:),v(2,:),v(3,:));
axis equal
See also

sphrand