Rotations Group

  • BungeOfKocks
  • BungeOfRMat
  • CubBaseMesh
  • CubPolytope
  • CubSymmetries
  • HexBaseMesh
  • HexPolytope
  • HexSymmetries
  • KocksOfBunge
  • QuatOfAngleAxis
  • QuatOfRod
  • QuatProd
  • RMatOfBunge
  • RMatOfQuat
  • RodDifferential
  • RodDistance
  • RodGaussian
  • RodMetric
  • RodOfQuat
  • ToFundamentalRegion
  • ToFundamentalRegionQ

  • BungeOfKocks

    BungeOfKocks - Bunge angles from Kocks angles.

    Usage

    bunge = BungeOfKocks(kocks, units)

    Interactive Documentation

     BungeOfKocks - Bunge angles from Kocks angles.
       
       USAGE:
    
       bunge = BungeOfKocks(kocks, units)
    
       INPUT:
    
       kocks is 3 x n,
             the Kocks angles for the same orientations
       units is a string,
             either 'degrees' or 'radians'
    
       OUTPUT:
    
       bunge is 3 x n,
             the Bunge angles for n orientations 
    
       NOTES:
    
       *  The angle units apply to both input and output.
    
    

    BungeOfRMat

    BungeOfRMat - Bunge angles from rotation matrices.

    Usage

    bunge = BungeOfRMat(rmat, units)

    Interactive Documentation

     BungeOfRMat - Bunge angles from rotation matrices.
       
       USAGE:
    
       bunge = BungeOfRMat(rmat, units)
    
       INPUT:
    
       rmat  is 3 x 3 x n, 
             an array of rotation matrices
       units is a string,
             either 'degrees' or 'radians' specifying the output
             angle units
    
       OUTPUT:
    
       bunge is 3 x n,
             the array of Euler angles using Bunge convention
    
    

    CubBaseMesh

    CubBaseMesh - Return base mesh for cubic symmetries

    Usage

    m = CubBaseMesh()

    Interactive Documentation

       CubBaseMesh - Return base mesh for cubic symmetries
      
       USAGE:
    
       m = CubBaseMesh
    
       INPUT:  no inputs
    
       OUTPUT:
    
       m is a MeshStructure,
            on the cubic fundamental region
    
    

    CubPolytope

    CubPolytope - Polytope for cubic fundamental region.

    Usage

    cubp = CubPolytope()

    Interactive Documentation

     CubPolytope - Polytope for cubic fundamental region.
       
       USAGE:
    
       cubp = CubPolytope
    
       INPUT:  none
    
       OUTPUT:
    
       cubp is a PolytopeStructure:
            it gives the polytope for the cubic 
            fundamental region including the vertex
            list and the faces component (for plotting)
    
    

    CubSymmetries

    CubSymmetries - Return quaternions for cubic symmetry group.

    Usage

    csym = CubSymmetries()

    Interactive Documentation

     CubSymmetries - Return quaternions for cubic symmetry group.
    
       USAGE:
    
       csym = CubSymmetries
    
       INPUT:  none
    
       OUTPUT:
    
       csym is 4 x 24, 
            quaternions for the cubic symmetry group
    
    

    HexBaseMesh

    HexBaseMesh - Return base mesh for hexagonal symmetries

    Usage

    m = HexBaseMesh()

    Interactive Documentation

       HexBaseMesh - Return base mesh for hexagonal symmetries
      
       USAGE:
    
       m = HexBaseMesh
    
       INPUT:  none
    
       OUTPUT:
    
       m is a MeshStructure,
         on the hexagonal fundamental region
    
    

    HexPolytope

    HexPolytope - Polytope for hexagonal fundamental region.

    Usage

    hexp = HexPolytope()

    Interactive Documentation

     HexPolytope - Polytope for hexagonal fundamental region.
       
       USAGE:
    
       hexp = HexPolytope
    
       INPUT:  none
    
       OUTPUT:
    
       hexp is a PolytopeStructure:
            the polytope of the hexgonal fundamental region;
            it includes the vertex list and the list of
            polygonal faces
    
    

    HexSymmetries

    HexSymmetries - Quaternions for hexagonal symmetry group.

    Usage

    hsym = HexSymmetries()

    Interactive Documentation

     HexSymmetries - Quaternions for hexagonal symmetry group.
    
       USAGE:
    
       hsym = HexSymmetries
    
       INPUT:  none
    
       OUTPUT:
    
       hsym is 4 x 12,
            it is the hexagonal symmetry group represented
            as quaternions
       
    

    KocksOfBunge

    KocksOfBunge - Kocks angles from Bunge angles.

    Usage

    kocks = KocksOfBunge(bunge, units)

    Interactive Documentation

     KocksOfBunge - Kocks angles from Bunge angles.
       
       USAGE:
    
       kocks = KocksOfBunge(bunge, units)
    
       INPUT:
    
       bunge is 3 x n,
             the Bunge angles for n orientations 
       units is a string,
           either 'degrees' or 'radians'
    
       OUTPUT:
    
       kocks is 3 x n,
             the Kocks angles for the same orientations
    
       NOTES:
    
       *  The angle units apply to both input and output.
    
    

    QuatOfAngleAxis

    QuatOfAngleAxis - Quaternion of angle/axis pair.

    Usage

    quat = QuatOfAngleAxis(angle, raxis)

    Interactive Documentation

     QuatOfAngleAxis - Quaternion of angle/axis pair.
    
       USAGE:
    
       quat = QuatOfAngleAxis(angle, rotaxis)
    
       INPUT:
    
       angle is an n-vector, 
             the list of rotation angles
       raxis is 3 x n, 
             the list of rotation axes, which need not
             be normalized (e.g. [1 1 1]'), but must be nonzero
    
       OUTPUT:
    
       quat is 4 x n, 
            the quaternion representations of the given
            rotations.  The first component of quat is nonnegative.
       
    

    QuatOfRod

    QuatOfRod - Quaternion from Rodrigues vectors.

    Usage

    quat = QuatOfRod(rod)

    Interactive Documentation

     QuatOfRod - Quaternion from Rodrigues vectors.
       
       USAGE:
    
       quat = QuatOfRod(rod)
    
       INPUT:
    
       rod  is 3 x n, 
            an array whose columns are Rodrigues parameters
    
       OUTPUT:
    
       quat is 4 x n, 
            an array whose columns are the corresponding unit
            quaternion parameters; the first component of 
            `quat' is nonnegative
    
    

    QuatProd

    QuatProd - Product of two unit quaternions.

    Usage

    qp = QuatProd(q2, q1)

    Interactive Documentation

     QuatProd - Product of two unit quaternions.
       
       USAGE:
    
        qp = QuatProd(q2, q1)
    
       INPUT:
    
        q2, q1 are 4 x n, 
               arrays whose columns are quaternion parameters
    
       OUTPUT:
    
        qp is 4 x n, 
           the array whose columns are the quaternion parameters of 
           the product; the first component of qp is nonnegative
    
        NOTES:
    
        *  If R(q) is the rotation corresponding to the
           quaternion parameters q, then 
           
           R(qp) = R(q2) R(q1)
    
    

    RMatOfBunge

    RMatOfBunge - Rotation matrix from Bunge angles.

    Usage

    rmat = RMatOfBunge(bunge, units)

    Interactive Documentation

     RMatOfBunge - Rotation matrix from Bunge angles.
    
       USAGE:
    
       rmat = RMatOfBunge(bunge, units)
    
       INPUT:
    
       bunge is 3 x n,
             the array of Bunge parameters
       units is a string,
             either 'degrees' or 'radians'
           
       OUTPUT:
    
       rmat is 3 x 3 x n,
            the corresponding rotation matrices
       
    

    RMatOfQuat

    RMatOfQuat - Convert quaternions to rotation matrices.

    Usage

    rmat = RMatOfQuat(quat)

    Interactive Documentation

     RMatOfQuat - Convert quaternions to rotation matrices.
       
       USAGE:
    
       rmat = RMatOfQuat(quat)
    
       INPUT:
    
       quat is 4 x n, 
            an array of quaternion parameters
    
       OUTPUT:
    
       rmat is 3 x 3 x n, 
            the corresponding array of rotation matrices
    
       NOTES:
    
       *  This is not optimized, but still does okay
          (about 6,700/sec on intel-linux ~2GHz)
    
    

    RodDifferential

    RodDifferential - Differential map for Rodrigues

    Usage

    diff = RodDifferential(rmesh, refpts)

    Interactive Documentation

     RodDifferential - Differential map for Rodrigues
       
       USAGE:
    
       diff = RodDifferential(rmesh, refpts)
    
       INPUT:
    
       mesh   is a mesh,
              on a Rodrigues mesh
       refpts is 4 x n,
              a list of points in the reference element,
              usually the quadrature points, given in barycentric
              coordinates
    
       OUTPUT:
    
       diff is 4 x 3 x nq,
            a list of tangent vectors at each reference
            point for each element; nq is the number of global
            quadrature points, that is n x ne, where ne is the
            number of elements
    
    

    RodDistance

    RodDistance - Find angular distance between rotations.

    Usage

    dist = RodDistance(pt, ptlist, sym)

    Interactive Documentation

     RodDistance - Find angular distance between rotations.
       
       USAGE:
    
       dist = RodDistance(pt, ptlist, sym)
    
       INPUT:
    
       pt     is 3 x 1, 
              a point given in Rodrigues parameters
       ptlist is 3 x n, 
              a list of points, also Rodrigues 
       sym    is 4 x m, 
              the symmetry group in quaternions
    
       OUTPUT:
    
       dist   is 1 x n, 
              the distance between `pt' and each point in `ptlist'
    
    

    RodGaussian

    RODGAUSSIAN - Gaussian distribution on angular distance.

    Usage

    gauss = RodGaussian(cen, pts, stdev, sym)

    Interactive Documentation

     RODGAUSSIAN - Gaussian distribution on angular distance.
       
       USAGE:
    
       gauss = RodGaussian(cen, pts, stdev, sym)
    
       INPUT:
    
       cen   is 3 x 1, 
             the center of the distribution (in Rodrigues parameters)
       pts   is 3 x n, 
             a list of points (Rodrigues parameters)
       stdev is 1 x 1, 
             the standard deviation of the distribution
       sym   is 4 x k, 
             the symmetry group (quaternions)
    
       OUTPUT:
    
       gauss is 1 x n, 
             the list of values at each input point
    
       NOTES:
    
       *  This returns the values of a (not normalized) 1D Gaussian 
          applied to angular distance from the center point 
       *  The result is not normalized to have unit integral.
    
    

    RodMetric

    RodMetric - find volume integration factor due to metric

    Usage

    metric = RodMetric(rod)

    Interactive Documentation

     RodMetric - find volume integration factor due to metric
       
       USAGE:
    
       metric = RodMetric(rod)
       
       INPUT:
    
       rod is 3 x n, 
           an array of 3-vectors (Rodrigues parameters)
    
       OUTPUT:
    
       metric is 1 x n, 
              the metric at each point of `rod'
    
    

    RodOfQuat

    RodOfQuat - Rodrigues parameterization from quaternion.

    Usage

    rod = RodOfQuat(quat)

    Interactive Documentation

     RodOfQuat - Rodrigues parameterization from quaternion.
       
       USAGE:
    
       rod = RodOfQuat(quat)
    
       INPUT:
    
       quat is 4 x n, 
            an array whose columns are quaternion paramters; 
            it is assumed that there are no binary rotations 
            (through 180 degrees) represented in the input list
    
       OUTPUT:
    
      rod is 3 x n, 
          an array whose columns form the Rodrigues parameterization 
          of the same rotations as quat
     
    

    ToFundamentalRegion

    ToFundamentalRegion - Put rotation in fundamental region.

    Usage

    rod = ToFundamentalRegion(quat, qsym)

    Interactive Documentation

     ToFundamentalRegion - Put rotation in fundamental region.
       
       USAGE:
    
       rod = ToFundamentalRegion(quat, qsym)
    
       INPUT:
    
       quat is 4 x n, 
            an array of n quaternions
       qsym is 4 x m, 
            an array of m quaternions representing the symmetry group
    
       OUTPUT:
    
       rod is 3 x n, 
           the array of Rodrigues vectors lying in the fundamental 
           region for the symmetry group in question
    
       NOTES:  
    
       *  This routine is very memory intensive since it 
          applies all symmetries to each input quaternion.
    
    

    ToFundamentalRegionQ

    ToFundamentalRegionQ - To quaternion fundamental region.

    Usage

    q = ToFundamentalRegionQ(quat, qsym)

    Interactive Documentation

     ToFundamentalRegionQ - To quaternion fundamental region.
       
       USAGE:
    
       q = ToFundamentalRegionQ(quat, qsym)
    
       INPUT:
    
       quat is 4 x n, 
            an array of n quaternions
       qsym is 4 x m, 
            an array of m quaternions representing the symmetry group
    
       OUTPUT:
    
       q is 4 x n, the array of quaternions lying in the
                   fundamental region for the symmetry group 
                   in question
    
       NOTES:  
    
       *  This routine is very memory intensive since it 
          applies all symmetries to each input quaternion.