# doc-cache created by Octave 5.1.0
# name: cache
# type: cell
# rows: 3
# columns: 69
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
anglePoints3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 528
 -- Function File: ALPHA = anglePoints3d (P1, P2)
 -- Function File: ALPHA = anglePoints3d (P1, P2,P3)
 -- Function File: ALPHA = anglePoints3d (PTS)
     Compute angle between three 3D points

     ALPHA = anglePoints3d(P1, P2) Computes angle (P1, O, P2), in
     radians, between 0 and PI.

     ALPHA = anglePoints3d(P1, P2, P3) Computes angle (P1, P2, P3), in
     radians, between 0 and PI.

     ALPHA = anglePoints3d(PTS) PTS is a 3x3 or 2x3 array containing
     coordinate of points.

     See also: points3d, angles3d.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 37
Compute angle between three 3D points



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
angleSort3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 979
 -- Function File: PTS2 = angleSort3d (PTS)
 -- Function File: PTS2 = angleSort3d (PTS,PTS0)
 -- Function File: PTS2 = angleSort3d (PTS,PTS0,PTS1)
 -- Function File: [PTS2 I]= angleSort3d (...)
     Sort 3D coplanar points according to their angles in plane

     PTS2 = angleSort3d(PTS); Considers all points are located on the
     same plane, and sort them according to the angle on plane.  PTS is
     a [Nx2] array.  Note that the result depend on plane orientation:
     points can be in reverse order compared to expected.  The reference
     plane is computed besed on the 3 first points.

     PTS2 = angleSort3d(PTS, PTS0); Computes angles between each point
     of PTS and PT0.  By default, uses centroid of points.

     PTS2 = angleSort3d(PTS, PTS0, PTS1); Specifies the point which will
     be used as a start.

     [PTS2, I] = angleSort3d(...); Also return in I the indices of PTS,
     such that PTS2 = PTS(I, :);

     See also: points3d, angles3d, angleSort.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 58
Sort 3D coplanar points according to their angles in plane



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
angles3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1460
 -- Function File: angles3d ()
     ANGLES3D Conventions for manipulating angles in 3D

     Contrary to the plane, there are no oriented angles in 3D. Angles
     between lines or between planes are comprised between 0 and PI.

     Spherical angles Spherical angles are defined by 2 angles: * THETA,
     the colatitude, representing angle with Oz axis (between 0 and PI)
     * PHI, the azimut, representing angle with Ox axis of horizontal
     projection of the direction (between 0 and 2*PI)

     Spherical coordinates can be represented by THETA, PHI, and the
     distance RHO to the origin.

     Euler angles Some functions for creating rotations use Euler
     angles.  They follow the ZYX convention in the global reference
     system, that is eqivalent to the XYZ convention ine a local
     reference system.  Euler angles are given by a triplet of angles
     [PHI THETA PSI] that represents the succession of 3 rotations: *
     rotation around X by angle PSI ("roll") * rotation around Y by
     angle THETA ("pitch") * rotation around Z by angle PHI ("yaw")

     In this library, euler angles are given in degrees.  The functions
     that use euler angles use the keyword 'Euler' in their name.

     See also: cart2sph2, sph2cart2, cart2sph2d, sph2cart2d
     anglePoints3d, angleSort3d, sphericalAngle, randomAngle3d
     dihedralAngle, polygon3dNormalAngle, eulerAnglesToRotation3d
     rotation3dAxisAndAngle, rotation3dToEulerAngles.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
ANGLES3D Conventions for manipulating angles in 3D



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
boundingBox3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 538
 -- Function File: BOX = boundingBox3d (POINTS)
     Bounding box of a set of 3D points

     Returns the bounding box of the set of points POINTS. POINTS is a
     N-by-3 array containing points coordinates.  The result BOX is a
     1-by-6 array, containing: [XMIN XMAX YMIN YMAX ZMIN ZMAX]

     Example
     # Draw bounding box of a cubeoctehedron [v e f] =
     createCubeOctahedron; box3d = boundingBox3d(v); figure; hold on;
     drawMesh(v, f); drawBox3d(box3d); axis([-2 2 -2 2 -2 2]); view(3)

     See also: boxes3d, drawBox3d.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 34
Bounding box of a set of 3D points



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
box3dVolume


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 389
 -- Function File: V = box3dVolume (BOX)
     Volume of a 3-dimensional box

     A box is represented as a set of limits in each direction: BOX =
     [XMIN XMAX YMIN YMAX ZMIN ZMAX].

     Example
            [n e f] = createCubeOctahedron;
            box = boundingBox3d(n);
            vol = box3dVolume(box)
            vol =
                8

     See also: boxes3d, boundingBox3d.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 29
Volume of a 3-dimensional box



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
boxes3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 453
 -- Function File: boxes3d ()
     BOXES3D Description of functions operating on 3D boxes

     A box defined by its coordinate extents: BOX = [XMIN XMAX YMIN YMAX
     ZMIN ZMAX].

     Example # Draw a polyhedron together with its bounding box [n e f]=
     createIcosahedron; drawPolyhedron(n, f); hold on;
     drawBox3d(point3dBounds(n))

     See also: point3dBounds, box3dVolume, drawBox3d intersectBoxes3d,
     mergeBoxes3d, randomPointInBox3d.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
BOXES3D Description of functions operating on 3D boxes



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
cart2cyl


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 759
 -- Function File: CYL = cart2cyl (POINT)
 -- Function File: CYL = cart2cyl (X, Y, Z)
     Convert cartesian to cylindrical coordinates

     CYL = cart2cyl(POINT) convert the 3D cartesian coordinates of
     points POINT (given by [X Y Z] where X, Y, Z have the same size)
     into cylindrical coordinates CYL, given by [THETA R Z]. THETA is
     the arctangent of the ratio Y/X (between 0 and 2*PI) R can be
     computed using sqrt(X^2+Y^2) Z keeps the same value.  The size of
     THETA, and R is the same as the size of X, Y and Z.

     CYL = cart2cyl(X, Y, Z) provides coordinates as 3 different
     parameters

     Example
            cart2cyl([-1 0 2])
            gives : 4.7124    1.0000     2.0000

     See also: agles3d, cart2pol, cart2sph2.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Convert cartesian to cylindrical coordinates



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
cart2sph2


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 854
 -- Function File: [THETA PHI RHO] = cart2sph2([X Y Z])
 -- Function File: [THETA PHI RHO] = cart2sph2(X, Y, Z)
     Convert cartesian coordinates to spherical coordinates

     The following convention is used: THETA is the colatitude, in
     radians, 0 for north pole, +pi for south pole, pi/2 for points with
     z=0.  PHI is the azimuth, in radians, defined as matlab cart2sph:
     angle from Ox axis, counted counter-clockwise.  RHO is the distance
     of the point to the origin.  Discussion on choice for convention
     can be found at:
     <http://www.physics.oregonstate.edu/bridge/papers/spherical.pdf>

     Example:
            cart2sph2([1 0 0])  returns [pi/2 0 1];
            cart2sph2([1 1 0])  returns [pi/2 pi/4 sqrt(2)];
            cart2sph2([0 0 1])  returns [0 0 1];

     See also: angles3d, sph2cart2, cart2sph, cart2sph2d.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
Convert cartesian coordinates to spherical coordinates



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
cart2sph2d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 958
 -- Function File: [THETA PHI RHO] = cart2sph2d (COORD)
 -- Function File: [...] = cart2sph2d (X,Y,Z)
     Convert cartesian coordinates to spherical coordinates in degrees

     The following convention is used: THETA is the colatitude, in
     degrees, 0 for north pole, 180 degrees for south pole, 90 degrees
     for points with z=0.  PHI is the azimuth, in degrees, defined as
     matlab cart2sph: angle from Ox axis, counted counter-clockwise.
     RHO is the distance of the point to the origin.  Discussion on
     choice for convention can be found at:
     <http://www.physics.oregonstate.edu/bridge/papers/spherical.pdf>

     Example:
              cart2sph2d([1 0 0])
              ans =
                90   0   1

              cart2sph2d([1 1 0])
              ans =
                90   45   1.4142

              cart2sph2d([0 0 1])
              ans =
                0    0    1

     See also: angles3d, sph2cart2d, cart2sph, cart2sph2.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 65
Convert cartesian coordinates to spherical coordinates in degrees



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
circle3dOrigin


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 323
 -- Function File: P = circle3dOrigin([XC YC ZC R THETA PHI])
 -- Function File: P = circle3dOrigin([XC YC ZC R THETA PHI PSI])
     Return the first point of a 3D circle

     Returns the origin point of the circle, i.e.  the first point used
     for drawing circle.

     See also: circles3d, points3d, circle3dPosition.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 37
Return the first point of a 3D circle



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
circle3dPoint


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 659
 -- Function File: POINT = circle3dPoint (CIRCLE,POS)
     Coordinates of a point on a 3D circle from its position

     Example
            circle = [0 0 0 1 45 45 0];
            # Draw some points on a 3D circle
              figure; hold on;
              # origin point
              pos1 = 0;
              drawPoint3d(circle3dPoint(circle, pos1), 'ro')
              # few points regularly spaced
              for i = 10:10:40
                  drawPoint3d(circle3dPoint(circle, i))
              end
              # Draw point opposite to origin
              drawPoint3d(circle3dPoint(circle, 180), 'k*')

     See also: circles3d, circle3dPosition.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 55
Coordinates of a point on a 3D circle from its position



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
circle3dPosition


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 412
 -- Function File: POS = circle3dPosition(POINT, CIRCLE)
     Return the angular position of a point on a 3D circle

     Returns angular position of point on the circle, in degrees,
     between 0 and 360.  with POINT: [xp yp zp] and CIRCLE: [X0 Y0 Z0 R
     THETA PHI] or [X0 Y0 Z0 R THETA PHI PSI] (THETA being the
     colatitude, and PHI the azimut)

     See also: circles3d, circle3dOrigin, circle3dPoint.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
Return the angular position of a point on a 3D circle



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
circles3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 703
 -- Function File: circles3d ()
     CIRCLES3D Description of functions operating on 3D circles

     Circles are represented by a center, a radius and a 3D angle
     representing the normal of the plane containing the circle.  C =
     [xc yc zc R theta phi psi].  THETA is the colatitude of the normal,
     in degrees, between 0 and 180 PHI is the azimut of the normal, in
     degrees, between 0 and 360 PSI is the proper rotation of the circle
     around the normal, between 0 and 360 degrees The parameter PSI is
     used to locate a point on the 3D circle.

     See also: circle3dOrigin, circle3dPosition, circle3dPoint,
     intersectPlaneSphere drawCircle3d, drawCircleArc3d, drawEllipse3d.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 58
CIRCLES3D Description of functions operating on 3D circles



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
clipLine3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 456
CLIPLINE3D Clip a line with a box and return an edge

   EDGE = clipLine3d(LINE, BOX);
   Clips the line LINE with the bounds given in BOX, and returns the
   corresponding edge. 

   If the line lies totally outside of the box, returns a 1-by-6 row array
   containing only NaN's.

   If LINE is a N-by-6 array, with one line by row, returns the clipped
   edge coresponding to each line in a N-by-6 array.

   See also:
   lines3d, edges3d, createLine3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 52
CLIPLINE3D Clip a line with a box and return an edge



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
createPlane


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1058
 -- Function File: PLANE = createPlane (PTS)
 -- Function File: PLANE = createPlane (P0, N)
 -- Function File: PLANE = createPlane (P1, P2, P3)
     Create a plane in parametrized form

     PLANE = createPlane(PTS) The 3 points are packed into a single 3x3
     array.

     PLANE = createPlane(P0, N); Creates a plane from a point and from a
     normal to the plane.  The parameter N is given either as a 3D
     vector (1-by-3 row vector), or as [THETA PHI], where THETA is the
     colatitute (angle with the vertical axis) and PHI is angle with Ox
     axis, counted counter-clockwise (both given in radians).

     PLANE = createPlane(P1, P2, P3) creates a plane containing the 3
     points

     The created plane data has the following format: PLANE = [X0 Y0 Z0
     DX1 DY1 DZ1 DX2 DY2 DZ2], with - (X0, Y0, Z0) is a point belonging
     to the plane - (DX1, DY1, DZ1) is a first direction vector - (DX2,
     DY2, DZ2) is a second direction vector The 2 direction vectors are
     normalized and orthogonal.

     See also: planes3d, medianPlane.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 35
Create a plane in parametrized form



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 25
createRotation3dLineAngle


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 487
CREATEROTATION3DLINEANGLE Create rotation around a line by an angle theta

   MAT = createRotation3dLineAngle(LINE, ANGLE)

   Example
     origin = [1 2 3];
     direction = [4 5 6];
     line = [origin direction];
     angle = pi/3;
     rot = createRotation3dLineAngle(line, angle);
     [axis angle2] = rotation3dAxisAndAngle(rot);
     angle2
     angle2 =
           1.0472

   See also
   transforms3d, rotation3dAxisAndAngle, rotation3dToEulerAngles,
   eulerAnglesToRotation3d




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 73
CREATEROTATION3DLINEANGLE Create rotation around a line by an angle theta



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
createRotationOx


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 941
 -- Function File: TRANS = createRotationOx (THETA)
 -- Function File: TRANS = createRotationOx (ORIGIN,THETA)
 -- Function File: TRANS = createRotationOx (X0,Y0,Z0,THETA)
     Create the 4x4 matrix of a 3D rotation around x-axis

     TRANS = createRotationOx(THETA); Returns the transform matrix
     corresponding to a rotation by the angle THETA (in radians) around
     the Ox axis.  A rotation by an angle of PI/2 would transform the
     vector [0 1 0] into the vector [0 0 1].

     The returned matrix has the form: [1 0 0 0] [0 cos(THETA)
     -sin(THETA) 0] [0 sin(THETA) cos(THETA) 0] [0 0 0 1]

     TRANS = createRotationOx(ORIGIN, THETA); TRANS =
     createRotationOx(X0, Y0, Z0, THETA); Also specifies origin of
     rotation.  The result is similar as performing translation(-X0,
     -Y0, -Z0), rotation, and translation(X0, Y0, Z0).

     See also: transforms3d, transformPoint3d, createRotationOy,
     createRotationOz.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 52
Create the 4x4 matrix of a 3D rotation around x-axis



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
createRotationOy


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 941
 -- Function File: TRANS = createRotationOy (THETA)
 -- Function File: TRANS = createRotationOy (ORIGIN,THETA)
 -- Function File: TRANS = createRotationOy (X0,Y0,Z0,THETA)
     Create the 4x4 matrix of a 3D rotation around x-axis

     TRANS = createRotationOy(THETA); Returns the transform matrix
     corresponding to a rotation by the angle THETA (in radians) around
     the Oy axis.  A rotation by an angle of PI/2 would transform the
     vector [0 1 0] into the vector [0 0 1].

     The returned matrix has the form: [1 0 0 0] [0 cos(THETA)
     -sin(THETA) 0] [0 sin(THETA) cos(THETA) 0] [0 0 0 1]

     TRANS = createRotationOy(ORIGIN, THETA); TRANS =
     createRotationOy(X0, Y0, Z0, THETA); Also specifies origin of
     rotation.  The result is similar as performing translation(-X0,
     -Y0, -Z0), rotation, and translation(X0, Y0, Z0).

     See also: transforms3d, transformPoint3d, createRotationOx,
     createRotationOz.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 52
Create the 4x4 matrix of a 3D rotation around x-axis



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
createRotationOz


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 941
 -- Function File: TRANS = createRotationOz (THETA)
 -- Function File: TRANS = createRotationOz (ORIGIN,THETA)
 -- Function File: TRANS = createRotationOz (X0,Y0,Z0,THETA)
     Create the 4x4 matrix of a 3D rotation around x-axis

     TRANS = createRotationOz(THETA); Returns the transform matrix
     corresponding to a rotation by the angle THETA (in radians) around
     the Oz axis.  A rotation by an angle of PI/2 would transform the
     vector [0 1 0] into the vector [0 0 1].

     The returned matrix has the form: [1 0 0 0] [0 cos(THETA)
     -sin(THETA) 0] [0 sin(THETA) cos(THETA) 0] [0 0 0 1]

     TRANS = createRotationOz(ORIGIN, THETA); TRANS =
     createRotationOz(X0, Y0, Z0, THETA); Also specifies origin of
     rotation.  The result is similar as performing translation(-X0,
     -Y0, -Z0), rotation, and translation(X0, Y0, Z0).

     See also: transforms3d, transformPoint3d, createRotationOx,
     createRotationOy.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 52
Create the 4x4 matrix of a 3D rotation around x-axis



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
createScaling3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 749
 -- Function File: TRANS = createScaling3d (S)
 -- Function File: TRANS = createScaling3d (SX, SY, SZ)
     Create the 4x4 matrix of a 3D scaling

     TRANS = createScaling3d(S); returns the scaling transform
     corresponding to a scaling factor S in each direction.  S can be a
     scalar, or a 1x3 vector containing the scaling factor in each
     direction.

     TRANS = createScaling3d(SX, SY, SZ); returns the scaling transform
     corresponding to a different scaling factor in each direction.

     The returned matrix has the form :
     [SX 0 0 0] [ 0 SY 0 0] [ 0 0 SZ 0] [ 0 0 0 0]

     See also: transforms3d, transformPoint3d, transformVector3d,
     createTranslation3d, createRotationOx, createRotationOy,
     createRotationOz.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 37
Create the 4x4 matrix of a 3D scaling



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
createTranslation3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 601
 -- Function File: = createTranslation3d (DX, DY, DZ)
 -- Function File: = createTranslation3d (VECT)
     Create the 4x4 matrix of a 3D translation

     usage: TRANS = createTranslation3d(DX, DY, DZ); return the
     translation corresponding to DX and DY. The returned matrix has the
     form : [1 0 0 DX] [0 1 0 DY] [0 0 1 DZ] [0 0 0 1]

     TRANS = createTranslation3d(VECT); return the translation
     corresponding to the given vector [x y z].

     See also: transforms3d, transformPoint3d, transformVector3d,
     createRotationOx, createRotationOy, createRotationOz,
     createScaling3d.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 41
Create the 4x4 matrix of a 3D translation



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
cyl2cart


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 680
 -- Function File: CART = cyl2cart (CYL)
 -- Function File: CART = cyl2cart (THETA,R,Z)
     Convert cylindrical to cartesian coordinates

     CART = cyl2cart(CYL) convert the 3D cylindrical coordinates of
     points CYL (given by [THETA R Z] where THETA, R, and Z have the
     same size) into cartesian coordinates CART, given by [X Y Z]. The
     transforms is the following : X = R*cos(THETA); Y = R*sin(THETA); Z
     remains inchanged.

     CART = cyl2cart(THETA, R, Z) provides coordinates as 3 different
     parameters

     Example
            cyl2cart([-1 0 2])
            gives : 4.7124    1.0000     2.0000

     See also: angles3d, cart2pol, cart2sph2, cart2cyl.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Convert cylindrical to cartesian coordinates



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
distancePointLine3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 491
 -- Function File: D = distancePointLine3d (POINT, LINE)
     Euclidean distance between 3D point and line

     Returns the distance between point POINT and the line LINE, given
     as: POINT : [x0 y0 z0] LINE : [x0 y0 z0 dx dy dz] D : (positive)
     scalar

     Run 'demo distancePointLine3d' to see examples.

     References
     http://mathworld.wolfram.com/Point-LineDistance3-Dimensional.html

     See also: lines3d, distancePointLine, distancePointEdge3d,
     projPointOnLine3d.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Euclidean distance between 3D point and line



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
distancePoints


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 904
 -- Function File: D = distancePoints(P1, P2)
 -- Function File: D = distancePoints(P1, P2,NORM)
 -- Function File: D = distancePoints (..., 'diag')
     Compute euclidean distance between pairs of points in any dimension

     Return distance D between points P1 and P2, given as [X Y Z ...
     Wdim].

     If P1 and P2 are two arrays of points, result is a N1-by-N2 array
     containing distance between each point of P1 and each point of P2.

     D = distancePoints(P1, P2, NORM) with NORM being 1, 2, or Inf,
     corresponfing to the norm used.  Default is 2 (euclidean norm).  1
     correspond to manhattan (or taxi driver) distance and Inf to
     maximum difference in each coordinate.

     When 'diag' is given, computes only distances between 'P1(i,:)' and
     'P2(i,:)'.  In this case the numer of points in each array must be
     the same.

     See also: points3d, minDistancePoints.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 67
Compute euclidean distance between pairs of points in any dimension



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
drawAxis3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 503
 -- Function File: drawAxis3d ()
 -- Function File: drawAxis3d (L,R)
     Draw a coordinate system and an origin

     Adds 3 cylinders to the current axis, corresponding to the
     directions of the 3 basis vectors Ox, Oy and Oz.  Ox vector is red,
     Oy vector is green, and Oz vector is blue.

     L specifies the length and R the radius of the cylinders
     representing the different axes.

     WARNING: This function doesn't work in gnuplot (as of version 4.2).

     See also: drawAxisCube.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 38
Draw a coordinate system and an origin



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
drawBox3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 685
 -- Function File: drawBox3d (BOX)
 -- Function File: drawBox3d (...,OPT)
     Draw a 3D box defined by coordinate extents

     Draw a box defined by its coordinate extents: BOX = [XMIN XMAX YMIN
     YMAX ZMIN ZMAX]. The function draws only the outline edges of the
     box.  Extra options OPT are passed to the function 'drawEdges3d'.

     Example
              # Draw bounding box of a cubeoctehedron
              [v e f] = createCubeOctahedron;
              box3d = boundingBox3d(v);
              figure; hold on;
              drawMesh(v, f);
              drawBox3d(box3d);
              axis([-2 2 -2 2 -2 2]);
              view(3)

     See also: boxes3d, boundingBox3d.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 43
Draw a 3D box defined by coordinate extents



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
drawCircle3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1947
 -- Function File: H = drawCircle3d (CIRCLE2D, NORMAL)
 -- Function File: H = drawCircle3d (XC, YC, ZC, R, THETA, PHI, PSI)
     Draw a 3D circle

     Possible calls for the function: drawCircle3d([XC YC ZC R THETA
     PHI]) drawCircle3d([XC YC ZC R], [THETA PHI])

     where XC, YC, ZY are coordinates of circle center, R is the circle
     radius, PHI and THETA are 3D angles in degrees of the normal to the
     plane containing the circle: * THETA between 0 and 180 degrees,
     corresponding to the colatitude (angle with Oz axis).  * PHI
     between 0 and 360 degrees corresponding to the longitude (angle
     with Ox axis)

     drawCircle3d([XC YC ZC R THETA PHI PSI]) drawCircle3d([XC YC ZC R],
     [THETA PHI PSI]) drawCircle3d([XC YC ZC R], THETA, PHI)
     drawCircle3d([XC YC ZC], R, THETA, PHI) drawCircle3d([XC YC ZC R],
     THETA, PHI, PSI) drawCircle3d([XC YC ZC], R, THETA, PHI, PSI)
     drawCircle3d(XC, YC, ZC, R, THETA, PHI) drawCircle3d(XC, YC, ZC, R,
     THETA, PHI, PSI) Are other possible syntaxes for this function.

     H = drawCircle3d(...)  return handle on the created LINE object

     Example
              # display 3 mutually orthogonal 3D circles
              figure; hold on;
              drawCircle3d([10 20 30 50  0  0], 'LineWidth', 2, 'Color', 'b');
              drawCircle3d([10 20 30 50 90  0], 'LineWidth', 2, 'Color', 'r');
              drawCircle3d([10 20 30 50 90 90], 'LineWidth', 2, 'Color', 'g');
              axis equal;
              axis([-50 100 -50 100 -50 100]);
              view([-10 20])

              # Draw several circles at once
              center = [10 20 30];
              circ1 = [center 50  0  0];
              circ2 = [center 50 90  0];
              circ3 = [center 50 90 90];
              figure; hold on;
              drawCircle3d([circ1 ; circ2 ; circ3]);
              axis equal;

     See also: circles3d, drawCircleArc3d, drawEllipse3d, drawSphere.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
Draw a 3D circle



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
drawCircleArc3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 555
 -- Function File: drawCircleArc3d([XC YC ZC R THETA PHI PSI START
          EXTENT])
     Draw a 3D circle arc

     [XC YC ZC] : coordinate of arc center R : arc radius [THETA PHI] :
     orientation of arc normal, in degrees (theta: 0->180).  PSI : roll
     of arc (rotation of circle origin) START : starting angle of arc,
     from arc origin, in degrees EXTENT : extent of circle arc, in
     degrees (can be negative)

     Drawing options can be specified, as for the plot command.

     See also: angles3, circles3d, drawCircle3d, drawCircleArc.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
Draw a 3D circle arc



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
drawCube


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1184
 -- Function File: H = drawCube (CUBE)
 -- Function File: [X,Y,Z] = drawCube (CUBE)
     Draw a 3D centered cube, eventually rotated

     drawCube(CUBE) Displays a 3D cube on current axis.  CUBE is given
     by: [XC YC ZC SIDE THETA PHI PSI] where (XC, YC, ZC) is the CUBE
     center, SIDE is the length of the cube main sides, and THETA PHI
     PSI are angles representing the cube orientation, in degrees.
     THETA is the colatitude of the cube, between 0 and 90 degrees, PHI
     is the longitude, and PSI is the rotation angle around the axis of
     the normal.

     CUBE can be axis aligned, in this case it should only contain
     center and side information: CUBE = [XC YC ZC SIDE]

     The function drawCuboid is closely related, but uses a different
     angle convention, and allows for different sizes along directions.

     Example
            # Draw a cube with small rotations
              figure; hold on;
              drawCube([10 20 30  50  10 20 30], 'FaceColor', 'g');
              axis equal;
              view(3);

     WARNING: This function doesn't work in gnuplot (as of version 4.2).

     See also: meshes3d, polyhedra, createCube, drawCuboid.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 43
Draw a 3D centered cube, eventually rotated



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
drawCylinder


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1232
 -- Function File: H = drawCylinder (CYL)
 -- Function File: H = drawCylinder (CYL,N)
 -- Function File: H = drawCylinder (..., OPT)
 -- Function File: H = drawCylinder (..., "Facecolor",COLOR)
 -- Function File: H = drawCylinder (...)
     Draw a cylinder

     drawCylinder(CYL) where CYL is a cylinder defined by [x1 y1 z1 x2
     y2 z2 r]: [x1 y2 z1] are coordinates of starting point, [x2 y2 z2]
     are coordinates of ending point, and R is the radius of the
     cylinder, draws the corresponding cylinder on the current axis.

     drawCylinder(CYL, N) uses N points for discretisation of angle.
     Default value is 32.

     drawCylinder(..., OPT) with OPT = 'open' (default) or 'closed',
     specify if bases of the cylinder should be drawn.

     drawCylinder(..., "FaceColor", COLOR) Specifies the color of the
     cylinder.  Any couple of parameters name and value can be given as
     argument, and will be transfered to the 'surf' matlab function

     H = drawCylinder(...)  returns a handle to the patch representing
     the cylinder.

     Run 'demo drawCylinder' to see several examples.

     WARNING: This function doesn't work in gnuplot (as of version 4.2).

     See also: drawSphere, drawLine3d, surf.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
Draw a cylinder



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
drawEdge3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 197
 -- Function File: H = drawEdge (EDGE)
     Draw 3D edge in the current Window

     draw the edge EDGE on the current axis.  EDGE has the form: [x1 y1
     z1 x2 y2 z2].  No clipping is performed.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 34
Draw 3D edge in the current Window



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
drawLine3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 496
DRAWLINE3D Draw a 3D line on the current axis

   drawline3d(LINE);
   Draws the line LINE on the current axis, by clipping with the current
   axis. If line is not clipepd by the axis, function return -1.

   drawLine3d(LINE, PARAM, VALUE)
   Accepts parameter/value pairs, like for plot function.
   Color of the line can also be given as a single parameter.
   
   H = drawLine3d(...)
   Returns a handle to the created graphic line object.


   See also:
   lines3d, createLine3d, clipLine3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
DRAWLINE3D Draw a 3D line on the current axis



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
drawPlane3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 390
DRAWPLANE3D Draw a plane clipped in the current window

   drawPlane3d(plane)
   plane = [x0 y0 z0  dx1 dy1 dz1  dx2 dy2 dz2];

   See also
   planes3d, createPlane

   Example
   p0 = [1 2 3];
   v1 = [1 0 1];
   v2 = [0 -1 1];
   plane = [p0 v1 v2];
   axis([-10 10 -10 10 -10 10]);
   drawPlane3d(plane)
   drawLine3d([p0 v1])
   drawLine3d([p0 v2])
   set(gcf, 'renderer', 'zbuffer');




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
DRAWPLANE3D Draw a plane clipped in the current window



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
drawPoint3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 631
 -- Function File: H = drawPoint3d (X, Y, Z)
 -- Function File: H = drawPoint3d (COORD)
 -- Function File: H = drawPoint3d (...)
     Draw 3D point on the current axis.

     drawPoint3d(X, Y, Z) will draw points defined by coordinates X and
     Y. X and Y are N*1 array, with N being number of points to be
     drawn.

     drawPoint3d(COORD) packs coordinates in a single [N*3] array.

     drawPoint3d(..., OPT) will draw each point with given option.  OPT
     is a string compatible with 'plot' model.

     H = drawPoint3d(...)  Also return a handle to each of the drawn
     points.

     See also: points3d, clipPoints3d.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 34
Draw 3D point on the current axis.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
drawPolygon3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 609
 -- Function File: H = drawPolygon3d (POLY)
 -- Function File: H = drawPolygon3d (PX,PY,PZ)
 -- Function File: H = drawPolygon3d (...,PARAM,VALUE)
     Draw a 3D polygon specified by a list of vertices

     drawPolygon3d(POLY); packs coordinates in a single N-by-3 array.

     drawPolygon3d(PX, PY, PZ); specifies coordinates in separate
     arrays.

     drawPolygon3d(..., PARAM, VALUE); Specifies style options to draw
     the polyline, see plot for details.

     H = drawPolygon3d(...); also return a handle to the list of line
     objects.

     See also: polygons3d, fillPolygon3d, drawPolyline3d.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 49
Draw a 3D polygon specified by a list of vertices



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
drawPolyline3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 866
 -- Function File: H = drawPolyline3d (POLY)
 -- Function File: H = drawPolyline3d (PX,PY,PZ)
 -- Function File: H = drawPolyline3d (...,CLOSED)
 -- Function File: H = drawPolyline3d (...,PARAM,VALUE)
     Draw a 3D polyline specified by a list of vertices

     drawPolyline3d(POLY); packs coordinates in a single N-by-3 array.

     drawPolyline3d(PX, PY, PZ); specify coordinates in separate arrays.

     drawPolyline3d(..., CLOSED); Specifies if the polyline is closed or
     open.  CLOSED can be one of: - 'closed' - 'open' (the default) - a
     boolean variable with value TRUE for closed polylines.

     drawPolyline3d(..., PARAM, VALUE); Specifies style options to draw
     the polyline, see plot for details.

     H = drawPolyline3d(...); also return a handle to the list of line
     objects.

     See also: polygons3d, drawPolygon3d, fillPolygon3d.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
Draw a 3D polyline specified by a list of vertices



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
drawSphere


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1088
 -- Function File: = function_name (, )
     Draw a sphere as a mesh

     drawSphere(SPHERE) Where SPHERE = [XC YC ZC R], draw the sphere
     centered on the point with coordinates [XC YC ZC] and with radius
     R, using a quad mesh.

     drawSphere(CENTER, R) Where CENTER = [XC YC ZC], specifies the
     center and the radius with two arguments.

     drawSphere(XC, YC, ZC, R) Specifiy sphere center and radius as four
     arguments.

     drawSphere(..., NAME, VALUE); Specifies one or several options
     using parameter name-value pairs.  Available options are usual
     drawing options, as well as: 'nPhi' the number of arcs used for
     drawing the meridians 'nTheta' the number of circles used for
     drawing the parallels

     H = drawSphere(...)  Return a handle to the graphical object
     created by the function.

     [X Y Z] = drawSphere(...)  Return the coordinates of the vertices
     used by the sphere.  In this case, the sphere is not drawn.

     Run 'demo drawSphere' to see several examples.

     See also: spheres, circles3d, sphere, drawEllipsoid.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
Draw a sphere as a mesh



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
drawSphericalEdge


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 316
 -- Function File: drawSphericalEdge (SPHERE, EDGE)
     Draw an edge on the surface of a sphere

     EDGE is given as a couple of 3D corodinates corresponding to edge
     extremities.  The shortest spherical edge joining the two
     extremities is drawn on the current axes.

     See also: drawSphericalPolygon.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 39
Draw an edge on the surface of a sphere



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
drawSphericalPolygon


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 86
 -- Function File: = drawSphericalPolygon (SPHERE, POLY)
     Draw a spherical polygon


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 24
Draw a spherical polygon



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 21
drawSphericalTriangle


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 161
 -- Function File: H = function_name (SPHERE, P1,P2,P3)
     Draw a triangle on a sphere

     See also: drawSphere, fillSphericalTriangle, drawSphericalPolygon.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 27
Draw a triangle on a sphere



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
drawTorus


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 527
 -- Function File: drawTorus (TORUS)
     Draw a torus (3D ring)

     drawTorus(TORUS) Draws the torus on the current axis.  TORUS is
     given by [XC YC ZY R1 R2 THETA PHI] where (XC YZ ZC) is the center
     of the torus, R1 is the main radius, R2 is the radius of the torus
     section, and (THETA PHI) is the angle of the torus normal vector
     (both in degrees).

     Example
            figure;
            drawTorus([50 50 50 30 10 30 45]);
            axis equal;

     See also: drawEllipsoid, revolutionSurface.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
Draw a torus (3D ring)



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 12
drawVector3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 316
 -- Function File: H = function_name (POS, VECT)
     Draw vector at a given position

     Example
              figure; hold on;
              drawVector3d([2 3 4], [1 0 0]);
              drawVector3d([2 3 4], [0 1 0]);
              drawVector3d([2 3 4], [0 0 1]);
              view(3);

     See also: quiver3.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 31
Draw vector at a given position



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 23
eulerAnglesToRotation3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1475
EULERANGLESTOROTATION3D Convert 3D Euler angles to 3D rotation matrix

   MAT = eulerAnglesToRotation3d(PHI, THETA, PSI)
   Creates a rotation matrix from the 3 euler angles PHI THETA and PSI,
   given in degrees, using the 'XYZ' convention (local basis), or the
   'ZYX' convention (global basis). The result MAT is a 4-by-4 rotation
   matrix in homogeneous coordinates.

   PHI:    rotation angle around Z-axis, in degrees, corresponding to the
!   'Yaw'. PHI is between -180 and +180.
   THETA:  rotation angle around Y-axis, in degrees, corresponding to the
!   'Pitch'. THETA is between -90 and +90.
   PSI:    rotation angle around X-axis, in degrees, corresponding to the
!   'Roll'. PSI is between -180 and +180. 
   These angles correspond to the "Yaw-Pitch-Roll" convention, also known
   as "TaitBryan angles". 

   The resulting rotation is equivalent to a rotation around X-axis by an
   angle PSI, followed by a rotation around the Y-axis by an angle THETA,
   followed by a rotation around the Z-axis by an angle PHI. 
   That is:
!   ROT = Rz * Ry * Rx;

   MAT = eulerAnglesToRotation3d(ANGLES)
   Concatenates all angles in a single 1-by-3 array.

   Example
   [n e f] = createCube;
   phi     = 20;
   theta   = 30;
   psi     = 10;
   rot = eulerAnglesToRotation3d(phi, theta, psi);
   n2 = transformPoint3d(n, rot);
   drawPolyhedron(n2, f);

   See also
   transforms3d, createRotationOx, createRotationOy, createRotationOz
   rotation3dAxisAndAngle



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 69
EULERANGLESTOROTATION3D Convert 3D Euler angles to 3D rotation matrix



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
geom3d_Contents


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9181
 -- Function File: geom3d_Contents ()
     GEOM3D Geometry 3D Toolbox Version 1.0 21-Mar-2011 .

     Creation, transformations, algorithms and visualization of
     geometrical 3D primitives, such as points, lines, planes,
     polyhedra, circles and spheres.

     Euler Angles are defined as follow: PHI is the azimut, i.e.  the
     angle of the projection on horizontal plane with the Ox axis, with
     value beween 0 and 180 degrees.  THETA is the latitude, i.e.  the
     angle with the Oz axis, with value between -90 and +90 degrees.
     PSI is the 'roll', i.e.  the rotation around the (PHI, THETA)
     direction, with value in degrees See also the 'angles3d' page.

     Base format for primitives: Point: [x0 y0 z0] Vector: [dx dy dz]
     Line: [x0 y0 z0 dx dy dz] Edge: [x1 y1 z1 x2 y2 z2] Plane: [x0 y0
     z0 dx1 dy1 dz1 dx2 dy2 dz2] Sphere: [x0 y0 z0 R] Circle: [x0 y0 z0
     R PHI THETA PSI] (origin+center+normal+'roll').  Cylinder: [X1 Y1
     Z1 X2 Y2 Z2 R] Box: [xmin xmax ymin ymax zmin zmax].  Used for
     clipping shapes.

     Polygons are represented by N-by-3 array of points, the last point
     is not necessarily the same as the first one.  Points must be
     coplanar.

     Meshes and Polyhedra are represented by a couple of variables {V,
     F}: V: N-by-3 array of vetrtices: [x1 y1 z1; ...  ;xn yn zn]; F: is
     either a [Nf*3] or [Nf*4] array containing reference for vertices
     of each face, or a [Nf*1] cell array, where each cell is an array
     containing a variable number of node indices.  For some functions,
     the array E of edges is needed.  It consists in a Ne-by-2 array
     containing indices of source and target vertices.

     3D Points points3d - Description of functions operating on 3D
     points midPoint3d - Middle point of two 3D points or of a 3D edge
     isCoplanar - Tests input points for coplanarity in 3-space.
     transformPoint3d - Transform a point with a 3D affine transform
     distancePoints - Compute euclidean distance between pairs of 3D
     Points clipPoints3d - Clip a set of points by a box drawPoint3d -
     Draw 3D point on the current axis.

     3D Vectors vectors3d - Description of functions operating on 3D
     vectors transformVector3d - Transform a vector with a 3D affine
     transform normalizeVector3d - Normalize a 3D vector to have norm
     equal to 1 vectorNorm3d - Norm of a 3D vector or of set of 3D
     vectors vectorAngle3d - Angle between two 3D vectors isParallel3d -
     Check parallelism of two 3D vectors isPerpendicular3d - Check
     orthogonality of two 3D vectors

     Angles angles3d - Conventions for manipulating angles in 3D
     anglePoints3d - Compute angle between three 3D points
     sphericalAngle - Compute angle between points on the sphere
     angleSort3d - Sort 3D coplanar points according to their angles in
     plane randomAngle3d - Return a 3D angle uniformly distributed on
     unit sphere

     Coordinate transforms sph2cart2 - Convert spherical coordinates to
     cartesian coordinates cart2sph2 - Convert cartesian coordinates to
     spherical coordinates cart2sph2d - Convert cartesian coordinates to
     spherical coordinates in degrees sph2cart2d - Convert spherical
     coordinates to cartesian coordinates in degrees cart2cyl - Convert
     cartesian to cylindrical coordinates cyl2cart - Convert cylindrical
     to cartesian coordinates

     3D Lines and Edges lines3d - Description of functions operating on
     3D lines createLine3d - Create a line with various inputs.
     transformLine3d - Transform a 3D line with a 3D affine transform
     clipLine3d - Clip a line with a box and return an edge midPoint3d -
     Middle point of two 3D points or of a 3D edge distancePointLine3d -
     Euclidean distance between 3D point and line distanceLines3d -
     Minimal distance between two 3D lines linePosition3d - Return the
     position of a 3D point on a 3D line drawEdge3d - Draw 3D edge in
     the current Window drawLine3d - Draw a 3D line on the current axis

     Planes planes3d - Description of functions operating on 3D planes
     createPlane - Create a plane in parametrized form normalizePlane -
     Normalize parametric representation of a plane intersectPlanes -
     Return intersection line between 2 planes in space
     intersectLinePlane - Return intersection point between a plane and
     a line intersectEdgePlane - Return intersection point between a
     plane and a edge distancePointPlane - Signed distance betwen 3D
     point and plane projPointOnPlane - Return the orthogonal projection
     of a point on a plane isBelowPlane - Test whether a point is below
     or above a plane medianPlane - Create a plane in the middle of 2
     points planeNormal - Compute the normal to a plane planePosition -
     Compute position of a point on a plane planePoint - Compute 3D
     position of a point in a plane dihedralAngle - Compute dihedral
     angle between 2 planes drawPlane3d - Draw a plane clipped in the
     current window

     3D Polygons and curves polygons3d - Description of functions
     operating on 3D polygons polygonCentroid3d - Centroid (or center of
     mass) of a polygon triangleArea3d - Area of a 3D triangle
     polygon3dNormalAngle - Normal angle at a vertex of the 3D polygon
     intersectLinePolygon3d - Intersection point of a 3D line and a 3D
     polygon intersectLineTriangle3d - Intersection point of a 3D line
     and a 3D triangle intersectRayPolygon3d - Intersection point of a
     3D ray and a 3D polygon clipConvexPolygon3dHP - Clip a convex 3D
     polygon with Half-space drawPolygon3d - Draw a 3D polygon specified
     by a list of vertices drawPolyline3d - Draw a 3D polyline specified
     by a list of vertices fillPolygon3d - Fill a 3D polygon specified
     by a list of points

     3D circles and ellipses circles3d - Description of functions
     operating on 3D circles circle3dPosition - Return the angular
     position of a point on a 3D circle circle3dPoint - Coordinates of a
     point on a 3D circle from its position circle3dOrigin - Return the
     first point of a 3D circle drawCircle3d - Draw a 3D circle
     drawCircleArc3d - Draw a 3D circle arc drawEllipse3d - Draw a 3D
     ellipse

     Spheres spheres - Description of functions operating on 3D spheres
     createSphere - Create a sphere containing 4 points
     intersectLineSphere - Return intersection points between a line and
     a sphere intersectPlaneSphere - Return intersection circle between
     a plane and a sphere drawSphere - Draw a sphere as a mesh
     drawSphericalTriangle - Draw a triangle on a sphere

     Smooth surfaces inertiaEllipsoid - Inertia ellipsoid of a set of 3D
     points intersectLineCylinder - Compute intersection points between
     a line and a cylinder revolutionSurface - Create a surface of
     revolution from a planar curve surfaceCurvature - Curvature on a
     surface from angle and principal curvatures drawEllipsoid - Draw a
     3D ellipsoid drawTorus - Draw a torus (3D ring) drawCylinder - Draw
     a cylinder drawSurfPatch - Draw a 3D surface patch, with 2
     parametrized surfaces

     Bounding boxes management boxes3d - Description of functions
     operating on 3D boxes boundingBox3d - Bounding box of a set of 3D
     points orientedBox3d - Object-oriented bounding box of a set of 3D
     points intersectBoxes3d - Intersection of two 3D bounding boxes
     mergeBoxes3d - Merge 3D boxes, by computing their greatest extent
     box3dVolume - Volume of a 3-dimensional box randomPointInBox3d -
     Generate random point(s) within a 3D box drawBox3d - Draw a 3D box
     defined by coordinate extents

     Geometric transforms transforms3d - Conventions for manipulating 3D
     affine transforms createTranslation3d - Create the 4x4 matrix of a
     3D translation createScaling3d - Create the 4x4 matrix of a 3D
     scaling createRotationOx - Create the 4x4 matrix of a 3D rotation
     around x-axis createRotationOy - Create the 4x4 matrix of a 3D
     rotation around y-axis createRotationOz - Create the 4x4 matrix of
     a 3D rotation around z-axis createBasisTransform3d - Compute matrix
     for transforming a basis into another basis eulerAnglesToRotation3d
     - Convert 3D Euler angles to 3D rotation matrix
     rotation3dToEulerAngles - Extract Euler angles from a rotation
     matrix createRotation3dLineAngle - Create rotation around a line by
     an angle theta rotation3dAxisAndAngle - Determine axis and angle of
     a 3D rotation matrix recenterTransform3d - Change the fixed point
     of an affine 3D transform composeTransforms3d - Concatenate several
     space transformations

     Various drawing Functions drawGrid3d - Draw a 3D grid on the
     current axis drawAxis3d - Draw a coordinate system and an origin
     drawAxisCube - Draw a colored cube representing axis orientation
     drawCube - Draw a 3D centered cube, eventually rotated drawCuboid -
     Draw a 3D cuboid, eventually rotated

     Credits: * function isCoplanar was originally written by Brett
     Shoelson.  * Songbai Ji enhanced file intersectPlaneLine
     (6/23/2006).


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 52
GEOM3D Geometry 3D Toolbox Version 1.0 21-Mar-2011 .



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 18
intersectLinePlane


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1253
 -- Function File: PT = intersectLinePlane (LINE, PLANE)
 -- Function File: PT = intersectLinePlane (..., TOL)
     Intersection point between a 3D line and a plane

     PT = intersectLinePlane(LINE, PLANE) Returns the intersection point
     of the given line and the given plane.  LINE: [x0 y0 z0 dx dy dz]
     PLANE: [x0 y0 z0 dx1 dy1 dz1 dx2 dy2 dz2] PT: [xi yi zi] If LINE
     and PLANE are parallel, return [NaN NaN NaN]. If LINE (or PLANE) is
     a matrix with 6 (or 9) columns and N rows, result is an array of
     points with N rows and 3 columns.

     PT = intersectLinePlane(LINE, PLANE, TOL) Specifies the tolerance
     factor to test if a line is parallel to a plane.  Default is 1e-14.

     Example
              # define horizontal plane through origin
              plane = [0 0 0   1 0 0   0 1 0];
              # intersection with a vertical line
              line = [2 3 4  0 0 1];
              intersectLinePlane(line, plane)
              ans =
                 2   3   0
              # intersection with a line "parallel" to plane
              line = [2 3 4  1 2 0];
              intersectLinePlane(line, plane)
              ans =
                NaN  NaN  NaN

     See also: lines3d, planes3d, points3d, clipLine3d.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
Intersection point between a 3D line and a plane



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
intersectLineSphere


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1277
INTERSECTLINESPHERE Return intersection points between a line and a sphere

   PTS = intersectLineSphere(LINE, SPHERE);
   Returns the two points which are the intersection of the given line and
   sphere.
   LINE   : [x0 y0 z0  dx dy dz]
   SPHERE : [xc yc zc  R]
   PTS     : [x1 y1 z1 ; x2 y2 z2]
   If there is no intersection between the line and the sphere, return a
   2-by-3 array containing only NaN.

   Example
! % draw the intersection between a sphere and a collection of parallel
! % lines
! sphere = [50.12 50.23 50.34 40];
! [x, y] = meshgrid(10:10:90, 10:10:90);
! n = numel(x);
! lines = [x(:) y(:) zeros(n,1) zeros(n,2) ones(n,1)];
! figure; hold on; axis equal;
! axis([0 100 0 100 0 100]); view(3);
! drawSphere(sphere);
! drawLine3d(lines);
! pts = intersectLineSphere(lines, sphere);
! drawPoint3d(pts, 'rx');

! % apply rotation on set of lines to check with non vertical lines
! rot = eulerAnglesToRotation3d(20, 30, 10);
! rot2 = recenterTransform3d(rot, [50 50 50]);
! lines2 = transformLine3d(lines, rot2);
! figure; hold on; axis equal;
! axis([0 100 0 100 0 100]); view(3);
! drawSphere(sphere);
! drawLine3d(lines2);
! pts2 = intersectLineSphere(lines2, sphere);
! drawPoint3d(pts, 'rx');

   See also
   spheres, circles3d, intersectPlaneSphere



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 74
INTERSECTLINESPHERE Return intersection points between a line and a sphere



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
intersectPlaneSphere


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 975
 -- Function File: CIRC = intersectPlaneSphere(PLANE, SPHERE)
     Return intersection circle between a plane and a sphere

     Returns the circle which is the intersection of the given plane and
     sphere.  PLANE : [x0 y0 z0 dx1 dy1 dz1 dx2 dy2 dz2] SPHERE : [XS YS
     ZS RS] CIRC : [XC YC ZC RC THETA PHI PSI] [x0 y0 z0] is the origin
     of the plane, [dx1 dy1 dz1] and [dx2 dy2 dz2] are two direction
     vectors, [XS YS ZS] are coordinates of the sphere center, RS is the
     sphere radius, [XC YC ZC] are coordinates of the circle center, RC
     is the radius of the circle, [THETA PHI] is the normal of the plane
     containing the circle (THETA being the colatitude, and PHI the
     azimut), and PSI is a rotation angle around the normal (equal to
     zero in this function, but kept for compatibility with other
     functions).  All angles are given in degrees.

     See also: planes3d, spheres, circles3d, intersectLinePlane,
     intersectLineSphere.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 55
Return intersection circle between a plane and a sphere



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
linePosition3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 843
LINEPOSITION3D Return the position of a 3D point projected on a 3D line

   T = linePosition3d(POINT, LINE)
   Computes position of point POINT on the line LINE, relative to origin
   point and direction vector of the line.
   LINE has the form [x0 y0 z0 dx dy dy],
   POINT has the form [x y z], and is assumed to belong to line.
   The result T is the value such that POINT = LINE(1:3) + T * LINE(4:6).
   If POINT does not belong to LINE, the position of its orthogonal
   projection is computed instead. 

   T = linePosition3d(POINT, LINES)
   If LINES is an array of NL lines, return NL positions, corresponding to
   each line.

   T = linePosition3d(POINTS, LINE)
   If POINTS is an array of NP points, return NP positions, corresponding
   to each point.

   See also:
   lines3d, createLine3d, distancePointLine3d, projPointOnLine3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 71
LINEPOSITION3D Return the position of a 3D point projected on a 3D line



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
lines3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 367
 -- Function File: lines3d ()
     LINES3D Description of functions operating on 3D lines

     A 3D Line is represented by a 3D point (its origin) and a 3D vector
     (its direction): LINE = [X0 Y0 Z0 DX DY DZ];

     See also: createLine3d, transformLine3d, distancePointLine3d,
     linePosition3d intersectLinePlane, distanceLines3d, clipLine3d,
     drawLine3d.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
LINES3D Description of functions operating on 3D lines



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
normalizePlane


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 670
 -- Function File: PLANE2 = normalizePlane (PLANE1)
     Normalize parametric representation of a plane

     PLANE2 = normalizePlane(PLANE1); Transforms the plane PLANE1 in the
     following format: [X0 Y0 Z0 DX1 DY1 DZ1 DX2 DY2 DZ2], where: - (X0,
     Y0, Z0) is a point belonging to the plane - (DX1, DY1, DZ1) is a
     first direction vector - (DX2, DY2, DZ2) is a second direction
     vector into another plane, with the same format, but with: - (x0 y0
     z0) is the closest point of plane to the origin - (DX1 DY1 DZ1) has
     norm equal to 1 - (DX2 DY2 DZ2) has norm equal to 1 and is
     orthogonal to (DX1 DY1 DZ1)

     See also: planes3d, createPlane.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 46
Normalize parametric representation of a plane



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
planeNormal


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 246
 -- Function File: N = planeNormal (PLANE)
     Compute the normal to a plane

     N = planeNormal(PLANE) compute the normal of the given plane PLANE
     : [x0 y0 z0 dx1 dy1 dz1 dx2 dy2 dz2] N : [dx dy dz]

     See also: planes3d, createPlane.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 29
Compute the normal to a plane



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
planePoint


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 360
 -- Function File: POINT = planePoint (PLANE, POS)
     PLANEPOINT Compute 3D position of a point in a plane

     POINT = planePoint(PLANE, POS) PLANE is a 9 element row vector [x0
     y0 z0 dx1 dy1 dz1 dx2 dy2 dz2] POS is the coordinate of a point in
     the plane basis, POINT is the 3D coordinate in global basis.

     See also: planes3d, planePosition.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 52
PLANEPOINT Compute 3D position of a point in a plane



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
planePosition


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 629
 -- Function File: PT2 = planePosition (POINT, PLANE)
     Compute position of a point on a plane

     PT2 = planePosition(POINT, PLANE) POINT has format [X Y Z], and
     plane has format [X0 Y0 Z0 DX1 DY1 DZ1 DX2 DY2 DZ2], where : - (X0,
     Y0, Z0) is a point belonging to the plane - (DX1, DY1, DZ1) is a
     first direction vector - (DX2, DY2, DZ2) is a second direction
     vector

     Result PT2 has the form [XP YP], with [XP YP] coordinate of the
     point in the coordinate system of the plane.

     CAUTION: WORKS ONLY FOR PLANES WITH ORTHOGONAL DIRECTION VECTORS

     See also: planes3d, points3d, planePoint.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 38
Compute position of a point on a plane



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
planes3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 502
 -- Function File: planes3d ()
     PLANES3D Description of functions operating on 3D planes

     Planes are represented by a 3D point (the plane origin) and 2
     direction vectors, which should not be colinear.  PLANE = [X0 Y0 Z0
     DX1 DY1 DZ1 DX2 DY2 DZ2];

     See also: createPlane, medianPlane, normalizePlane, planeNormal,
     planePosition, dihedralAngle, intersectPlanes, projPointOnPlane,
     isBelowPlane, intersectLinePlane, intersectEdgePlane,
     distancePointPlane, drawPlane3d.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 56
PLANES3D Description of functions operating on 3D planes



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
points3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 415
 -- Function File: points3d ()
     POINTS3D Description of functions operating on 3D points

     Points are represented by their 3 Cartesian coordinates: P = [X Y
     Z];

     Arrays of points consist in N*3 arrays, each row being a point.

     See also: isCoplanar, distancePoints, anglePoints3d, angleSort3d,
     sphericalAngle, sph2cart2, cart2sph2, cart2cyl, cyl2cart,
     transformPoint3d, clipPoints3d.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 56
POINTS3D Description of functions operating on 3D points



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
polygonArea3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 384
 -- Function File: AREA = polygonArea3d(POLY)
     Area of a 3D polygon

     POLY is given as a N-by-3 array of vertex coordinates.  The
     resulting area is positive.

     Example
          poly = [10 30 20;20 30 20;20 40 20;10 40 20];
          polygonArea3d(poly)
          ans =
             100

     See also: polygons3d, triangleArea3d, polygonArea,
     polygonCentroid3d.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 20
Area of a 3D polygon



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
polygons3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 575
 -- Function File: polygons3d ()
     POLYGONS3D Description of functions operating on 3D polygons

     A 3D polygon is simply a set of 3D points (called vertices) which
     are assumed to be located in the same plane.  Several functions are
     provided for computing basic geometrical parameters (centroid,
     angles), or intersections with lines or planes.

     See also: polygon3dNormalAngle, polygonCentroid3d,
     clipConvexPolygon3dHP intersectLinePolygon3d,
     intersectLineTriangle3d, intersectRayPolygon3d drawPolygon3d,
     drawPolyline3d, fillPolygon3d.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 60
POLYGONS3D Description of functions operating on 3D polygons



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
projPointOnPlane


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 615
 -- Function File: PT2 = projPointOnPlane (PT1, PLANE)
     Return the orthogonal projection of a point on a plane

     PT2 = projPointOnPlane(PT1, PLANE); Compute the (orthogonal)
     projection of point PT1 onto the line PLANE.

     Function works also for multiple points and planes.  In this case,
     it returns multiple points.  Point PT1 is a [N*3] array, and PLANE
     is a [N*9] array (see createPlane for details).  Result PT2 is a
     [N*3] array, containing coordinates of orthogonal projections of
     PT1 onto planes PLANE.

     See also: planes3d, points3d, planePosition, intersectLinePlane.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
Return the orthogonal projection of a point on a plane



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 19
recenterTransform3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 749
RECENTERTRANSFORM3D Change the fixed point of an affine 3D transform

   TRANSFO2 = recenterTransform3d(TRANSFO, CENTER)
   where TRANSFO is a 4x4 transformation matrix, and CENTER is a 1x3 row
   vector, computes the new transformations that uses the same linear part
   (defined by the upper-left 3x3 corner of the transformation matrix) as
   the initial transform, and that will leave the point CENTER unchanged.

   

   Example
   % creating a re-centered rotation using:   
   rot1 = createRotationOx(pi/3);
   rot2 = recenterTransform3d(rot1, [3 4 5]);
   % will give the same result as:
   rot3 = createRotationOx([3 4 5], pi/3);
   

   See also
   transforms3d, createRotationOx, createRotationOy, createRotationOz
   createTranslation3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 68
RECENTERTRANSFORM3D Change the fixed point of an affine 3D transform



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
revolutionSurface


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1821
 -- Function File: [X, Y, Z] = revolutionSurface (C1, C2, N)
 -- Function File: [X, Y, Z] = revolutionSurface (CURVE, N)
 -- Function File: [X, Y, Z] = revolutionSurface (..., THETA)
 -- Function File: [X, Y, Z] = revolutionSurface (..., LINE)
     Create a surface of revolution from a planar curve

     usage [X Y Z] = revolutionSurface(C1, C2, N); create the surface of
     revolution of parametrized function (xt, yt), with N+1 equally
     spaced slices, around the Oz axis.  It assumed that C1 corresponds
     to the x coordinate, and that C2 corresponds to the Oz coordinate.

     [X Y Z] = revolutionSurface(CURVE, N); is the same, but generating
     curve is given in a single parameter CURVE, which is a [Nx2] array
     of 2D points.

     [X Y Z] = revolutionSurface(..., THETA) where THETA is a vector,
     uses values of THETA for computing revolution angles.

     [X Y Z] = revolutionSurface(..., LINE); where LINE is a 1x4 array,
     specifes the revolution axis in the coordinate system of the curve.
     LINE is a row vector of 4 parameters, containing [x0 y0 dx dy],
     where (x0,y0) is the origin of the line and (dx,dy) is a direction
     vector of the line.  The resulting revolution surface still has Oz
     axis as symmetry axis.  It can be transformed using
     transformPoint3d function.  Surface can be displayed using : 'H =
     surf(X, Y, Z);' H is a handle to the created patch.

     revolutionSurface(...); by itself, directly shows the created
     patch.

     Example
            # draws a piece of torus
            circle = circleAsPolygon([10 0 3], 50);
            [x y z] = revolutionSurface(circle, linspace(0, 4*pi/3, 50));
            surf(x, y, z);
            axis square equal;

     See also: surf, transformPoint3d, drawSphere, drawTorus,
     drawEllipsoid.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
Create a surface of revolution from a planar curve



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 22
rotation3dAxisAndAngle


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 930
ROTATION3DAXISANDANGLE Determine axis and angle of a 3D rotation matrix

   [AXIS, ANGLE] = rotation3dAxisAndAngle(MAT)
   Where MAT is a 4-by-4 matrix representing a rotation, computes the
   rotation axis (containing the points that remain invariant under the
   rotation), and the rotation angle around that axis.
   AXIS has the format [DX DY DZ], constrained to unity, and ANGLE is the
   rotation angle in radians.

   Note: this method use eigen vector extraction. It would be more precise
   to use quaternions, see:
   http://www.mathworks.cn/matlabcentral/newsreader/view_thread/160945


   Example
     origin = [1 2 3];
     direction = [4 5 6];
     line = [origin direction];
     angle = pi/3;
     rot = createRotation3dLineAngle(line, angle);
     [axis angle2] = rotation3dAxisAndAngle(rot);
     angle2
     angle2 =
           1.0472

   See also
   transforms3d, vectors3d, angles3d, eulerAnglesToRotation3d




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 71
ROTATION3DAXISANDANGLE Determine axis and angle of a 3D rotation matrix



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
sph2cart2


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 974
 -- Function File: C = sph2cart2 (S)
 -- Function File: C = sph2cart2 (THETA, PHI)
 -- Function File: C = sph2cart2 (THETA, PHI, RHO)
 -- Function File: [X Y Z]= sph2cart2 (...)
     Convert spherical coordinates to cartesian coordinates

     C = SPH2CART2(S) C = SPH2CART2(THETA, PHI) (assume rho = 1) C =
     SPH2CART2(THETA, PHI, RHO) [X, Y, Z] = SPH2CART2(THETA, PHI, RHO);

     S = [phi theta rho] (spherical coordinate).  C = [X Y Z] (cartesian
     coordinate)

     The following convention is used: THETA is the colatitude, in
     radians, 0 for north pole, +pi for south pole, pi/2 for points with
     z=0.  PHI is the azimuth, in radians, defined as matlab cart2sph:
     angle from Ox axis, counted counter-clockwise.  RHO is the distance
     of the point to the origin.  Discussion on choice for convention
     can be found at:
     http://www.physics.oregonstate.edu/bridge/papers/spherical.pdf

     See also: angles3d, cart2sph2, sph2cart, sph2cart2d.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
Convert spherical coordinates to cartesian coordinates



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 10
sph2cart2d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 914
 -- Function File: C = sph2cart2d(THETA, PHI, RHO)
 -- Function File: C = sph2cart2d(THETA, PHI)
 -- Function File: C = sph2cart2d(S)
 -- Function File: [X,Y,Z] = sph2cart2d(THETA, PHI, RHO)
     Convert spherical coordinates to cartesian coordinates in degrees

     C = SPH2CART2(THETA, PHI) assumes RHO = 1.

     S = [THETA, PHI, RHO] (spherical coordinate).  C = [X,Y,Z]
     (cartesian coordinate)

     The following convention is used: THETA is the colatitude, in
     degrees, 0 for north pole, +180 degrees for south pole, +90 degrees
     for points with z=0.  PHI is the azimuth, in degrees, defined as
     matlab cart2sph: angle from Ox axis, counted counter-clockwise.
     RHO is the distance of the point to the origin.  Discussion on
     choice for convention can be found at:
     <http://www.physics.oregonstate.edu/bridge/papers/spherical.pdf>

     See also: angles3d, cart2sph2d, sph2cart2.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 65
Convert spherical coordinates to cartesian coordinates in degrees



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 7
spheres


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 686
 -- Function File: spheres ()
     Description of functions operating on 3D spheres

     Spheres are represented by their center and their radius: S = [xc
     yc zc r];

     An ellipsoid is defined by: ELL = [XC YC ZC A B C PHI THETA PSI]
     where [XC YC ZY] is the center, [A B C] are length of semi-axes (in
     decreasing order), and [PHI THETA PSI] are euler angles
     representing the ellipsoid orientation.

     See also: createSphere, inertiaEllipsoid, intersectLineSphere,
     intersectPlaneSphere, sphericalVoronoiDomain, drawSphere,
     drawEllipsoid, drawSphericalEdge, drawSphericalTriangle,
     drawSphericalPolygon, fillSphericalTriangle, fillSphericalPolygon.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
Description of functions operating on 3D spheres



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
transformLine3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 459
TRANSFORMLINE3D Transform a 3D line with a 3D affine transform

   LINE2 = transformLine3d(LINE1, TRANS)

   Example
   P1 = [10 20 30];
   P2 = [30 40 50];
   L = createLine3d(P1, P2);
   T = createRotationOx(P1, pi/6);
   L2 = transformLine3d(L, T);
   figure; hold on;
   axis([0 100 0 100 0 100]); view(3);
   drawPoint3d([P1;P2]);
   drawLine3d(L, 'b');
   drawLine3d(L2, 'm');

   See also:
   lines3d, transforms3d, transformPoint3d, transformVector3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 62
TRANSFORMLINE3D Transform a 3D line with a 3D affine transform



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 16
transformPoint3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1317
 -- Function File: PT2 = transformPoint3d (PT1, TRANS)
 -- Function File: PT2 = transformPoint3d (X1,Y1,Z1, TRANS)
 -- Function File: [X2,Y2,Z2] = transformPoint3d (...)
     Transform a point with a 3D affine transform

     PT2 = transformPoint3d(PT1, TRANS); PT2 = transformPoint3d(X1, Y1,
     Z1, TRANS); where PT1 has the form [xp yp zp], and TRANS is a
     [3x3], [3x4], [4x4] matrix, return the point transformed according
     to the affine transform specified by TRANS.

     Format of TRANS is a 4-by-4 matrix.

     The function accepts transforms given using the following formats:
     [a b c] , [a b c j] , or [a b c j] [d e f] [d e f k] [d e f k] [g h
     i] [g h i l] [g h i l] [0 0 0 1]

     PT2 = transformPoint3d(PT1, TRANS) also work when PT1 is a
     [Nx3xMxPxETC] array of double.  In this case, PT2 has the same size
     as PT1.

     PT2 = transformPoint3d(X1, Y1, Z1, TRANS); also work when X1, Y1
     and Z1 are 3 arrays with the same size.  In this case, PT2 will be
     a 1-by-3 cell containing {X Y Z} outputs of size(X1).

     [X2 Y2 Z2] = transformPoint3d(...); returns the result in 3
     different arrays the same size as the input.  This form can be
     useful when used with functions like meshgrid or warp.

     See also: points3d, transforms3d, translation3d,meshgrid.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
Transform a point with a 3D affine transform



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 17
transformVector3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 878
TRANSFORMVECTOR3D Transform a vector with a 3D affine transform

   V2 = transformVector3d(V1, TRANS);
   Computes the vector obtained by transforming vector V1 with affine
   transform TRANS.
   V1 has the form [x1 y1 z1], and TRANS is a [3x3], [3x4], or [4x4]
   matrix, with one of the forms:
   [a b c]   ,   [a b c j] , or [a b c j]
   [d e f]       [d e f k]      [d e f k]
   [g h i]       [g h i l]      [g h i l]
                                [0 0 0 1]

   V2 = transformVector3d(V1, TRANS) also works when V1 is a [Nx3xMxEtc]
   array of double. In this case, V2 has the same size as V1.

   V2 = transformVector3d(X1, Y1, Z1, TRANS);
   Specifies vectors coordinates in three arrays with same size.

   [X2 Y2 Z2] = transformVector3d(...);
   Returns the coordinates of the transformed vector separately.


   See also:
   vectors3d, transforms3d, transformPoint3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 63
TRANSFORMVECTOR3D Transform a vector with a 3D affine transform



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 13
vectorAngle3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 475
 -- Function File: THETA = vectorAngle3d (V1, V2)
     Angle between two 3D vectors

     THETA = vectorAngle3d(V1, V2) Computes the angle between the 2 3D
     vectors V1 and V2.  The result THETA is given in radians, between 0
     and PI.

     Example # angle between 2 orthogonal vectors vectorAngle3d([1 0 0],
     [0 1 0]) ans = 1.5708

     # angle between 2 parallel vectors v0 = [3 4 5];
     vectorAngle3d(3*v0, 5*v0) ans = 0

     See also: vectors3d, vectorNorm.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
Angle between two 3D vectors



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
vectors3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 406
 -- Function File: vectors3d ()
     VECTORS3D Description of functions operating on 3D vectors

     Vectors are represented by their 3 Cartesian coordinates: V = [VX
     VY VZ];

     List of vectors are represented by N*3 arrays, with the coordinates
     of each vector on a row.

     See also: vectorNorm3d, normalizeVector3d, vectorAngle3d
     isParallel3d, isPerpendicular3d, createTranslation3d.


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 58
VECTORS3D Description of functions operating on 3D vectors





