Discretisation of 2 - Sphere (The Class S2Grid)

represents a grid of nodes on the sphere

On this page ...
Class Description
Defining a S2Grid
Plots
Complete Function list

Class Description

The class S2Grid is used in MTEX to store the set of specimen directions organized in a pole figure. Of central importance is also the plotting method of this class since it is used by almost all other plotting methods in MTEX to perform spherical plots.

Defining a S2Grid

There are various ways to define a S2Grid. Next, you find some examples. For a detailed description of possible specifications look for the documentation of the constructor S2Grid.

% equidistributions
S2G = equispacedS2Grid('points',100,'antipodal');  % specified by number of points
S2G = equispacedS2Grid('RESOLUTION',5*degree,'antipodal');  % specified by resolution

% regular grids
S2G = regularS2Grid('points',[72,19]); % specified by number of theta and rho steps
S2G = regularS2Grid('theta',linspace(0,2*pi,72),...
             'rho',linspace(0,pi/2,19)); % explicitly determine theta and rho values

% restrictes grids
S2G = equispacedS2Grid('points',100,'MAXTHETA',75*degree);  % specify maximum theta angle

Plots

plot(equispacedS2Grid('points',100,'antipodal'))  % plot the grid of nodes

Complete Function list

Syntax
S2Grid(theta,rho) % fills a Sphere with Nodes
regularS2Grid('resolution',5*degree) % construct regular polar and azimuthal spacing
equispacedS2Grid('resolution',5*degree) % construct equispaced nodes
Input
nodes@vector3d
Options
POINTS[nrho,ntheta] number of points to be generated
RESOLUTIONresolution of a equispaced grid
HEMISPHERE'lower', 'uper', 'complete', 'sphere', 'identified'}
THETAtheta angle
RHOrho angle
MINRHOstarting rho angle (default 0)
MAXRHOmaximum rho angle (default 2*pi)
MINTHETAstarting theta angle (default 0)
MAXTHETAmaximum theta angle (default pi)
Flags
REGULARgenerate a regular grid
EQUISPACEDgenerate equidistribution
ANTIPODALinclude antipodal symmetry
PLOTgenerate plotting grid
NO_CENTERommit point at center
RESTRICT2MINMAXrestrict margins to min / max
Examples
regularS2Grid('points',[72 19])
regularS2Grid('resolution',[5*degree 2.5*degree])
equispacedS2Grid('resolution',5*degree,'maxrho',pi)
plot(ans)
See also
vector3d/vector3d