# doc-cache created by Octave 10.2.0
# name: cache
# type: cell
# rows: 3
# columns: 175
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 8
Contents


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15290
CONTENTS GEOM3D Geometry 3D Toolbox.
 Version 1.22 06-Jun-2018 .

   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').
   Ellipsoid:  [x0 y0 z0 A B C PHI THETA PSI]
   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.


 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.
   distancePoints3d            - Compute euclidean distance between pairs of 3D Points.
   clipPoints3d                - Clip a set of points by a box or other 3d shapes.
   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.
   hypot3                      - Diagonal length of a cuboidal 3D box .
   crossProduct3d              - Vector cross product faster than inbuilt MATLAB cross.
   vectorAngle3d               - Angle between two 3D vectors.
   isParallel3d                - Check parallelism of two 3D vectors.
   isPerpendicular3d           - Check orthogonality of two 3D vectors.
   drawVector3d                - Draw vector at a given position.

 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.
   createEdge3d                - Create an edge between two 3D points, or from a 3D line.
   fitLine3d                   - Fit a 3D line to a set of points.
   parallelLine3d              - Create 3D line parallel to another one.
   projPointOnLine3d           - Project a 3D point orthogonally onto a 3D line.
   distancePointLine3d         - Euclidean distance between 3D point and line.
   isPointOnLine3d             - Test if a 3D point belongs to a 3D line.
   linePosition3d              - Return the position of a 3D point projected on a 3D line.
   distanceLines3d             - Minimal distance between two 3D lines.
   transformLine3d             - Transform a 3D line with a 3D affine transform.
   reverseLine3d               - Return same 3D line but with opposite orientation.
   normalizeLine3d             - Normalizes the direction vector of a 3D line.
   clipLine3d                  - Clip a line with a box and return an edge.
   drawLine3d                  - Draw a 3D line clipped by the current axes.

 3D Edges and Rays
   edges3d                     - Description of functions operating on 3D edges.
   edgeLength3d                - Return the length of a 3D edge.
   clipEdge3d                  - Clip a 3D edge with a cuboid box.
   lineToEdge3d                - Convert a 3D straight line to a 3D finite edge.
   edgeToLine3d                - Convert a 3D edge to a 3D straight line.
   distancePointEdge3d         - Minimum distance between a 3D point and a 3D edge.
   isPointOnEdge3d             - Test if a 3D point belongs to an edge.
   drawEdge3d                  - Draw 3D edge in the current axes.
   createRay3d                 - Create a 3D ray.
   clipRay3d                   - Clip a 3D ray with a box and return a 3D edge.
   drawRay3d                   - Draw a 3D ray on the current axis.

 Planes
   planes3d                    - Description of functions operating on 3D planes.
   createPlane                 - Create a plane in parametrized form.
   clipPlane                   - Compute the 3D polygon representing a clipped plane.
   fitPlane                    - Fit a 3D plane to a set of points.
   normalizePlane              - Normalize parametric representation of a plane.
   parallelPlane               - Parallel to a plane through a point or at a given distance.
   reversePlane                - Return same 3D plane but with opposite orientation.
   isPlane                     - Check if input is a plane.
   transformPlane3d            - Transform a 3D plane with a 3D affine transform.
   planesBisector              - Bisector plane between two other planes.
   projPointOnPlane            - Return the orthogonal projection of a point on a plane.
   intersectPlanes             - Return intersection line between 2 planes in space.
   intersectThreePlanes        - Return intersection point between 3 planes in space.
   intersectLinePlane          - Intersection point between a 3D line and a plane.
   intersectEdgePlane          - Return intersection point between a plane and a edge.
   distancePointPlane          - Signed distance betwen 3D point and plane.
   projLineOnPlane             - Return the orthogonal projection of a line 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 by the current axes.

 3D Polygons and curves
   polygons3d                  - Description of functions operating on 3D polygons.
   isPolygon3d                 - Check if input is a 3d polygon.
   polygonCentroid3d           - Centroid (or center of mass) of a polygon.
   polygonArea3d               - Area of a 3D polygon.
   polygon3dNormalAngle        - Normal angle at a vertex of the 3D polygon.
   intersectEdgePolygon3d      - Intersection point of a 3D edge segment and a 3D polygon.
   intersectLinePolygon3d      - Intersection point of a 3D line and a 3D polygon.
   intersectRayPolygon3d       - Intersection point of a 3D ray and a 3D polygon.
   clipPolygonByPlane3d        - Clip a 3D polygon with a plane.
   drawPolygon3d               - Draw a 3D polygon specified by a list of vertex coords.
   drawPolyline3d              - Draw a 3D polyline specified by a list of vertex coords.
   fillPolygon3d               - Fill a 3D polygon specified by a list of vertex coords.
   transformPolygon3d          - Transform a polygon with a 3D affine transform.

 3D Triangles
   triangleArea3d              - Area of a 3D triangle.
   distancePointTriangle3d     - Minimum distance between a 3D point and a 3D triangle.
   intersectLineTriangle3d     - Intersection point of a 3D line and a 3D triangle.

 3D circles and ellipses
   circles3d                   - Description of functions operating on 3D circles.
   fitCircle3d                 - Fit a 3D circle to a set of points.
   fitEllipse3d                - Fit an ellipse to a set of points.
   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.
   distancePointCircle3d       - Distance between 3D points and 3D circle.
   drawCircle3d                - Draw a 3D circle.
   drawCircleArc3d             - Draw a 3D circle arc.
   drawEllipse3d               - Draw a 3D ellipse.
   projPointOnCircle3d         - Project a 3D point onto a 3D circle.
   transformCircle3d           - Transform a 3D circle with a 3D affine transformation.

 Spheres
   spheres                     - Description of functions operating on 3D spheres.
   createSphere                - Create a sphere containing 4 points.
   fitSphere                   - Fit a sphere to 3D points using the least squares approach.
   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.
   drawSphericalEdge           - Draw an edge on the surface of a sphere.
   drawSphericalTriangle       - Draw a triangle on a sphere.
   fillSphericalTriangle       - Fill a triangle on a sphere.
   drawSphericalPolygon        - Draw a spherical polygon.
   fillSphericalPolygon        - Fill a spherical polygon.
   sphericalVoronoiDomain      - Compute a spherical voronoi domain.

 Smooth surfaces
   equivalentEllipsoid         - Equivalent ellipsoid of a set of 3D points.
   isPointInEllipsoid          - Check if a point is located inside a 3D ellipsoid.
   ellipsoidSurfaceArea        - Approximated surface area of an ellipsoid.
   oblateSurfaceArea           - Approximated surface area of an oblate ellipsoid.
   prolateSurfaceArea          - Approximated surface area of a prolate ellipsoid.
   cylinderSurfaceArea         - Surface area of a cylinder.
   geodesicCylinder            - Computes the geodesic between two points on a cylinder.
   intersectLineCylinder       - Compute intersection points between a line and a cylinder.
   projPointOnCylinder         - Project a 3D point onto 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.
   drawEllipseCylinder         - Draw a cylinder with ellipse cross-section.
   drawCapsule                 - Draw a capsule.
   drawDome                    - Draw a dome (half-sphere, semi-sphere) as a mesh.
   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.
   fitAffineTransform3d        - Compute the affine transform that best register two 3D point sets.
   registerPoints3dAffine      - Fit 3D affine transform using iterative algorithm.
   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.
   isTransform3d               - Check if input is a affine transformation 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.
   createRotationVector3d      - Calculates the rotation between two vectors.
   createRotationVectorPoint3d - Calculates the rotation between two vectors.
   createRotationAboutPoint3d  - Rotate about a point using a 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.
   drawPlatform                - Draw a rectangular platform with a given size.
   drawLabels3d                - Draw text labels at specified 3D positions.
   drawArrow3d                 - plot a quiver of 3D arrows.
   drawAngleBetweenVectors3d   - Draw an arc between 2 vectors.


   Credits:
   * Several functions contributed by Sven Holcombe
   * function isCoplanar was originally written by Brett Shoelson.
   * Songbai Ji enhanced file intersectPlaneLine (6/23/2006).
   * several functions contributed by oqilipo




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 36
CONTENTS GEOM3D Geometry 3D Toolbox.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 452
ANGLEPOINTS3D 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.

   Example
       rad2deg(anglePoints3d([0 0 1],[1 1 0]))

   See also 
   points3d, angles3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 52
ANGLEPOINTS3D 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: 804
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 depends on the plane orientation: points can be in reverse order
   compared to expected. The reference plane is computed based on the
   first three 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: 71
ANGLESORT3D 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: 1687
ANGLES3D Conventions for manipulating angles in 3D.

   The library uses both radians and degrees angles;
   Results of angle computation between shapes usually returns angles in
   radians.
   Representation of 3D shapes use angles in degrees (easier to manipulate
   and to save). 

   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: 51
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: 614
BOUNDINGBOX3D Bounding box of a set of 3D points.

   BOX = boundingBox3d(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);
     set(gcf, 'renderer', 'opengl')
     axis([-2 2 -2 2 -2 2]);
     view(3)
     
   See also 
   boxes3d, drawBox3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 49
BOUNDINGBOX3D 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: 327
BOX3DVOLUME Volume of a 3-dimensional box.

   V = box3dVolume(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)

   See also 
   boxes3d, boundingBox3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
BOX3DVOLUME 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: 440
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 
   boundingBox3d, box3dVolume, drawBox3d
   intersectBoxes3d, mergeBoxes3d, randomPointInBox3d




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 55
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: 660
CART2CYL  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 
   angles3d, cart2pol, cart2sph2




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 55
CART2CYL  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: 811
CART2SPH2 Convert cartesian coordinates to spherical coordinates.

   [THETA PHI RHO] = cart2sph2([X Y Z])
   [THETA PHI RHO] = cart2sph2(X, Y, Z)

   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: 65
CART2SPH2 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: 1016
CART2SPH2D Convert cartesian coordinates to spherical coordinates in degrees.

   [THETA PHI RHO] = cart2sph2d([X Y Z])
   [THETA PHI RHO] = cart2sph2d(X, Y, Z)

   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

     % check consistency with sph2cart2d
     sph2cart2d(cart2sph2d(30, 40, 5))
     ans =
         30.0000   40.0000    5.0000

   See also 
     angles3d, sph2cart2d, cart2sph, cart2sph2




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 77
CART2SPH2D 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: 307
CIRCLE3DORIGIN Return the first point of a 3D circle.

   P = circle3dOrigin([XC YC ZC R THETA PHI])
   P = circle3dOrigin([XC YC ZC R THETA PHI PSI])
   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: 53
CIRCLE3DORIGIN 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: 603
CIRCLE3DPOINT Coordinates of a point on a 3D circle from its position.

   output = circle3dPoint(input)

   Example
     % Draw some points on a 3D circle
     figure('color','w'); hold on; view(130,-10);
     circle = [10 20 30 50 90 45 0];
     drawCircle3d(circle)
     % origin point
     pos1 = 0;
     drawPoint3d(circle3dPoint(circle, pos1), 'ro')
     % few points regularly spaced
     drawPoint3d(circle3dPoint(circle, 10:10:40), '+')
     % Draw point opposite to origin
     drawPoint3d(circle3dPoint(circle, 180), 'k*')
   

   See also 
   circles3d, circle3dPosition



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 70
CIRCLE3DPOINT 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: 415
CIRCLE3DPOSITION Return the angular position of a point on a 3D circle.

   POS = circle3dPosition(POINT, 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: 71
CIRCLE3DPOSITION 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: 674
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: 59
CIRCLES3D Description of functions operating on 3D circles.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 155
CLIPEDGE3D Clip a 3D edge with a cuboid box.

   CLIPPED = clipEdge3d(EDGE, BOX)

   Example
   clipEdge3d

   See also 
     lines3d, edges3d, clipLine3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
CLIPEDGE3D Clip a 3D edge with a cuboid box.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 484
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, clipRay3d




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



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 792
CLIPPLANE Compute the 3D polygon representing a clipped plane.

   POLY = clipPlane(PLANE, BOUNDS)
   Computes the vertices of the 3D polygon that represents the result of
   the clipping of the plane by the given BOUNDS.
   PLANE is given as [X0 Y0 Z0  DX1 DY1 DZ1   DX2 DY2 DZ2], 
   BOUNDS is given as [XMIN XMAX  YMIN YMAX  ZMIN ZMAX].
   The result POLY is given as N-by-3 numeric array representing the
   coordinates of the polygon, or an emptyarray if the plane lies totally
   outside of the bounds.


   Example
     plane = [5 5 5  1 0 0  0 1 0];
     bounds = [0 10  0 10  0 10];
     poly = clipPlane(plane, bounds)
     poly =
          0     0     5
         10     0     5
         10    10     5
          0    10     5

   See also 
     planes3d, createPlane, drawPlane3d




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 62
CLIPPLANE Compute the 3D polygon representing a clipped plane.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 583
CLIPPOINTS3D Clip a set of points by a box or other 3d shapes.

   CLIP = clipPoints3d(POINTS, BOX);
   Returns the set of points which are located inside of the box BOX.

   [CLIP, IND] = clipPoints3d(POINTS, BOX);
   Also returns the indices of clipped points.
   
   ... = clipPoints3d(..., 'shape', 'sphere') Specify the shape.
   Default is 'box'. But it is also possible to use 'sphere' or 'plane'.
   
   ... = clipPoints3d(..., 'inside', false) returns the set of  
   points outside the shape instead of inside.

   See also 
   points3d, boxes3d, spheres




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 62
CLIPPOINTS3D Clip a set of points by a box or other 3d shapes.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1350
CLIPPOLYGONBYPLANE3D clip a 3d polygon by a plane.

   POLY2 = clipPolygonByPlane3d(POLY, PLANE)
   The 3d polygon POLY is clipped by the PLANE. The result POLY2:
    - Represents the part of the polygon below the plane if the plane
      intersects the polygon.
    - Is the same as POLY if the polygon is below the plane and the plane 
      does not intersect the polygon.
    - Is an empty 3d polygon [0x3] if the polygon is above the plane and 
      the plane does not intersect the polygon.

   Example
     % 2d poly
     pol = [6	7	6	6	5	4	3	2	2	1	2	2	6 ...
            NaN  3	3	4	5	5	3	NaN	4	5	5;
            4	4	5	6	6	7	6	6	4	2	2	2	1 ...
    	     NaN  4	5	5	4	4	3	NaN	3	2	3]';
     % Transform into 3d polygon
     phi=-360+720*rand;
     theta=-360+720*rand;
     psi=-360+720*rand;
     pol3d = transformPolygon3d(pol,eulerAnglesToRotation3d(phi, theta, psi));
     plane = [polygonCentroid3d(pol3d) rand(1,6)];
     % Clip polygon 
     pol3d2 = clipPolygonByPlane3d(pol3d, plane);
     % Draw results
     figure; hold on; axis equal; view(3)
     drawPolygon3d(pol3d, 'linewidth', 2, 'color', 'y');
     drawPlane3d(plane)
     drawPolygon3d(pol3d2, 'linewidth', 2, 'color', 'b');
     drawArrow3d(polygonCentroid3d(pol3d), ...
         normalizeVector3d(planeNormal(plane))*3,'g')

   See also 
   poygons3d, intersectLinePolygon3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
CLIPPOLYGONBYPLANE3D clip a 3d polygon by a plane.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 801
CLIPRAY3D Clip a 3D ray with a box and return a 3D edge.

   EDGE = clipRay3d(RAY, BOX)
   Clips the ray RAY with the bounds given in BOX, and returns the
   corresponding edge. 
   RAY is given as origin + direction vector: [X0 Y0 Z0  DX DY DZ]
   BOX is given as  [XMIN XMAX  YMIN YMAX  ZMIN ZMAX].
   The result EDGE is given as [X1 Y1 Z1  X2 Y2 Z2].

   Example
     % generate 50 random 3D rays
     origin = [29 28 27];
     v = rand(50, 3);
     v = v - centroid(v);
     ray = [repmat(origin, size(v,1),1) v];
     % clip the rays with a 3D box
     box = [10 40 10 40 10 40];
     edges = clipRay3d(ray, box);
     % draw the resulting 3D edges
     figure; axis equal; axis([0 50 0 50 0 50]); hold on; view(3);
     drawBox3d(box);
     drawEdge3d(edges, 'g');

   See also 
     clipLine3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 56
CLIPRAY3D Clip a 3D ray with a box and return a 3D edge.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 648
COMPOSETRANSFORMS3D Concatenate several space transformations.

   TRANS = composeTransforms3d(TRANS1, TRANS2, ...);
   Computes the affine transform equivalent to performing successively
   TRANS1, TRANS2, ...
   
   Example:
   PTS  = rand(20, 3);
   ROT1 = createRotationOx(pi/3);
   ROT2 = createRotationOy(pi/4);
   ROT3 = createRotationOz(pi/5);
   ROTS = composeTransforms3d(ROT1, ROT2, ROT3);
   Then:
   PTS2 = transformPoint3d(PTS, ROTS);
   will give the same result as:
   PTS3 = transformPoint3d(transformPoint3d(transformPoint3d(PTS, ...
       ROT1), ROT2), ROT3);

   See also 
   transforms3d, transformPoint3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 62
COMPOSETRANSFORMS3D Concatenate several space transformations.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1276
CREATEBASISTRANSFORM3D Compute matrix for transforming a basis into another basis.

   TRANSFO = createBasisTransform3d(SOURCE, TARGET) will create a 4-by-4
   transformation matrix representing the transformation from SOURCE basis
   to TARGET basis. 
    SOURCE and TARGET are either standard 1-by-9 geom3d PLANE
    representations of the form: [x0 y0 z0  ex1 ey1 ez1  ex2 ey2 ez2]
     OR
    SOURCE and TARGET may be any string such as 'global' or 'g' in which
    case they represent the global plane [0 0 0 1 0 0 0 1 0].

   The resulting TRANSFO matrix is such that a point expressed with
   coordinates of the first basis will be represented by new coordinates
   P2 = transformPoint3d(P1, TRANSFO) in the target basis.

   Either (or both) SOURCE or TARGET may be an N-by-9 set of N planes. In
   that case, TRANSFO will be a 4-by-4-by-N array of N transformation
   matrices.

   Example:
     % Calculate local plane coords. of a point given in global coords.
     plane = [10 10 10  1 0 0  0 1 0];
     transfo = createBasisTransform3d('global', plane);
     PT_IN_PLANE = transformPoint3d([3 8 2], transfo)
     PT_IN_PLANE =
         13  18  12

   See also 
     transforms3d, transformPoint3d, planePosition, createBasisTransform



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
CREATEBASISTRANSFORM3D Compute matrix for transforming a basis into another b...



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 474
CREATEEDGE3D Create an edge between two 3D points, or from a 3D line.

   E = createEdge3d(P1, P2)
   Creates the 3D edge joining the two points P1 and P2.

   E = createEdge3d(LIN)
   Creates the 3D edge with same origin and same direction vector as the
   3D line LIN.

   Example
     p1 = [1 1 1];
     p2 = [3 4 5];
     edge = createEdge3d(p1, p2);
     edgeLength3d(edge)
     ans =
         5.3852
   
   See also 
     edges3d, drawEdge3d, clipEdge3d, edgelength3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 69
CREATEEDGE3D Create an edge between two 3D points, or from a 3D line.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1020
CREATELINE3D Create a line with various inputs.

   Line is represented in a parametric form : [x0 y0 z0 dx dy dz]
       x = x0 + t*dx
       y = y0 + t*dy;
       z = z0 + t*dz;


   L = createLine3d(P1, P2);
   Returns the line going through the two given points P1 and P2.
   
   L = createLine3d(X0, Y0, Z0, DX, DY, DZ);
   Returns the line going through the point [x0, y0, z0], and with
   direction vector given by [DX DY DZ]. 

   L = createLine3d(P0, DX, DY, DZ);
   Returns the line going through point P0 given by [x0, y0, z0] and with
   direction vector given by [DX DY DZ]. 

   L = createLine3d(THETA, PHI);
   Create a line originated at (0,0) and with angles theta and phi.

   L = createLine3d(P0, THETA, PHI);
   Create a line with direction given by theta and phi, and which contains
   point P0. 


   Note : in all cases, parameters can be vertical arrays of the same
   dimension. The result is then an array of lines, of dimensions [N*6].

   See also 
   lines3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
CREATELINE3D Create a line with various inputs.



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


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

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

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

   PLANE = createPlane(P0, N);
   Creates a plane from a point P0 and a normal N 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(P0, Dip, DipDir);
   Creates a plane from a point and from a dip and dip direction angles 
   of the plane. Parameters Dip and DipDir angles are given as numbers.
   Dip : maximum inclination to the horizontal.
   DipDir : direction of the horizontal trace of the line of dip, 
            measured clockwise from north.

   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: 48
CREATEPLANE Create a plane in parametrized form.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 199
CREATERAY3D Create a 3D ray.

   RAY = createRay3d(P1, P2)
   Create a ray starting from point P1 and going in the direction of point
   P2.

   Example
   createRay3d

   See also 
     creatLine3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
CREATERAY3D Create a 3D ray.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 508
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: 74
CREATEROTATION3DLINEANGLE Create rotation around a line by an angle theta.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 26
createRotationAboutPoint3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 481
CREATEROTATIONABOUTPOINT3D Rotate about a point using a rotation matrix.

   TFM = createRotationAboutPoint3d(ROT, POINT) Returns the transformation 
   matrix corresponding to a translation(-POINT), rotation with ROT and 
   translation(POINT). Ignores a possible translation in ROT(1:3,4).

   See also 
   transforms3d, transformPoint3d, createRotationOx, createRotationOy, 
   createRotationOz, createRotation3dLineAngle, createRotationVector3d,
   createRotationVectorPoint3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 72
CREATEROTATIONABOUTPOINT3D Rotate about a point using a rotation matrix.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 834
CREATEROTATIONOX 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: 70
CREATEROTATIONOX 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: 822
CREATEROTATIONOY Create the 4x4 matrix of a 3D rotation around y-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 0 1] into the vector [1 0 0].

   The returned matrix has the form:
   [ cos(THETA)  0  sin(THETA)  0 ]
   [    0        1       0      0 ]
   [-sin(THETA)  0  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: 70
CREATEROTATIONOY Create the 4x4 matrix of a 3D rotation around y-axis.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 836
CREATEROTATIONOZ Create the 4x4 matrix of a 3D rotation around z-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 [1 0 0] into the vector [0 1 0].

   The returned matrix has the form:
   [cos(THETA) -sin(THETA)  0  0]
   [sin(THETA)  cos(THETA)  0  0]
   [    0           0       1  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: 70
CREATEROTATIONOZ Create the 4x4 matrix of a 3D rotation around z-axis.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 626
CREATEROTATIONVECTOR3D Calculates the rotation between two vectors.

   ROT = createRotationVector3d(A, B) returns the 4x4 rotation matrix ROT
   to transform vector A in the same direction as vector B.

   Example
     A=[ .1  .2  .3];
     B=-1+2.*rand(1,3);
     ROT = createRotationVector3d(A,B);
     C = transformVector3d(A,ROT);
     figure('color','w'); hold on; view(3)
     O=[0 0 0];
     drawVector3d(O, A,'r');
     drawVector3d(O, B,'g');
     drawVector3d(O, C,'r');

   See also 
   transformPoint3d, createRotationOx, createRotationOy, createRotationOz

   Source
     https://math.stackexchange.com/a/897677



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 67
CREATEROTATIONVECTOR3D Calculates the rotation between two vectors.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 27
createRotationVectorPoint3d


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 621
CREATEROTATIONVECTORPOINT3D Calculates the rotation between two vectors.
   around a point
   
   TFM = createRotationVectorPoint3d(A,B,P) returns the transformation 
   to rotate the vector A in the direction of vector B around point P
   
   Example
     A=-5+10.*rand(1,3);
     B=-10+20.*rand(1,3);
     P=-50+100.*rand(1,3);
     ROT = createRotationVectorPoint3d(A,B,P);
     C = transformVector3d(A,ROT);
     figure('color','w'); hold on; view(3)
     drawPoint3d(P,'k')
     drawVector3d(P, A,'r')
     drawVector3d(P, B,'g')
     drawVector3d(P, C,'r')

   See also 
   transformPoint3d, createRotationVector3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
CREATEROTATIONVECTORPOINT3D Calculates the rotation between two vectors.
   a...



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 682
CREATESCALING3D 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 1-by-3 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: 54
CREATESCALING3D Create the 4x4 matrix of a 3D scaling.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 283
CREATESPHERE Create a sphere containing 4 points.

   s = createSphere(p1, p2, p3, p4);
   return in s the sphere common to the 4 pointsp1, p2, p3 and p4.

   Ref: P. Bourke
   http://astronomy.swin.edu.au/~pbourke/geometry/spherefrom4/

   See also 
   spheres, circles3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 49
CREATESPHERE Create a sphere containing 4 points.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 535
CREATETRANSLATION3D 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: 62
CREATETRANSLATION3D Create the 4x4 matrix of a 3D translation.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 528
CROSSPRODUCT3D Vector cross product faster than inbuilt MATLAB cross.

   C = crossProduct3d(A, B) 
   returns the cross product of the two 3D vectors A and B, that is: 
       C = A x B
   A and B must be N-by-3 element vectors. If either A or B is a 1-by-3
   row vector, the result C will have the size of the other input and will
   be the  concatenation of each row's cross product. 

   Example
     v1 = [2 0 0];
     v2 = [0 3 0];
     crossProduct3d(v1, v2)
     ans =
         0   0   6

   See also 
   vectorAngle3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 69
CROSSPRODUCT3D Vector cross product faster than inbuilt MATLAB cross.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 573
CYL2CART  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: 55
CYL2CART  Convert cylindrical to cartesian coordinates.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 581
CYLINDERSURFACEAREA  Surface area of a cylinder.

   S = cylinderSurfaceArea(CYL)
   Computes the surface area of the cylinder defined by:
   CYL = [X1 Y1 Z1  X2 Y2 Z2  R], 
   where [X1 Y1 Z1] and [X2 Y2 Z2] are the coordinates of the cylinder
   extremities, and R is the cylinder radius.
   The surface area of the cylinder comprises the surface area of the two
   disk-shape end caps.

   Example
     cyl = [0 0 0  1 0 0  1];
     cylinderSurfaceArea(cyl)
     ans =
        12.5664
     % equals to 4*pi

   See also 
     geom3d, ellipsoidSurfaceArea, intersectLineCylinder



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
CYLINDERSURFACEAREA  Surface area of a cylinder.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 487
DIHEDRALANGLE Compute dihedral angle between 2 planes.

   THETA = dihedralAngle(PLANE1, PLANE2)
   PLANE1 and PLANE2 are plane representations given in the following
   format:
   [x0 y0 z0 dx1 dy1 dz1 dx2 dy2 dz2]
   THETA is the angle between the two vectors given by plane normals,
   given between 0 and PI.

   References
   http://en.wikipedia.org/wiki/Dihedral_angle
   http://mathworld.wolfram.com/DihedralAngle.html

   See also 
   planes3d, lines3d, angles3d, planesBisector



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
DIHEDRALANGLE Compute dihedral angle between 2 planes.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 720
DISTANCELINES3D Minimal distance between two 3D lines.

   D = distanceLines3d(LINE1, LINE2);
   Returns the distance between line LINE1 and the line LINE2, given as:
   LINE1 : [x0 y0 z0 dx dy dz] (or M-by-6 array)
   LINE2 : [x0 y0 z0 dx dy dz] (or N-by-6 array)
   D     : (positive) array M-by-N

   [D, PT1, PT2] = distanceLines3d(LINE1, LINE2);
   Also returns the points located on LINE1 and LINE2 corresponding to the
   shortest distance. 
   One should get the following:
   distancePoints3d(PT1, PT2) - D == 0


   Example
     line1 = [2 3 4 0 1 0];
     line2 = [8 8 8 0 0 1];
     distanceLines3d(line1, line2)
     ans = 
         6.0000

   See also 
   lines3d, distancePoints3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
DISTANCELINES3D Minimal distance between two 3D lines.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1025
DISTANCEPOINTCIRCLE3D Distance between 3D points and 3D circle.

   D = distancePointCircle3d(POINTS, CIRCLE)
   Returns the euclidean distance D between POINTS and CIRCLE

   Example
     figure('color','w'); hold on; axis equal tight; view(3)
     circle = [10 20 30 50 90 45 60];
     drawCircle3d(circle)
     % Get some points on the circle
     pts = circle3dPoint(circle, 10:10:280);
     drawPoint3d(pts,'.r')
     % Get the normal of the circle
     circleNormal = normalizeVector3d(transformVector3d([0 0 1], ...
         eulerAnglesToRotation3d(circle(6), circle(5), circle(7), 'ZYZ')));
     drawArrow3d(circle(1:3), circleNormal*25)
     % Move points along the circle normal by 10 units
     pts2 = pts + 10 * circleNormal;
     drawPoint3d(pts2,'.g')
     drawEdge3d([pts, pts2])
     uniquetol(distancePointCircle3d(pts2, circle))
     % Decrease the circle radius by 5 units
     uniquetol(distancePointCircle3d(pts, [circle(1:3) circle(4)-5 circle(5:7)]))
   
   See also 
   circles3d, projPointOnCircle3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 63
DISTANCEPOINTCIRCLE3D Distance between 3D points and 3D circle.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 811
DISTANCEPOINTEDGE3D Minimum distance between a 3D point and a 3D edge.

   DIST = distancePointEdge3d(POINT, EDGE);
   Return the euclidean distance between edge EDGE and point POINT. 
   EDGE has the form: [x1 y1 z1 x2 y2 z2], and POINT is [x y z].

   If EDGE is N-by-6 array, result is N-by-1 array computed for each edge.
   If POINT is a N-by-3 array, the result is computed for each point.
   If both POINT and EDGE are array, they must have the same number of
   rows, and the result is computed for each couple point(i,:);edge(i,:).

   [DIST POS] = distancePointEdge3d(POINT, EDGE);
   Also returns the position of closest point on the edge. POS is
   comprised between 0 (first point) and 1 (last point).

   See also 
   edges3d, points3d, distancePoints3d, distancePointLine3d
   



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 70
DISTANCEPOINTEDGE3D Minimum distance between a 3D point and a 3D edge.



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


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

   D = distancePointLine3d(POINT, 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  
   
   See also 
   lines3d, isPointOnLine3d, distancePointEdge3d, projPointOnLine3d,
   

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



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



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 351
DISTANCEPOINTPLANE Signed distance between 3D point and plane.

   D = distancePointPlane(POINT, PLANE)
   Returns the euclidean distance between point POINT and the plane PLANE,
   given by: 
   POINT : [x0 y0 z0]
   PLANE : [x0 y0 z0 dx1 dy1 dz1 dx2 dy2 dz2]
   D     : scalar  
   
   See also 
   planes3d, points3d, intersectLinePlane



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 62
DISTANCEPOINTPLANE Signed distance between 3D point and plane.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1333
DISTANCEPOINTTRIANGLE3D Minimum distance between a 3D point and a 3D triangle.

   DIST = distancePointTriangle3d(PT, TRI);
   Computes the minimum distance between the point PT and the triangle
   TRI. The Point PT is given as a row vector of three coordinates. The
   triangle TRI is given as a 3-by-3 array containing the coordinates of
   each vertex in a row of the array:
   TRI = [...
      X1 Y1 Z1;...
      X2 Y2 Z2;...
      X3 Y3 Z3];

   [DIST, PROJ] = distancePointTriangle3d(PT, TRI);
   Also returns the coordinates of the projeced point.

   Example
      tri = [1 0 0; 0 1 0;0 0 1];
      pt = [0 0 0];
      dist = distancePointTriangle3d(pt, tri)
      dist =
           0.5774

   See also 
   meshes3d, distancePointMesh, distancePointEdge3d, distancePointPlane

   Reference
   * David Eberly (1999), "Distance Between Point and Triangle in 3D"
   https://www.geometrictools.com/Documentation/DistancePoint3Triangle3.pdf
   * see <a href="matlab:
     web('https://fr.mathworks.com/matlabcentral/fileexchange/22857-distance-between-a-point-and-a-triangle-in-3d')
   ">Distance between a point and a triangle in 3d</a>, by Gwendolyn Fischer.
   (same algorithm, but different order of input argument)

   * https://fr.mathworks.com/matlabcentral/fileexchange/22857-distance-between-a-point-and-a-triangle-in-3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 78
DISTANCEPOINTTRIANGLE3D Minimum distance between a 3D point and a 3D triangle.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 613
DISTANCEPOINTS3D Compute euclidean distance between pairs of 3D Points.

   D = distancePoints3d(P1, P2) return distance between points P1 and
   P2, given as [X Y Z].
   
   If P1 and P2 are two arrays of points, result is a N1*N2 array
   containing distance between each point of P1 and each point of P2. 


   D = distancePoints3d(P1, P2, NOR)
   with NOR 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.


   See also 
   points3d, minDistancePoints, distancePoints



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 71
DISTANCEPOINTS3D Compute euclidean distance between pairs of 3D Points.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 800
DRAWANGLEBETWEENVECTORS3D Draw an arc between 2 vectors.

   drawAngleBetweenVectors3d(ORIGIN, VECTOR1, VECTOR2, RADIUS) 
   draws the arc between VECTOR1 and VECTOR2.

   drawAngleBetweenVectors3d(...,'ConjugateAngle',1) draws the conjugate
   angle instead of the small angle. Default is false.
   
   H = drawAngleBetweenVectors3d(...)
   returns the handle of the created LINE object
   
   Example
     o=-100 + 200*rand(1,3);
     v1=normalizeVector3d(-1 + 2*rand(1,3));
     v2=normalizeVector3d(-1 + 2*rand(1,3));
     r = rand;
     figure('color','w'); view(3)
     hold on; axis equal tight; xlabel X; ylabel Y; zlabel Z;
     drawVector3d(o, v1, 'r')
     drawVector3d(o, v2, 'g')
     drawAngleBetweenVectors3d(o, v1, v2, r,'Color','m','LineWidth', 3)

   See also 
     drawCircleArc3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 56
DRAWANGLEBETWEENVECTORS3D Draw an arc between 2 vectors.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1546
DRAWARROW3D Plot a quiver of 3D arrows.

   drawArrow3d(pos, vec) 
   Plots 3D arrows given the (pos)ition array [x1 y1 z1; x2 y2 z2; ...] 
   and the (vec)tor array [dx1 dy1 dz1; dx2 dy2 dz2; ...].

   drawArrow3d(pos, vec, color)
   Optional positional argument color conforms to 'ColorSpec.'  
   For example, 'r','red',[1 0 0] will all plot a quiver with all arrows 
   as red. This can also be in the form of Nx3 where 'N' is the number of 
   arrows and each column corresponds to the RGB values. Default color is 
   black.

   drawArrow3d(...,Name,Value) Optional name-value pair arguments:
   'stemRatio': Ratio of the arrow head (cone) to the arrow stem (cylinder)
       For example, setting this value to 0.94 will produce arrows with 
       arrow stems 94% of the length and short, 6% cones as arrow heads.
       Values above 0 and below 1 are valid. Default is 0.75.
   'arrowRadius': changes the radius of the arrowstem. Percentage of the
       lenght of the arrow. Values between 0.01 and 0.3 are valid. 
       Default is 0.025.
   Uses the 'patch' function to plot the arrows. 'patch' properties can be  
   used to control the appearance of the arrows.

   drawArrow3d(AX,...) plots into AX instead of GCA.

   H = drawArrow3d(...) returns the handles of the arrows.

 Example:
    [X,Y] = meshgrid(1:5, -2:2);
    Z = zeros(size(X));
    pos = [X(:),Y(:),Z(:)];
    vec = zeros(size(pos));
    vec(:,1) = 1;
    drawArrow3d(pos, vec, 'g', 'stemRatio', 0.6);
    view(3); lighting('phong'); camlight('head'); axis('equal')




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 39
DRAWARROW3D Plot a quiver of 3D arrows.



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


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

   drawAxis3d
	Adds three 3D arrows 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.

   drawAxis3d(L, R)
   Specifies the length L and the radius of the cylinders representing the
   different axes.
   
   drawAxis3d(..., 'TFM', TRANSFORM)
   Transforms the coordinate system before drawing using TRANSFORM.

   H = drawAxis3d(...) returns the group handle of the axis object.

   Example
   drawAxis3d

   figure;
   drawAxis3d(20, 1);
   view([135,15]); lighting('phong'); camlight('head'); axis('equal')
   xlabel X; ylabel Y; zlabel Z

   See also 
     drawAxisCube




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



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 322
DRAWAXISCUBE Draw a colored cube representing axis orientation.

   Usage:
     drawAxisCube();
   Display a 3D unit cube with one corner located at position (0,0,0), and
   face colored according to the direction of their normal.

   Example
     drawAxisCube

   See also 
     drawAxis3d, createCube, patch



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 63
DRAWAXISCUBE Draw a colored cube representing axis orientation.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 560
DRAWBOX3D Draw a 3D box defined by coordinate extents.
   
   drawBox3d(BOX);
   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.

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

   See also 
     boxes3d, boundingBox3d




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



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2600
DRAWCAPSULE Draw a capsule.

   drawCapsule(CAP)
   Draws the capsule CAP on the current axis. 
   CAP is a 1-by-7 row vector in the form [x1 y1 z1 x2 y2 z2 r] where:
   * [x1 y1 z1] are the coordinates of starting point, 
   * [x2 y2 z2] are the coordinates of ending point, 
   * R is the radius of the cylinder and the two semi-spheres at the ends

   drawCapsule(CAP, N)
   Uses N points for discretizating the circles of the cylinder and the
   semi-spheres (domes). Default value is 32. 

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

   drawCapsule(..., 'FaceAlpha', ALPHA)
   Specifies the transparency of the capsule and of the semi-spheres.
 
   drawCapsule(..., 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
             (for the semi-spheres and the cylinder)
   'nTheta'  the number of circles used for drawing the parallels
             (only for the semi-spheres at the ends of the capsule)

   drawCapsule(AX, ...)
   Specifies the axis to draw on. AX should be a valid axis handle.

   H = drawCapsule(...)
   Returns a handle to the patch representing the capsule.


   Examples:
   % basic example
     figure; drawCapsule([0 0 0 10 20 30 5]);

   % change capsule color
     figure; drawCapsule([0 0 0 10 20 30 5], 'FaceColor', 'r');

   % change capsule color using graphical handle
     figure;
     h = drawCapsule([0 0 0 10 20 30 5]);
     set(h, 'facecolor', 'b');

   % Draw three mutually intersecting capsules
     p0 = [10 10 10];
     p1 = p0 + 80 * [1 0 0];
     p2 = p0 + 80 * [0 1 0];
     p3 = p0 + 80 * [0 0 1];
     figure; axis equal; axis([0 100 0 100 0 100]); hold on
     drawCapsule([p0 p1 10], 'FaceColor', 'r');
     drawCapsule([p0 p2 10], 'FaceColor', 'g');
     drawCapsule([p0 p3 10], 'FaceColor', 'b');
     axis equal
     set(gcf, 'renderer', 'opengl')
     view([60 30]); light;

   % draw cube skeleton
     [v, e, f] = createCube;
     figure; axis equal; axis([-0.2 1.2 -0.2 1.2 -0.2 1.2]); hold on; view(3);
     caps = [v(e(:,1), :) v(e(:,2),:) repmat(0.1, size(e, 1), 1)];
     drawCapsule(caps);
     light
 
   % Draw a capsule with high resolution
     figure;
     h = drawCapsule([10,20,10,50,70,40,6], 'nPhi', 360, 'nTheta', 180);
     l = light; view(3);
     

   See also 
     crawCylinder, drawDome, drawSphere




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 27
DRAWCAPSULE Draw a capsule.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1741
DRAWCIRCLE3D 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: 30
DRAWCIRCLE3D Draw a 3D circle.



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


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

   drawCircleArc3d([XC YC ZC R THETA PHI PSI START EXTENT])
   [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 
     angles3d, circles3d, drawCircle3d, drawCircleArc




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 37
DRAWCIRCLEARC3D 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: 994
DRAWCUBE 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 azimut, 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);

   See also 
   meshes3d, polyhedra, createCube, drawCuboid




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



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1042
DRAWCUBOID Draw a 3D cuboid, eventually rotated.

   drawCuboid(CUBOID)
   Displays a 3D cuboid on current axis. CUBOID is given by:
   [XC YC ZC L W D YAW PITCH ROLL],
   where (XC, YC, ZC) is the cuboid center, L, W and H are the lengths of
   the cuboid main axes, and YAW PITCH ROLL are Euler angles representing
   the cuboid orientation, in degrees. 

   If cuboid is axis-aligned, it can be specified using only center and
   side lengths:
   CUBOID = [XC YC ZC L W H]

   Example
   % Draw a basic rotated cuboid
     figure; hold on;
     drawCuboid([10 20 30   90 40 10   10 20 30], 'FaceColor', 'g');
     axis equal;
     view(3);

     % Draw three "borromean" cuboids
     figure; hold on;
     drawCuboid([10 20 30 90 50 10], 'FaceColor', 'r');
     drawCuboid([10 20 30 50 10 90], 'FaceColor', 'g');
     drawCuboid([10 20 30 10 90 50], 'FaceColor', 'b');
     view(3); axis equal;
     set(gcf, 'renderer', 'opengl')

   See also 
     meshes3d, polyhedra, createCube, drawEllipsoid, drawCube




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 48
DRAWCUBOID Draw a 3D cuboid, eventually rotated.



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


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

   drawCylinder(CYL)
   Draws the cylinder CYL on the current axis. 
   CYL is a 1-by-7 row vector in the form [x1 y1 z1 x2 y2 z2 r] where:
   * [x1 y1 z1] are the coordinates of starting point, 
   * [x2 y2 z2] are the coordinates of ending point, 
   * R is the radius of the cylinder

   drawCylinder(CYL, N)
   Uses N points for discretizating the circles of the cylinder. Default
   value is 32. 

   drawCylinder(..., OPT)
   with OPT = 'open' (default) or 'closed', specify if the 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

   drawCylinder(..., 'FaceAlpha', ALPHA)
   Specifies the transparency of the cylinder and of the optionnal caps.

   drawCylinder(AX, ...)
   Specifies the axis to draw on. AX should be a valid axis handle.

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


   Examples:
   % basic example
     figure; drawCylinder([0 0 0 10 20 30 5]);

   % draw hollow cylinders
     figure; drawCylinder([0 0 0 10 20 30 5], 'open');

   % change cylinder color
     figure; drawCylinder([0 0 0 10 20 30 5], 'FaceColor', 'r');

   % change cylinder color using graphical handle
     figure;
     h = drawCylinder([0 0 0 10 20 30 5]);
     set(h, 'facecolor', 'b');

   % Draw three mutually intersecting cylinders
     p0 = [10 10 10];
     p1 = p0 + 80 * [1 0 0];
     p2 = p0 + 80 * [0 1 0];
     p3 = p0 + 80 * [0 0 1];
     figure; axis equal; axis([0 100 0 100 0 100]); hold on
     drawCylinder([p0 p1 10], 'FaceColor', 'r');
     drawCylinder([p0 p2 10], 'FaceColor', 'g');
     drawCylinder([p0 p3 10], 'FaceColor', 'b');
     axis equal
     set(gcf, 'renderer', 'opengl')
     view([60 30]); light;

   % draw cube skeleton
     [v, e, f] = createCube;
     figure; axis equal; axis([-0.2 1.2 -0.2 1.2 -0.2 1.2]); hold on; view(3);
     cyls = [v(e(:,1), :) v(e(:,2),:) repmat(0.1, size(e, 1), 1)];
     drawCylinder(cyls);
     light

   See also 
     cylinderMesh, drawEllipseCylinder, drawSphere, drawLine3d, surf
     intersectLineCylinder, cylinderSurfaceArea




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



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2035
DRAWDOME Draw a dome (half-sphere, semi-sphere) as a mesh.

   drawDome(DOME)
   Where DOME = [XC YC ZC R], draw the dome centered on the point with
   coordinates [XC YC ZC] and with radius R, using a quad mesh.
 
   drawDome(Dome, V)
   Where DOME = [XC YC ZC R] and V is a vector in the direction of the top
 
   drawDome(CENTER, R, V)
   Where CENTER = [XC YC ZC], specifies the center and the radius with two
   arguments and vector as third argument.
 
   drawDome(XC, YC, ZC, R, V)
   Specifiy dome center, radius and vector as five arguments.

   drawDome(..., 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 = drawDome(...)
   Return a handle to the graphical object created by the function.

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

   Example
   % Draw four domes with different centers
     figure(1); clf; hold on;
     drawDome([0 0 1 1], 'FaceColor', 'b', 'EdgeColor', 'k', 'LineStyle', ':');
     drawDome([0 1 0 1], [0 1 0]);
     drawDome([0 -1 0 0.5], [1 0 0]);
     drawDome([0 -5 4 10], 'FaceAlpha', 0.5, 'EdgeColor', 'r', 'LineStyle', '-');
     view([-30 20]); axis equal; l = light;

   % Draw dome with different settings
     figure(1); clf;
     drawDome([10 20 30 10], [0 0 1], 'linestyle', ':', 'facecolor', 'r');
     axis([0 50 0 50 0 50]); axis equal;
     l = light;

   % The same, but changes style using graphic handle
     figure(1); clf;
     h = drawDome([10 20 30 10], [1 0 0]);
     set(h, 'linestyle', ':');
     set(h, 'facecolor', 'r');
     axis([0 50 0 50 0 50]); axis equal;
     l = light;
   
   % Draw a dome with high resolution
     figure(1); clf;
     h = drawDome([10 20 30 10], 'nPhi', 360, 'nTheta', 180);
     l = light; view(3);


   See also 
   drawSphere



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 58
DRAWDOME Draw a dome (half-sphere, semi-sphere) as a mesh.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 695
DRAWEDGE3D Draw 3D edge in the current axes.

   drawEdge3d(EDGE) draws the edge EDGE on the current axis. 
   EDGE has the form: [x1 y1 z1 x2 y2 z2]. No clipping is performed.
   
   drawEdge3d(AX,...) plots into AX instead of GCA.

   H = drawEdge3d(...) returns a handle H to the line object.

   Example
     figure; axis equal; view(3)
     p1 = [10 20 80];
     p2 = [80 10 20];
     p3 = [20 50 10];
     drawEdge3d(gca, [p1;p2],[p2;p3],'b');
     drawEdge3d([p1;p3],'k');
     pause(1)
     drawEdge3d(gca, [p1 p2; p2 p3],'g');
     drawEdge3d(p1(1), p1(2), p1(3),p3(1), p3(2), p3(3),'Color','r','Marker','x');

   See also 
     drawLine3d, clipLine3d, drawEdge




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
DRAWEDGE3D Draw 3D edge in the current axes.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1364
DRAWELLIPSE3D Draw a 3D ellipse.

   Possible calls for the function :
   drawEllipse3d([XC YC ZC A B THETA PHI])
   drawEllipse3d([XC YC ZC A B THETA PHI PSI])
   drawEllipse3d([XC YC ZC A B], [THETA PHI])
   drawEllipse3d([XC YC ZC A B], [THETA PHI PSI])
   drawEllipse3d([XC YC ZC A B], THETA, PHI)
   drawEllipse3d([XC YC ZC], A, B, THETA, PHI)
   drawEllipse3d([XC YC ZC A B], THETA, PHI, PSI)
   drawEllipse3d([XC YC ZC], A, B, THETA, PHI, PSI)
   drawEllipse3d(XC, YC, ZC, A, B, THETA, PHI)
   drawEllipse3d(XC, YC, ZC, A, B, THETA, PHI, PSI)

   where XC, YC, ZY are coordinate of ellipse center, A and B are the
   half-lengths of the major and minor axes of the ellipse,
   PHI and THETA are 3D angle (in degrees) of the normal to the plane
   containing the ellipse (PHI between 0 and 360 corresponding to
   longitude, and THETA from 0 to 180, corresponding to angle with
   vertical).
   
   H = drawEllipse3d(...)
   return handle on the created LINE object
   
   Example
     figure; axis([-10 10 -10 10 -10 10]); hold on;
     ellXY = [0 0 0  8 5  0 0 0];
     drawEllipse3d(ellXY, 'color', [.8 0 0], 'linewidth', 2)
     ellXZ = [0 0 0  8 2  90 90 90];
     drawEllipse3d(ellXZ, 'color', [0 .8 0], 'linewidth', 2)
     ellYZ = [0 0 0  5 2  90 0 90];
     drawEllipse3d(ellYZ, 'color', [0 0 .8], 'linewidth', 2)
 



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 32
DRAWELLIPSE3D Draw a 3D ellipse.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1863
DRAWELLIPSECYLINDER Draw a cylinder with ellipse cross-section.

   drawEllipseCylinder(CYL)
   draws the cylinder CYL on the current axis.
   CYL is a cylinder defined by [x1 y1 z1 x2 y2 z2 r1 r2 roll], with:
   * [x1 y2 z1] are coordinates of starting point,
   * [x2 y2 z2] are coordinates of ending point, 
   * R1 and R2 are the lengths of the ellipse semi axes, and
   * ROLL is the rotation of the cylinder around its main axis (in
      degrees)

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

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

   drawEllipseCylinder(..., '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 = drawEllipseCylinder(...)
   returns a handle to the patch representing the cylinder.


   Example:
     figure; drawEllipseCylinder([0 0 0 10 20 30 5 2]);

     figure; drawEllipseCylinder([0 0 0 10 20 30 5 2], 'open');

     figure; drawEllipseCylinder([0 0 0 10 20 30 5 2], 'FaceColor', 'r');

     figure;
     h = drawEllipseCylinder([0 0 0 10 20 30 5 2]);
     set(h, 'facecolor', 'b');

     % Draw three mutually intersecting elliptic cylinders
     p1 = [30 0 0];
     p2 = [0 30 0];
     p3 = [0 0 30];
     radii = [20 10];
     figure;
     drawEllipseCylinder([-p1 p1 radii 0], 'FaceColor', 'r');
     hold on
     drawEllipseCylinder([-p2 p2 radii 90], 'FaceColor', 'g');
     drawEllipseCylinder([-p3 p3 radii 90], 'FaceColor', 'b');
     axis equal
     set(gcf, 'renderer', 'opengl')
     view([60 30]); light;

   See also 
     drawCylinder, drawSphere, cylinderMesh, drawLine3d, surf



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 63
DRAWELLIPSECYLINDER Draw a cylinder with ellipse cross-section.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 911
DRAWELLIPSOID Draw a 3D ellipsoid.

   drawEllipsoid(ELLI)
   Displays a 3D ellipsoid on current axis. ELLI is given by:
   [XC YC ZC A B C PHI THETA PSI],
   where (XC, YC, ZC) is the ellipsoid center, A, B and C are the half
   lengths of the ellipsoid main axes, and PHI THETA PSI are Euler angles
   representing ellipsoid orientation, in degrees.

   drawEllipsoid(..., 'drawEllipses', true)
   Also displays the main 3D ellipses corresponding to XY, XZ and YZ
   planes.


   Example
     figure; hold on;
     drawEllipsoid([10 20 30   50 30 10   5 10 0]);
     axis equal;

     figure; hold on;
     elli = [10 20 30   50 30 10   5 10 0];
     drawEllipsoid(elli, 'FaceColor', 'r', ...
         'drawEllipses', true, 'EllipseColor', 'b', 'EllipseWidth', 3);
     axis equal;

   See also 
   spheres, drawSphere, equivalentEllipsoid, ellipsoid, drawTorus, 
   drawCuboid 




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 34
DRAWELLIPSOID Draw a 3D ellipsoid.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1106
DRAWGRID3D Draw a 3D grid on the current axis.

   drawGrid3d
   draws a 3D square grid, with origin (0,0,0) and spacing 1 in each
   direction, with bounds corresponding to the bounds of current axis.

   drawGrid3d(SPACING)
   where spacing is either a scalar or a [1x3] matrix, specifies the size
   of the unit cell.

   drawGrid3d(ORIGIN, SPACING)
   Also specify origin of grid. ORIGIN is a [1x3] array.

   drawGrid3d(..., EDGE)
   specifies whether function should draw edges touching edges of axis.
   EDGE is a characheter string, which can be :
   - 'OPEN' : each line start from one face of window to the opposite
   face. This results in a 'spiky' grid.
   - 'CLOSED' (default value) : each line stops at the last visible point
   of the grid for this line. The result looks like a box (no free spikes
   around the grid).

   H = drawGrid3d(...);
   return a vector of handles for each LINE object which was crated.


   Example
     figure; hold on; axis equal; axis([-5 65 -5 45 -5 45]); view(3);
     drawGrid3d([0 0 0], [20 20 20]);


   See also 
     drawLine3d, drawEdge3d, clipLine3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 46
DRAWGRID3D Draw a 3D grid on the current axis.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 574
DRAWLABELS3D Draw text labels at specified 3D positions.
   
   drawLabels3d(X, Y, Z, LBL) draw labels LBL at position X and Y.
   LBL can be either a string array, or a number array. In this case,
   string are created by using sprintf function, with '%.2f' mask.

   drawLabels3d(POS, LBL) draw labels LBL at position specified by POS,
   where POS is a N-by-3 int array.

   drawLabels3d(..., NUMBERS, FORMAT) create labels using sprintf function,
   with the mask given by FORMAT (e. g. '%03d' or '5.3f'), and the
   corresponding values.

   See also 
     drawLabels




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 56
DRAWLABELS3D Draw text labels at specified 3D positions.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 914
DRAWLINE3D Draw a 3D line clipped by the current axes.

   drawLine3d(LINE) draws the line LINE on the current axis, by clipping 
   with the current axis.

   drawLine3d(LINE, PARAM, VALUE) accepts parameter/value pairs, like 
   for plot function. Color of the line can also be given as a single 
   parameter.

   drawLine3d(AX,...) plots into AX instead of GCA.
   
   H = drawLine3d(...) returns a handle to the created line object. 
   If the line is not clipped by the axis, function returns -1.

   Example
     % draw a sphere together with the three main axes
     figure; hold on;
     drawSphere([40 30 20 30]);
     view(3); axis equal; axis([-20 80 -20 80 -20 80])
     drawLine3d([0 0 0   1 0 0], 'k');
     drawLine3d([0 0 0   0 1 0], 'k');
     drawLine3d([0 0 0   0 0 1], 'k');
     light;


   See also 
     lines3d, createLine3d, clipLine3d, drawRay3d, drawEdge3d




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
DRAWLINE3D Draw a 3D line clipped by the current axes.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 427
DRAWPARTIALPATCH Draw surface patch, with 2 parametrized surfaces.

   usage:
   drawSurfPatch(u, v, zuv)
   where u, v, and zuv are three matrices the same size, u and
   corresponding to each parameter, and zuv being equal to a function of u
   and v.

   drawSurfPatch(u, v, zuv, p0)
   If p0 is specified, two lines with u(p0(1)) and v(p0(2)) are drawn on
   the surface


   See also 
     drawPolyline3d




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 66
DRAWPARTIALPATCH Draw surface patch, with 2 parametrized surfaces.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 971
DRAWPLANE3D Draw a plane clipped by the current axes.

   drawPlane3d(PLANE) draws a plane of the format:
       [x0 y0 z0  dx1 dy1 dz1  dx2 dy2 dz2]

   drawPlane3d(..., 'PropertyName', PropertyValue,...)
   Sets the value of the specified patch property. Multiple property
   values can be set with a single statement. See the function "patch" for
   details. 

   drawPlane3d(AX,...) 
   plots into AX instead of GCA.

   H = drawPlane3d(...) 
   returns a handle H to the patch object.

   Example
     % Draw a plane, its main axes, and its normal vector
     p0 = [1 2 3];
     v1 = [1 0 1];
     v2 = [0 -1 1];
     plane = [p0 v1 v2];
     figure; axis([-10 10 -10 10 -10 10]); hold on; view(3);
     drawPlane3d(plane);
     drawLine3d([p0 v1]);
     drawLine3d([p0 v2]);
     set(gcf, 'renderer', 'zbuffer');
     vn = crossProduct3d(v1, v2);
     drawVector3d(p0, vn);

   See also 
     planes3d, createPlane, clipPlane, patch



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
DRAWPLANE3D Draw a plane clipped by the current axes.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 811
DRAWPLATFORM Draw a rectangular platform with a given size.

   drawPlatform(PLANE, SIZ) draws a rectangular platform with the
   dimensions specified by SIZ. If SIZ contains only one value instead of 
   two the platform will be quadratic.

   drawPlatform(...,'PropertyName',PropertyValue,...) sets the value of 
   the specified patch property. Multiple property values can be set with
   a single statement. See function patch for details.

   drawPlane3d(AX,...) plots into AX instead of GCA.

   H = drawPlatform(...) returns a handle H to the patch object.

   Example

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

   See also 
   planes3d, createPlane, patch



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 59
DRAWPLATFORM Draw a rectangular platform with a given size.



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


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

   drawPoint3d(X, Y, Z) 
   will draw points defined by coordinates X, Y and Z. 
   X, Y and Z 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.

   drawPoint3d(AX,...) plots into AX instead of GCA.

   H = drawPoint3d(...) returns a handle H to the line object

   Example
     % generate points on a 3D circle
     pts = circleToPolygon([40 30 20], 120);
     mat = eulerAnglesToRotation3d([30 20 10]);
     pts3d = transformPoint3d([pts zeros(120,1)],mat);
     figure; drawPoint3d(pts3d, 'b.');
     view(3); axis equal;

   See also 
     points3d, clipPoints3d, drawPoint




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 46
DRAWPOINT3D 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: 800
DRAWPOLYGON3D Draw a 3D polygon specified by a list of vertex coords.

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

   drawPolygon3d(PX, PY, PZ);
   specifies coordinates in separate numeric vectors (either row or
   columns)

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

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

   Example
     t = linspace(0, 2*pi, 100)';
     xt = 10 * cos(t);
     yt = 5 * sin(t);
     zt = zeros(100,1);
     pol = [xt yt zt];
     figure; hold on; axis equal;
     fillPolygon3d(pol, 'c'); 
     drawPolygon3d(pol, 'linewidth', 2, 'color', 'k');
 
   See also 
   polygons3d, fillPolygon3d, drawPolyline3d




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 69
DRAWPOLYGON3D Draw a 3D polygon specified by a list of vertex coords.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 918
DRAWPOLYLINE3D Draw a 3D polyline specified by a list of vertex coords.

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

   drawPolyline3d(PX, PY, PZ);
   specifies coordinates in separate numeric vectors (either row or
   columns)

   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 returns a handle to the list of created line objects.

   Example
     t = linspace(0, 2*pi, 100)';
     xt = 10 * cos(t);
     yt = 5 * sin(t);
     zt = zeros(1,100);
     figure; drawPolyline3d(xt, yt, zt, 'b');
 
   See also 
   polygons3d, drawPolygon3d, fillPolygon3d




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 71
DRAWPOLYLINE3D Draw a 3D polyline specified by a list of vertex coords.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 737
DRAWRAY3D Draw a 3D ray on the current axis.

   drawRay3d(RAY)
   With RAY having the syntax: [x0 y0 z0 dx dy dz], draws the ray starting
   from point (x0 y0 z0) and going to direction (dx dy dz), clipped with
   the current window axis.

   drawRay3d(RAY, PARAMS, VALUE)
   Can specify parameter name-value pairs to change draw style.

   H = drawRay3d(...)
   Returns the handle of the line object.

   Example
     % generate 50 random 3D rays
     origin = [29 28 27];
     v = rand(50, 3);
     v = v - centroid(v);
     ray = [repmat(origin, size(v,1),1) v];
     % draw the rays in the current axis
     figure; axis equal; axis([0 50 0 50 0 50]); hold on; view(3);
     drawRay3d(ray);

   See also 
     drawLine3d, clipRay3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
DRAWRAY3D Draw a 3D ray on the current axis.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1864
DRAWSPHERE 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.

   Example
   % Draw four spheres with different centers
     figure(1); clf; hold on;
     drawSphere([10 10 30 5]);
     drawSphere([20 30 10 5]);
     drawSphere([30 30 30 5]);
     drawSphere([30 20 10 5]);
     view([-30 20]); axis equal; l = light;

   % Draw sphere with different settings
     figure(1); clf;
     drawSphere([10 20 30 10], 'linestyle', ':', 'facecolor', 'r');
     axis([0 50 0 50 0 50]); axis equal;
     l = light;

   % The same, but changes style using graphic handle
     figure(1); clf;
     h = drawSphere([10 20 30 10]);
     set(h, 'linestyle', ':');
     set(h, 'facecolor', 'r');
     axis([0 50 0 50 0 50]); axis equal;
     l = light;
   
   % Draw a sphere with high resolution
     figure(1); clf;
     h = drawSphere([10 20 30 10], 'nPhi', 360, 'nTheta', 180);
     l = light; view(3);


   See also 
   spheres, circles3d, sphere, drawEllipsoid



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 35
DRAWSPHERE 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: 618
DRAWSPHERICALEDGE Draw an edge on the surface of a sphere.

   drawSphericalEdge(SPHERE, EDGE)
   EDGE is given as a couple of 3D coordinates corresponding to edge
   extremities. The shortest spherical edge joining the two extremities is
   drawn on the current axes.

   drawSphericalEdge(AX, ...)
   Specifies the handle of the axis to use for drawing.


   Example
     figure; hold on; axis equal; drawSphere([0 0 0 1]); view(3);
     p1 = [0 -1 0];  p2 = [0 0 1];
     drawSphericalEdge([0 0 0 1], [p1 p2], 'LineWidth', 2)

   See also 
     drawSphericalPolygon, drawSphere, drawCircleArc3d




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 58
DRAWSPHERICALEDGE 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: 502
DRAWSPHERICALPOLYGON Draw a spherical polygon.

   output = drawSphericalPolygon(input)

   Example
     % Draw a non convex spherical polygon on the surface of a sphere
     sphere = [0 0 0 1];
     poly = [0 -1 0;0 0 1; [-1 0 1]/sqrt(2); [-1 -1 1]/sqrt(3); [-1 -1 0]/sqrt(2)];
     figure; hold on; axis equal; drawSphere([0 0 0 1]); view(3);
     drawSphericalPolygon(sphere, poly, 'LineWidth', 2, 'color', 'b')

   See also 
     drawSphere, drawSphericalTriangle, drawSphericalEdge




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



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


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

   drawSphericalTriangle(SPHERE, PT1, PT2, PT3);
   Draws the spherical triangle defined by the three input 3D points and
   the reference sphere. 
   Points are given as 3D points, and are projected onto the sphere. The
   order of the points is not relevant. 

   drawSphericalTriangle(SPHERE, PT1, PT2, PT3, OPTIONS);
   Allows to specify plot options for spherical edges, in the form of
   parameter name-value pairs.

   Example
     % Draw a sphere and a spherical triangle on it
     s = [0 0 0 2];
     pts = [1 0 0;0 -1 0;0 0 1];
     drawSphere(s); hold on;
     drawSphericalTriangle(s, pts(1,:), pts(2,:), pts(3,:), 'linewidth', 2);
     view(3); axis equal;

   See also 
   drawSphere, fillSphericalTriangle, drawSphericalPolygon,
   drawSphericalEdge




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



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 435
DRAWSURFPATCH Draw a 3D surface patch, with 2 parametrized surfaces.

   usage:
   drawSurfPatch(u, v, zuv)
   where u, v, and zuv are three matrices the same size, u and
   corresponding to each parameter, and zuv being equal to a function of u
   and v.

   drawSurfPatch(u, v, zuv, p0)
   If p0 is specified, two lines with u(p0(1)) and v(p0(2)) are drawn on
   the surface, and corresponding tangent are also shown.





# name: <cell-element>
# type: sq_string
# elements: 1
# length: 68
DRAWSURFPATCH Draw a 3D surface patch, with 2 parametrized surfaces.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 897
DRAWTORUS 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).

   drawTorus(..., PNAME, PVALUE)
   Specifies a set of parameter name-value pairs. Parameter names include
   plitting options ('facecolor', 'linestyle'...), or options specific to
   torus:
   'nPhi'      number of meridians used to draw the torus (default is 60).
   'nTheta'    number of parallels used to draw the torus (default is 60).


   Example
     % draw sample torus
     figure;
     drawTorus([50 50 50 30 10 30 45]);
     axis equal; view([95 10]); light;

   See also 
   drawEllipsoid, revolutionSurface, torusMesh




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 33
DRAWTORUS 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: 515
DRAWVECTOR3D Draw vector at a given position.

   drawVector3d(POS, VECT)
   Draws the vector VECT starting at the position POS. Both VECT and POS
   are N-by-3 arrays.

   drawVector3d(..., PNAME, PVALUE)
   Specifies additional optional parameters that will be given to the
   quiver3 function.

   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 
     vectors3d, quiver3




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



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 357
EDGELENGTH3D Return the length of a 3D edge.

   L = edgeLength3D(EDGE);  
   Returns the length of a 3D edge, with following representation:
   [x1 y1 z1 x2 y2 z2].

   Example
     p1 = [1 1 1];
     p2 = [3 4 5];
     edge = createEdge3d(p1, p2);
     edgeLength3d(edge)
     ans =
         5.3852
   
   See also 
     edges3d, createEdge3d, drawEdge3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
EDGELENGTH3D Return the length of a 3D edge.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 425
EDGETOLINE3D Convert a 3D edge to a 3D straight line.

   LINE = edgeToLine3d(EDGE)
   Returns the 3D straight line containing the 3D edge EDGE.
   EDGE is represented as [X1 Y1 Z1  X2 Y2 Z2]
   LINE is represented as [X0 Y0 Z0  DX DY DZ]

   Example
       edge = [3 4 5  4 6 8];
       line = edgeToLine3d(edge)
       line = 
            3   4   5   1   2   3

   See also 
     lines3d, edges3d, edgeToLine, lineToEdge3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
EDGETOLINE3D Convert a 3D edge to a 3D straight line.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 437
EDGES3D  Description of functions operating on 3D edges.

   A 3D edge is represented by the coordinates of its extremities:
   EDGE = [X1 Y1 Z1  X2 Y2 Z2];

   A set of 3D edges is represented by a N-by-6 array, each row
   representing an edge.

   See also 
   lines3d, edges2d, createEdge3d, edgeLength3d
   intersectEdgePlane, edgeToLine3d, edgeToLine3d, clipEdge3d, midPoint3d
   distancePointEdge3d, drawEdge3d, drawSphericalEdge



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



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 921
ELLIPSOIDSURFACEAREA  Approximated surface area of an ellipsoid.

   S = ellipsoidSurfaceArea(ELLI)
   Computes an approximation of the surface area of an ellipsoid. 
   ELLI is a 1-by-9 row vector given by [XC YC ZC A B C THETA PHI PSI],
   where (XC YC ZC) is the center, (A B C) is the length of each semi axis
   and (THETA PHI PSI) representes the orientation.
   If ELLI is a 1-by-3 row vector, it is assumed to contain only the
   lengths of semi-axes.

   This functions computes an approximation of the surface area, given by:
   S = 4 * pi * ( (a^p * b^p + a^p * c^p + b^p * c^p) / 3) ^ (1/p)
   with p = 1.6075. The resulting error should be less than 1.061%.

   Example
   ellipsoidSurfaceArea

   See also 
   geom3d, ellipsePerimeter, oblateSurfaceArea, prolateSurfaceArea

   References
   * http://en.wikipedia.org/wiki/Ellipsoid
   * http://mathworld.wolfram.com/Ellipsoid.html




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 64
ELLIPSOIDSURFACEAREA  Approximated surface area of an ellipsoid.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1096
EQUIVALENTELLIPSOID Equivalent ellipsoid of a set of 3D points.

   ELL = equivalentEllipsoid(PTS)
   Compute the equivalent ellipsoid of the set of points PTS. The result
   is an ellipsoid defined by:
   ELL = [XC YC ZC  A B C  PHI THETA PSI]
   where [XC YC ZY] is the center, [A B C] are the lengths of the
   semi-axes (in decreasing order), and [PHI THETA PSI] are Euler angles
   representing  the ellipsoid orientation, in degrees.

   Example
     pts = randn(300, 3);
     pts = transformPoint3d(pts, createScaling3d([6 4 2]));
     pts = transformPoint3d(pts, createRotationOx(pi/6));
     pts = transformPoint3d(pts, createRotationOy(pi/4));
     pts = transformPoint3d(pts, createRotationOz(pi/3));
     pts = transformPoint3d(pts, createTranslation3d([5 4 3]));
     elli = equivalentEllipsoid(pts);
     figure; drawPoint3d(pts); axis equal;
     hold on; drawEllipsoid(elli, ...
         'drawEllipses', true, 'EllipseColor', 'b', 'EllipseWidth', 3);

   See also 
     spheres, drawEllipsoid, equivalentEllipse, principalAxes
     principalAxesTransform, rotation3dToEulerAngles



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 63
EQUIVALENTELLIPSOID Equivalent ellipsoid of a set of 3D points.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1776
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 "Tait-Bryan 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.
   
   ... = eulerAnglesToRotation3d(ANGLES, CONVENTION)
   CONVENTION specifies the axis rotation sequence. Default is 'ZYX'.
   Supported conventions are: 
       'ZYX','ZXY','YXZ','YZX','XYZ','XZY'
       'ZYZ','ZXZ','YZY','YXY','XZX','XYX'

   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: 70
EULERANGLESTOROTATION3D Convert 3D Euler angles to 3D rotation matrix.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 932
FILLPOLYGON3D Fill a 3D polygon specified by a list of vertex coords.

   fillPolygon3d(COORD, COLOR)
   packs coordinates in a single [N*3] array.
   COORD can also be a cell array of polygon, in this case each polygon is
   drawn using the same color.

   fillPolygon3d(PX, PY, PZ, COLOR)
   specifies coordinates in separate numeric vectors (either row or
   columns)

   fillPolygon3d(..., PARAM, VALUE)
   allows to specify some drawing parameter/value pairs as for the plot
   function.

   H = fillPolygon3d(...) 
   also returns a handle to the list of created patch objects. 

   Example
     t = linspace(0, 2*pi, 100)';
     xt = 10 * cos(t);
     yt = 5 * sin(t);
     zt = zeros(100,1);
     poly = [xt yt zt];
     figure; hold on; axis equal; fillPolygon3d(poly, 'c'); 
     drawPolygon3d(poly, 'linewidth', 2, 'color', 'k');
 
   See also 
   polygons3d, drawPolygon3d, drawPolyline3d




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 69
FILLPOLYGON3D Fill a 3D polygon specified by a list of vertex coords.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 213
FILLSPHERICALPOLYGON  Fill a spherical polygon.

   fillSphericalPolygon(SPHERE, POLY, GERM)


   Example
   fillSphericalPolygon

   See also 
   drawSphericalPolygon, fillSphericalTriangle, drawSphere



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
FILLSPHERICALPOLYGON  Fill a spherical polygon.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 182
FILLSPHERICALTRIANGLE Fill a triangle on a sphere.

   fillSphericalTriangle(SPHERE, PT1, PT2, PT3);


   See also 
   fillSphericalPolygon, drawSphericalTriangle, drawSphere



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 50
FILLSPHERICALTRIANGLE Fill a triangle on a sphere.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 876
FITAFFINETRANSFORM3D Compute the affine transform that best register two 3D point sets.

   TRANS = fitAffineTransform3d(REF, SRC)
   Returns the affine transform matrix that minimizes the distance between
   the reference point set REF and the point set SRC after transformation.
   Both REF and SRC must by N-by-3 arrays with the same number of rows,
   and the points must be in correspondence.
   The function minimizes the sum of the squared distances:
   CRIT = sum(distancePoints3d(REF, transformPoint3d(PTS, TRANSFO)).^2);

   Example
     N = 50;
     pts = rand(N, 3)*10;
     trans = createRotationOx([5 4 3], pi/4);
     pts2 = transformPoint3d(pts, trans);
     pts3 = pts2 + randn(N, 3)*2;
     fitted = fitAffineTransform3d(pts, pts2);
   

   See also 
     transforms3d, transformPoint3d, transformVector3d,
     fitAffineTransform2d, registerPoints3dAffine




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
FITAFFINETRANSFORM3D Compute the affine transform that best register two 3D p...



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1179
FITCIRCLE3D Fit a 3D circle to a set of points.

   [FITTEDCIRCLE, CIRCLENORMAL, RESIDUALS] = fitCircle3d(PTS)

   Example
     % points on a 2d circle with noise
     nop = randi([5 50],1,1);
     radius = randi([5 25],1,1);
     points2d = circleToPolygon([0 0 radius], nop);
     points2d(1,:) = [];
     points2d = points2d + rand(size(points2d));
     points2d(:,3)=rand(length(nop),1);
     % apply random rotation and translation
     [theta, phi] = randomAngle3d;
     theta = rad2deg(theta);
     phi = rad2deg(phi);
     tfm = eulerAnglesToRotation3d(phi, theta, 0);
     trans = randi([-250 250],3,1);
     tfm(1:3,4)=trans;
     points3d = awgn(transformPoint3d(points2d, tfm),1);
     % fit 3d circle
     [fittedCircle, circleNormal] = fitCircle3d(points3d);
     % plot 3d points and 3d circle
     figure('Color','w'); hold on; axis equal tight; view(3);
     xlabel('X');ylabel('Y');zlabel('Z');
     drawPoint3d(points3d)
     drawCircle3d(fittedCircle, 'k')
     drawVector3d(fittedCircle(1:3), circleNormal*fittedCircle(4))

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



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
FITCIRCLE3D Fit a 3D circle to a set of points.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1118
FITELLIPSE3D Fit an ellipse to a set of points.

   FITTEDELLIPSE3D = fitEllipse3d(POINTS) returns the 3D ellipse fitted to
   a set of 3D points.

   Example
     % Create 2D ellipse
     n=randi([10,100]);
     a=randi([30,50]); b=randi([5,25]);
     [x, y] = ellipseToPolygon([0 0 a b 0 ], n);
     % 3D and add some noise
     points = [x, y, zeros(n,1)];
     points=points+(-1+2*rand(n,3));
     % Create a random transformation
     center=-100+200*rand(1,3);
     phi=randi([-180,180]); theta=randi([-180,180]); psi=randi([-180,180]);
     TFM=eulerAnglesToRotation3d(phi, theta, psi, 'ZYZ'); TFM(1:3,4)=center';
     points = transformPoint3d(points, TFM);
     % Fit ellipse
     [fE, fTFM] = fitEllipse3d(points, 'vis', true);
     % Plot reconstructed ellipse
     [fx, fy] = ellipseToPolygon([0 0 fE(4), fE(5) 0 ], n);
     fpoints = transformPoint3d([fx, fy, zeros(n,1)], fTFM);
     drawEllipse3d(fE,'k')
   
   See also 
     drawEllipse3d, ellipseToPolygon

   Source
     Nested functions are part of the quadfit toolbox by Levente Hunyadi
     https://mathworks.com/matlabcentral/fileexchange/45356



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 47
FITELLIPSE3D Fit an ellipse to a set of points.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 767
FITLINE3D Fit a 3D line to a set of points.

   LINE = fitLine3d(PTS)

   Example
     pts = randn(300, 3);
     pts = transformPoint3d(pts, createScaling3d([6 4 2]));
     pts = transformPoint3d(pts, createRotationOx(pi/6));
     pts = transformPoint3d(pts, createRotationOy(pi/4));
     pts = transformPoint3d(pts, createRotationOz(pi/3));
     pts = transformPoint3d(pts, createTranslation3d([5 4 3]));
     elli = equivalentEllipsoid(pts);
     figure; drawPoint3d(pts); axis equal;
     hold on; drawEllipsoid(elli, ...
         'drawEllipses', true, 'EllipseColor', 'b', 'EllipseWidth', 3);
     line = fitLine3d(pts);
     drawLine3d(line, 'color', 'm', 'LineWidth', 4);

   See also 
     lines3d, equivalentEllipsoid, fitPlane, fitLine




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 43
FITLINE3D Fit a 3D line to a set of points.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 741
FITPLANE  Fit a 3D plane to a set of points.

   PLANE = fitPlane(POINTS)

   Example
     pts = randn(300, 3);
     pts = transformPoint3d(pts, createScaling3d([6 4 2]));
     pts = transformPoint3d(pts, createRotationOx(pi/6));
     pts = transformPoint3d(pts, createRotationOy(pi/4));
     pts = transformPoint3d(pts, createRotationOz(pi/3));
     pts = transformPoint3d(pts, createTranslation3d([5 4 3]));
     elli = equivalentEllipsoid(pts);
     figure; drawPoint3d(pts); axis equal;
     hold on; drawEllipsoid(elli, ...
         'drawEllipses', true, 'EllipseColor', 'b', 'EllipseWidth', 3);
     plane = fitPlane(pts);
     drawPlane3d(plane, 'm');

   See also 
     planes3d, equivalentEllipsoid, fitLine3d




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 44
FITPLANE  Fit a 3D plane to a set of points.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1218
FITSPHERE Fit a sphere to 3D points using the least squares approach.

   SPHERE = fitSphere(PTS)
   Fits the equation of a sphere in Cartesian coordinates to the N-by-3 
   array PTS using the least squares approach. The sphere is represented 
   by its center [xc yc zc] and its radius r: SPHERE = [xc yc zc r].

   SPHERE = fitSphere(X, Y, Z)
   Use three vectors X, Y and Z with the length N instead of a the 
   N-by-3 array PTS.
  
   [SPHERE, RESIDUALS] = fitSphere(...)
   Additionally outputs the residuals in the radial direction.

   Example:
     center=-100 + 200*rand(1,3);
     radius = randi([10 100]);
     [x,y,z]=drawSphere(center, radius);
     x=x+rand(size(x)); y=y+rand(size(y)); z=z+rand(size(z));
     sampleIdx = randi(numel(x),[1,randi([4, numel(x)])]);
     x=x(sampleIdx); y=y(sampleIdx); z=z(sampleIdx);
     sphere = fitSphere(x,y,z);
     figure('color','w'); hold on; axis equal tight; view(3)
     drawPoint3d(x,y,z)
     drawSphere(sphere,'FaceAlpha',0.5)
   
   See also 
     createSphere, drawSphere, intersectLineSphere, intersectPlaneSphere

   Source:
     Levente Hunyadi - Fitting quadratic curves and surfaces:
     https://de.mathworks.com/matlabcentral/fileexchange/45356



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 69
FITSPHERE Fit a sphere to 3D points using the least squares approach.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 942
GEODESICCYLINDER Computes the geodesic between two points on a cylinder.

   [GEO, GEOLENGTH] = geodesicCylinder(PTS, CYL) computes the geodesic 
   between the two points PTS projected onto the infinite cylinder CYL.  
   PTS is a 2-by-3 array, and CYL is a 1-by-7 array. Result is the 
   polyline GEO (500-by-3 array) [500 = default] containing the  
   coordinates of the geodesic between two projected points. GEOLENGTH 
   contains the analytical length of the geodesic.

   [~, ~, CONGEO, CONGEOLENGTH] = geodesicCylinder(PTS, CYL) provides the
   conjugate geodesic and its analytical length.

   ... = geodesicCylinder(PTS, CYL, 'n', N) defines the number of points
   representing the geodesic and conjugate geodesic.

   Example
       demoGeodesicCylinder

   See also 
     drawCylinder, projPointOnCylinder

   Source
     Based on the script 'geodesic.m' by Lei Wang
     https://mathworks.com/matlabcentral/fileexchange/6522




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 72
GEODESICCYLINDER Computes the geodesic between two points on a cylinder.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 6
hypot3


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 405
HYPOT3 Diagonal length of a cuboidal 3D box .

   h = hypot3(a, b, c)
   computes the quantity sqrt(a^2 + b^2 + c^2), by avoiding roundoff
   errors.

   Example
     % Compute diagonal of unit cube
     hypot3(1, 1, 1)
     ans =
          1.7321

     % Compute more complicated diagonal
     hypot3(3, 4, 5)
     ans = 
         7.0711
          
   See also 
   hypot, vectorNorm3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 45
HYPOT3 Diagonal length of a cuboidal 3D box .



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 294
INTERSECTBOXES3D Intersection of two 3D bounding boxes.

   RES = intersectBoxes3d(BOX1, BOX2)

   Example
   box1 = [5 20 5 30 10 50];
   box2 = [0 15 0 15 0 20];
   intersectBoxes3d(box1, box2)
   ans = 
       5 15 5 15 10 20

   See also 
   boxes3d, drawBox3d, mergeBoxes3d




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 55
INTERSECTBOXES3D Intersection of two 3D bounding boxes.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 728
INTERSECTEDGEPLANE Return intersection point between a plane and a edge.

   PT = intersectEdgePlane(edge, PLANE) return the intersection point of
   the given edge and the given plane.
   PLANE : [x0 y0 z0 dx1 dy1 dz1 dx2 dy2 dz2]
   edge :  [x1 y1 z1 x2 y2 z2]
   PT :    [xi yi zi]
   If EDGE and PLANE are parallel, return [NaN NaN NaN].
   If EDGE (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.
   
   Example:
   edge = [5 5 -1 5 5 1];
   plane = [0 0 0 1 0 0 0 1 0];
   intersectEdgePlane(edge, plane)     % should return [5 5 0].
   ans =
       5   5   0

   See also 
   planes3d, intersectLinePlane, createLine3d, createPlane




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 72
INTERSECTEDGEPLANE Return intersection point between a plane and a edge.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1466
INTERSECTEDGEPOLYGON3D Intersection point of a 3D edge segment and a 3D polygon.

   INTER = intersectEdgePolygon3d(EDGE, POLY)
   Compute coordinates of intersection point between the 3D edge EDGE and
   the 3D polygon POLY. EDGE is a 1-by-6 row vector containing source and
   target positions of the edge, POLY is a Nv-by-3 array containing
   coordinates of 3D polygon vertices.
   INTER is a 1-by-3 row vector containing coordinates of intersection
   point, or [NaN NaN NaN] if edge and polygon do not intersect.

   INTERS = intersectEdgePolygon3d(EDGES, POLY)
   If EDGES is a N-by-6 array representing several edges, the result
   INTERS is a N-by-3 array containing coordinates of intersection of each
   edge with the polygon.

   [INTER, INSIDE] = intersectEdgePolygon3d(EDGE, POLY)
   Also return a N-by-1 boolean array containing TRUE if the corresponding
   edge contains the intersection point.

   Example
     % Compute intersection between a 3D edge and a 3D triangle
     pts3d = [3 0 0; 0 6 0;0 0 9];
     edge1 = [0 0 0 3 6 9];
     inter = intersectEdgePolygon3d(edge1, pts3d)
     inter =
           1   2   3

     % keep only valid intersections with several edges
     pts3d = [3 0 0; 0 6 0;0 0 9];
     edges = [0 0 0 3 6 9;10 0 0 10 2 3];
     [inter, inside] = intersectEdgePolygon3d(edges, pts3d);
     inter(inside, :)
     ans = 
           1   2   3

   See also 
   intersectLinePolygon, intersectRayPolygon3d, intersectLinePlane




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
INTERSECTEDGEPOLYGON3D Intersection point of a 3D edge segment and a 3D polyg...



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1466
INTERSECTLINECYLINDER Compute intersection points between a line and a cylinder.

   POINTS = intersectLineCylinder(LINE, CYLINDER)
   Returns intersection points between a line and a cylinder.

   Input parameters:
   LINE     = [x0 y0 z0  dx dy dz]
   CYLINDER = [x1 y1 z1 x2 y2 z2 R]

   Output:
   POINTS   = [x1 y1 z1 ; x2 y2 z2]

   POINTS = intersectLineCylinder(LINE, CYLINDER, 'checkBounds', B)
   Where B is a boolean (TRUE by default), check if the points are within
   the bounds defined by the two extreme points. If B is false, the
   cylinder is considered to be infinite.

   Example
     % Compute intersection between simple vertical cylinder and line
     line = [60 60 60 1 2 3];
     cylinder = [20 50 50 80 50 50 30];
     points = intersectLineCylinder(line, cylinder);
     % Display the different shapes
     figure;
     drawCylinder(cylinder);
     hold on; light;
     axis([0 100 0 100 0 100]);
     drawLine3d(line);
     drawPoint3d(points, 'ko');
     

     % Compute intersections when one of the points is outside the
     % cylinder
     line = [80 60 60 1 2 3];
     cylinder = [20 50 50 80 50 50 30];
     intersectLineCylinder(line, cylinder)
     ans = 
           67.8690   35.7380   23.6069

   
   See also 
   lines3d, intersectLinePlane, drawCylinder, cylinderSurfaceArea

   References
   See the link:
   http://www.gamedev.net/community/forums/topic.asp?topic_id=467789




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 80
INTERSECTLINECYLINDER Compute intersection points between a line and a cylind...



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1081
INTERSECTLINEPLANE 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: 68
INTERSECTLINEPLANE Intersection point between a 3D line and a plane.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1496
INTERSECTLINEPOLYGON3D Intersection point of a 3D line and a 3D polygon.

   INTER = intersectLinePolygon3d(LINE, POLY)
   Compute coordinates of intersection point between the 3D line LINE and
   the 3D polygon POLY. LINE is a 1-by-6 row vector containing origin and
   direction vector of the line, POLY is a Np-by-3 array containing
   coordinates of 3D polygon vertices.
   INTER is a 1-by-3 row vector containing coordinates of intersection
   point, or [NaN NaN NaN] if line and polygon do not intersect.

   INTERS = intersectLinePolygon3d(LINES, POLY)
   If LINES is a N-by-6 array representing several lines, the result
   INTERS is a N-by-3 array containing coordinates of intersection of each
   line with the polygon.

   [INTER INSIDE] = intersectLinePolygon3d(LINE, POLY)
   Also return a N-by-1 boolean array containing TRUE if the corresponding
   polygon contains the intersection point.

   Example
     % Compute intersection between a 3D line and a 3D triangle
     pts3d = [3 0 0; 0 6 0;0 0 9];
     line1 = [0 0 0 3 6 9];
     inter = intersectLinePolygon3d(line1, pts3d)
     inter =
           1   2   3

     % keep only valid intersections with several lines
     pts3d = [3 0 0; 0 6 0;0 0 9];
     lines = [0 0 0 1 2 3;10 0 0 1 2 3];
     [inter inside] = intersectLinePolygon3d(line1, pts3d);
     inter(inside, :)
     ans = 
           1   2   3

   See also 
   intersectLinePolygon, intersectRayPolygon3d, intersectLinePlane




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 72
INTERSECTLINEPOLYGON3D Intersection point of a 3D line and a 3D polygon.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1348
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: 75
INTERSECTLINESPHERE Return intersection points between a line and a sphere.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1421
INTERSECTLINETRIANGLE3D Intersection point of a 3D line and a 3D triangle.

   POINT = intersectLineTriangle3d(LINE, TRI)
   Compute coordinates of the intersection point between the line LINE and
   the triangle TRI.
   LINE is a 1-by-6 row vector given as: [X0 Y0 Z0 DX DY DZ]
   TRI is given either as a row vector [X1 Y1 Z1 X2 Y2 Z2 X3 Y3 Z3], or as
   a 3-by-3 array, each row containing coordinates of one of the triangle
   vertices.
   The result is a 1-by-3 array containing coordinates of the intesection
   point, or [NaN NaN NaN] if the line and the triangle do not intersect.

   [POINT POS] = intersectLineTriangle3d(LINE, TRI)
   Also returns the position of the intersection point on the line, or NaN
   if the line and the supporting plane of the triangle are parallel.

   [POINT POS ISINSIDE] = intersectLineTriangle3d(LINE, TRI)
   Also returns a boolean value, set to true if the line and the triangle
   intersect each other. Can be used for testing validity of result.

   Example
     line = [1 1 0 0 0 1];
     tri = [0 0 5;5 0 0;0 5 0];
     intersectLineTriangle3d(line, tri)
     ans = 
         1   1   3

   See also 
   points3d, lines3d, polygons3d, intersectRayPolygon3d,
   distancePointTriangle3d

   References
   Algorithm adapted from SoftSurfer Ray/Segment-Triangle intersection
   http://softsurfer.com/Archive/algorithm_0105/algorithm_0105.htm




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 74
INTERSECTLINETRIANGLE3D Intersection point of a 3D line and a 3D triangle.



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


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

   CIRC = intersectPlaneSphere(PLANE, 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: 77
INTERSECTPLANESPHERE Return intersection circle between a plane and a sphere.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 488
INTERSECTPLANES Return intersection line between 2 planes in space.

   LINE = intersectPlanes(PLANE1, PLANE2)
   Returns the straight line belonging to both planes.
   PLANE:  [x0 y0 z0  dx1 dy1 dz1  dx2 dy2 dz2]
   LINE:   [x0 y0 z0  dx dy dz]
   In case of parallel planes, returns line with NaN values.

   LINE = intersectPlanes(PLANE1, PLANE2, TOL)
   Also specifies the tolerance for detecting parallel planes.

   See also 
   planes3d, lines3d, intersectLinePlane




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 67
INTERSECTPLANES Return intersection line between 2 planes in space.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1505
INTERSECTRAYPOLYGON3D Intersection point of a 3D ray and a 3D polygon.

   INTER = intersectRayPolygon3d(RAY, POLY)
   Compute coordinates of intersection point between the 3D ray RAY and
   the 3D polygon POLY. RAY is a 1-by-6 row vector containing origin and
   direction vector of the ray, POLY is a Np-by-3 array containing
   coordinates of 3D polygon vertices.
   INTER is a 1-by-3 row vector containing coordinates of intersection
   point, or [NaN NaN NaN] if ray and polygon do not intersect.

   INTERS = intersectRayPolygon3d(RAYS, POLY)
   If RAYS is a N-by-6 array representing several rays, the result
   INTERS is a N-by-3 array containing coordinates of intersection of each
   ray with the polygon.

   [INTER INSIDE] = intersectRayPolygon3d(RAY, POLY)
   Also return a N-by-1 boolean array containing TRUE if both the polygon
   and the corresponding ray contain the intersection point.

   Example
     % Compute intersection between a 3D ray and a 3D triangle
     pts3d = [3 0 0; 0 6 0;0 0 9];
     ray1 = [0 0 0 3 6 9];
     inter = intersectRayPolygon3d(ray1, pts3d)
     inter =
           1   2   3

     % keep only valid intersections with several rays
     pts3d = [3 0 0; 0 6 0;0 0 9];
     rays = [0 0 0 3 6 9;10 0 0 1 2 3;3 6 9 3 6 9];
     [inter inside] = intersectRayPolygon3d(rays, pts3d);
     inter(inside, :)
     ans = 
           1   2   3

   See also 
   intersectRayPolygon, intersectLinePolygon3d, intersectLineTriangle3d




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 70
INTERSECTRAYPOLYGON3D Intersection point of a 3D ray and a 3D polygon.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 472
INTERSECTTHREEPLANES Return intersection point between 3 planes in space.

   LINE = intersectThreePlanes(PLANE1, PLANE2, PLANE3)
   Returns the point or straight line belonging to three planes.
   PLANE:  [x0 y0 z0  dx1 dy1 dz1  dx2 dy2 dz2]
   POINT:  [x0 y0 z0]
   IF rank of the coefficient matrix r1 = 3 and
   Rank of the augmented matrix r2 = 3 return point
   Otherwise returns point with NaN values.

   See also 
   planes3d, intersectPlanes, intersectLinePlane



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 73
INTERSECTTHREEPLANES Return intersection point between 3 planes in space.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 511
ISBELOWPLANE Test whether a point is below or above a plane.

   BELOW = isBelowPlane(POINT, PLANE)
   where POINT is given as coordinate row vector [XP YP ZP], and PLANE is
   given as a row containing initial point and 2 direction vectors, 
   return TRUE if POINT lie below PLANE.

   Example
   isBelowPlane([1 1 1], createPlane([1 2 3], [1 1 1]))
   ans =
       1
   isBelowPlane([3 3 3], createPlane([1 2 3], [1 1 1]))
   ans =
       0

   See also 
   planes3d, points3d, linePosition3d, planePosition



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 60
ISBELOWPLANE Test whether a point is below or above a plane.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 499
ISCOPLANAR Tests input points for coplanarity in 3-space.

 COPL = isCoplanar(PTS)
 Tests the coplanarity of the input points in array PTS. Input array must
 be 4-by-3, each row containing coordinate of one point.

 COPL = isCoplanar(PTS, TOLERANCE)
 Specifies the tolerance value used for checking coplanarity. Default is
 zero.
 
 
 Example: 
   iscoplanar([1 2 -2; -3 1 -14; -1 2 -6; 1 -2 -8], eps)

 Source:
   https://fr.mathworks.com/matlabcentral/fileexchange/46-iscoplanar-m



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 57
ISCOPLANAR Tests input points for coplanarity in 3-space.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 723
ISPARALLEL3D Check parallelism of two 3D vectors.

   B = isParallel3d(V1, V2)
   where V1 and V2 are 2 [1x3] arrays, returns 1 if the vectors are
   parallels, and 0 otherwise.

   Also works when V1 and V2 are two [Nx3] arrays with same number of
   rows. In this case, return a [Nx1] array containing 1 at the positions
   of parallel vectors.

   Also works when one of V1 or V2 is scalar and the other one is [Nx3]
   array, in this case return [Nx1] results.

   B = isPerpendicular3d(V1, V2, TOL)
   Specifies the absolute tolerance (default is 1e-14).

   Example
   isParallel3d([1 2 1], [2 4 2])
   ans =
       1

   isParallel3d([1 2 1], [1 3 2])
   ans =
       0

   See also 
   vectors3d, isPerpendicular3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 49
ISPARALLEL3D Check parallelism of two 3D vectors.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 742
ISPERPENDICULAR3D Check orthogonality of two 3D vectors.

   B = isPerpendicular3d(V1, V2)
   where V1 and V2 are 2 [1x3] arrays, returns 1 if the vectors are
   orthogonal, and 0 otherwise.

   Also works when V1 and V2 are two [Nx3] arrays with same number of
   rows. In this case, return a [Nx1] array containing 1 at the positions
   of parallel vectors.

   Also works when one of V1 or V2 is scalar and the other one is [Nx3]
   array, in this case return [Nx1] results.

   B = isPerpendicular3d(V1, V2, TOL)
   Specifies the absolute tolerance (default is 1e-14).


   Example
   isPerpendicular3d([1 0 0], [0 1 0])
   ans =
       1

   isPerpendicular3d([1 0 1], [1 0 0])
   ans =
       0

   See also 
   vectors3d, isParallel3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 56
ISPERPENDICULAR3D Check orthogonality of two 3D vectors.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 328
ISPLANE Check if input is a plane.

   B = isPlane(PLANE) where PLANE should be a plane or multiple planes

   Example
     isPlane([...
         0 0 0 1 0 0 0 1 0;...
         0 0 0 1 0 0 -1 0 0;...
         0 0 0 1i 0 0 -1 0 0;...
         0 0 0 nan 0 0 0 1 0;...
         0 0 0 inf 0 0 0 1 0])

   See also 
   createPlane3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 34
ISPLANE Check if input is a plane.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 731
ISPOINTINELLIPSOID Check if a point is located inside a 3D ellipsoid.

   output = isPointInEllipsoid(input)

   Example
     % create an ellipsoid
     elli = [10 20 30   50 30 10   5 10 0];
     display it
     figure; hold on;
     drawEllipsoid(elli, 'FaceColor', 'g', 'FaceAlpha', .5, ...
         'drawEllipses', true, 'EllipseColor', 'b', 'EllipseWidth', 3);
     view(3); axis equal;
     % check for a point inside the ellipsoid
     p1 = [20 30 35];
     b1 = isPointInEllipsoid(p1, elli)
     ans = 
         1
     % check for a point outside the ellipsoid
     p2 = [-20 10 25];
     b2 = isPointInEllipsoid(p2, elli)
     ans = 
         0
   

   See also 
     equivalentEllipsoid, drawEllipsoid, isPointInEllipse




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 69
ISPOINTINELLIPSOID Check if a point is located inside a 3D ellipsoid.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2005
ISPOINTONEDGE3D Test if a 3D point belongs to an edge.

   Usage
   B = isPointOnEdge3d(POINT, EDGE)
   B = isPointOnEdge3d(POINT, EDGE, TOL)

   Description
   B = isPointOnEdge3d(POINT, EDGE)
   with POINT being [xp yp zp], and EDGE being [x1 y1 z1  x2 y2 z2],
   returns TRUE if the point is located on the edge, and FALSE otherwise.

   B = isPointOnEdge3d(POINT, EDGE, TOL)
   Specify an optilonal tolerance value TOL. The tolerance is given as a
   fraction of the norm of the edge direction vector. Default is 1e-14. 

   B = isPointOnEdge3d(POINTARRAY, EDGE)
   B = isPointOnEdge3d(POINT, EDGEARRAY)
   When one of the inputs has several rows, return the result of the test
   for each element of the array tested against the single parameter.

   B = isPointOnEdge3d(POINTARRAY, EDGEARRAY)
   When both POINTARRAY and EDGEARRAY have the same number of rows,
   returns a column vector with the same number of rows.
   When the number of rows are different and both greater than 1, returns
   a Np-by-Ne matrix of booleans, containing the result for each couple of
   point and edge.

   Examples
   % create a point array
   points = [10 10 20;15 10 20; 30 10 20];
   % create an edge array
   vertices = [10 10 20;20 10 20;20 20 20;10 20 20];
   edges = [vertices vertices([2:end 1], :)];

   % Test one point and one edge
   isPointOnEdge3d(points(1,:), edges(1,:))
   ans = 
       1
   isPointOnEdge3d(points(3,:), edges(1,:))
   ans = 
       0

   % Test one point and several edges
   isPointOnEdge3d(points(1,:), edges)'
   ans =
        1     0     0     1

   % Test several points and one edge
   isPointOnEdge3d(points, edges(1,:))'
   ans =
        1     1     0

   % Test N points and N edges
   isPointOnEdge3d(points, edges(1:3,:))'
   ans =
        1     0     0

   % Test NP points and NE edges
   isPointOnEdge3d(points, edges)
   ans =
        1     0     0     1
        1     0     0     0
        0     0     0     0


   See also 
   edges3d, points3d, isPointOnLine3d




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 54
ISPOINTONEDGE3D Test if a 3D point belongs to an edge.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 565
ISPOINTONLINE3D Test if a 3D point belongs to a 3D line.

   B = isPointOnLine3d(POINT, LINE)
   with POINT being [xp yp zp], and LINE being [x0 y0 z0 dx dy dz].
   Returns 1 if point lies on the line, 0 otherwise.

   If POINT is an N-by-3 array of points, B is a N-by-1 array of booleans.

   If LINE is a N-by-6 array of lines, B is a N-by-1 array of booleans.

   B = isPointOnLine3d(POINT, LINE, TOL)
   Specifies the tolerance used for testing location on 3D line.

   See also 
   lines3d, distancePointLine3d, linePosition3d, isPointOnLine




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 56
ISPOINTONLINE3D Test if a 3D point belongs to a 3D line.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1036
ISPOLYGON3D Check if input is a 3d polygon.

   B = isPolygon3d(POL) where POL should be a 3d polygon.

   Example:
     % 2d polygon
     pol = [6	7	6	6	5	4	3	2	2	1	2	2	6	6 ...
            NaN  3	3	4	5	5	3	3	NaN	4	5	5	4;
            4	4	5	6	6	7	6	6	4	2	2	2	1	4 ...
    	     NaN  4	5	5	4	4	3	4	NaN	3	2	3	3]';
     % 3d random transformation
     phi=-360+720*rand;
     theta=-360+720*rand;
     psi=-360+720*rand;
     % 3d polygon
     pol3d = transformPolygon3d(pol, eulerAnglesToRotation3d(phi, theta, psi));
     disp('Valid 3d polygon')
     disp(['Is 3d polygon?: ' num2str(isPolygon3d(pol3d))])
     disp('2d polygon, not 3d')
     disp(['Is 3d polygon?: ' num2str(isPolygon3d(pol))])
     pol3d2 = pol3d; pol3d2(12) = pol3d2(12)+1e-12;
     disp('Not all points in same plane')
     disp(['Is 3d polygon?: ' num2str(isPolygon3d(pol3d2))])
     disp('Not real, contains complex elements')
     pol3d3 = pol3d; pol3d3(12) = pol3d3(12)+4i;
     disp(['Is 3d polygon?: ' num2str(isPolygon3d(pol3d3))])

   See also 
   polygons3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 43
ISPOLYGON3D Check if input is a 3d polygon.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 897
ISTRANSFORM3D Check if input is a affine transformation matrix.

   A = isTransform3d(TRANS) where TRANS should be a transformation matrix.
   The function accepts transformations 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]
   
   If the transformation matrix should only contain rotation and
   translation without reflection, scaling, shearing, ... set 'rotation'
   to true. Default is false.

   Example
     rot = ...
         createRotationOx(rand*2*pi)*...
         createRotationOy(rand*2*pi)*...
         createRotationOx(rand*2*pi);
     trans = rot*createTranslation3d(rand(1,3));
     isTransform3d(trans, 'rot', true)

   See also 
   composeTransforms3d, createBasisTransform3d, recenterTransform3d,
   transformPoint3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 63
ISTRANSFORM3D Check if input is a affine transformation matrix.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 865
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: 72
LINEPOSITION3D Return the position of a 3D point projected on a 3D line.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 494
LINETOEDGE3D Convert a 3D straight line to a 3D finite edge.

   EDGE = lineToEdge3d(LINE)
   Returns the edge with same origin as the line LINE, and with second
   extremity corresponding to the addition of line origin and direction.
   LINE is represented as [X0 Y0 Z0  DX DY DZ]
   EDGE is represented as [X1 Y1 Z1  X2 Y2 Z2]

   Example
     line = [3 4 5  1 2 3];
     edge = lineToEdge3d(line)
     edge =
          3   4   5   4   6   8

   See also 
     lines3d, edges3d, edgeToLine3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 60
LINETOEDGE3D Convert a 3D straight line to a 3D finite edge.



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


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

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

   See also 
   createLine3d, distancePointLine3d, isPointOnLine3d, linePosition3d 
   intersectLinePlane, distanceLines3d, parallelLine3d, projPointOnLine3d
   clipLine3d, fitLine3d, drawLine3d, transformLine3d
   edgeToLine3d, lineToEdge3d
   



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



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 351
MEDIANPLANE Create a plane in the middle of 2 points.

   PLANE = medianPlane(P1, P2)
   Creates a plane in the middle of 2 points.
   PLANE is perpendicular to line (P1 P2) and contains the midpoint of P1
   and P2.
   The direction of the normal of PLANE is the same as the vector from P1
   to P2.

   See also 
   planes3d, createPlane



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
MEDIANPLANE Create a plane in the middle of 2 points.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 301
MERGEBOXES3D Merge 3D boxes, by computing their greatest extent.

   BOX = mergeBoxes3d(BOX1, BOX2);

   Example
   box1 = [5 20 5 30 10 50];
   box2 = [0 15 0 15 0 20];
   mergeBoxes3d(box1, box2)
   ans = 
       0 20 0 30 0 50


   See also 
   boxes3d, drawBox3d, intersectBoxes3d




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 64
MERGEBOXES3D Merge 3D boxes, by computing their greatest extent.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 990
MIDPOINT3D Middle point of two 3D points or of a 3D edge.

   MID = midPoint3d(P1, P2)
   Compute the middle point of the two points P1 and P2.

   MID = midPoint3d(EDGE)
   Compute the middle point of the edge given by EDGE.
   EDGE has the format: [X1 Y1 Z1 X2 Y2 Z2], and MID has the format 
   [XMID YMID ZMID], 
   with XMID = (X1+X2)/2, YMID = (Y1+Y2)/2 and ZMID = (Z1+Z2)/2.

   [MIDX MIDY] = midPoint3d(...)
   Return the result as two separate variables or arrays.

   Works also when EDGE is a N-by-6 array, in this case the result is a
   N-by-3 array containing the midPoint3d of each edge.


   Example
   P1 = [10 20 30];
   P2 = [30 40 50];
   % edge input
   midPoint3d([P1 P2])
   ans =
       20  30  40

   % two points input
   midPoint3d(P1, P2)
   ans =
       20  30  40

   % three outputs
   [xm ym zm] = midPoint3d(P1, P2)
   xm =
       20  
   ym = 
       30  
   zm = 
       40

   See also 
     edges3d, points3d




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 57
MIDPOINT3D Middle point of two 3D points or of a 3D edge.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 254
NORMALIZELINE3D Normalizes the direction vector of a 3D line.

   LINE2 = normalizeVector3d(LINE);
   Returns the normalization of the direction vector of the line, such 
   that ||LINE2(4:6)|| = 1. 

   See also 
     normalizePlane, normalizeVector3d




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 61
NORMALIZELINE3D Normalizes the direction vector of a 3D line.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 640
NORMALIZEPLANE 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: 62
NORMALIZEPLANE Normalize parametric representation of a plane.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 449
NORMALIZEVECTOR3D Normalize a 3D vector to have norm equal to 1.

   V2 = normalizeVector3d(V);
   Returns the normalization of vector V, such that ||V|| = 1. Vector V is
   given as a row vector.

   If V is a N-by-3 array, normalization is performed for each row of the
   input array.

   If V is a M-by-N-by-3 array, normalization is performed along the last
   dimension of the array.

   See also 
     vectors3d, vectorNorm3d




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 64
NORMALIZEVECTOR3D Normalize a 3D vector to have norm equal to 1.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 202
OBLATESURFACEAREA  Approximated surface area of an oblate ellipsoid.

   S = oblateSurfaceArea(R1,R2)

   Example
   oblateSurfaceArea

   See also 
   geom3d, ellipsoidSurfaceArea, prolateSurfaceArea




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 68
OBLATESURFACEAREA  Approximated surface area of an oblate ellipsoid.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1163
ORIENTEDBOX3D Object-oriented bounding box of a set of 3D points.

   OOBB = orientedBox3d(PTS)
   REturns the oriented bounding box of the collection of points in the
   N-by-3 array PTS. The result is given as:
   [XC YC ZC  L W H  PHI THETA PSI]
   where (XC,YC,ZC) corresponds to the center of the box, (L,W,H)
   corresponds to the length, width, and depth of the box, and (PHI,
   THETA, PSI) is the orientation of the box as Euler angles.

   [OOBB, ROT] = orientedBox3d(PTS)
   Also returns the rotation matrix of the point cloud, as a 3-by-3
   numeric array.

   Example
     [v, f] = sphereMesh;
     phi=-360+720*rand; theta=-360+720*rand; psi=-360+720*rand;
     angles = [phi, theta, psi];
     rotMat = eulerAnglesToRotation3d(angles);
     rotMat(1:3,4) = randi([-100,100],3,1);
     scale = [randi([7,9],1,1), randi([4,6],1,1), randi([1,3],1,1)];
     pts = transformPoint3d(bsxfun(@times, v, scale), rotMat);
     box3d = orientedBox3d(pts);
     figure; drawPoint3d(pts, '.'); 
     axis equal; xlabel('x'); ylabel('y'); zlabel('z');
     drawCuboid(box3d, 'FaceColor', 'none');

   See also 
     meshes3d, drawCuboid, rotation3dToEulerAngles



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 65
ORIENTEDBOX3D Object-oriented bounding box of a set of 3D points.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 235
PARALLELLINE3D  Create 3D line parallel to another one.

   L2 = parallelLine3d(L, P)
   Creates the 3D line L2, parallel to the line L, and containing the
   point P.

   Example

   See also 
   parallelLine, parallelPlane



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 55
PARALLELLINE3D  Create 3D line parallel to another one.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 850
PARALLELPLANE Parallel to a plane through a point or at a given distance.

   PL2 = parallelPlane(PL, PT)
   Constructs the plane parallel to plane PL and containing the point PT.

   PL2 = parallelPlane(PL, D)
   Constructs the plane parallel to plane PL, and located at the given
   signed distance D.

   Example
     % Create a plane normal to the 3D vector DIR
     dir = [3 4 5];
     plane = createPlane([3 4 5], dir);
     % Create plane at a specific distance 
     plane2 = parallelPlane(plane, 5);
     % Create a line perpendicular to both planes
     line = [2 4 1 3 4 5];
     pi1 = intersectLinePlane(line, plane);
     pi2 = intersectLinePlane(line, plane2);
     % check the distance between intersection points
     distancePoints3d(pi1, pi2)
     ans = 
         5

   See also 
   geom3d, parallelLine3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 73
PARALLELPLANE Parallel to a plane through a point or at a given distance.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 237
PLANENORMAL 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 
   geom3d, planes3d, createPlane




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 42
PLANENORMAL 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: 467
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.

   Example
     plane = [10 20 30  1 0 0  0 1 1];
     pos2d = [3 4];
     pt = planePoint(plane, pos2d)
     pt = 
           13  24   34

   See also 
   geom3d, planes3d, planePosition



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
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: 1210
PLANEPOSITION Compute position of a point on a plane.

   COORDS2D = 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 COORDS2D has the form [XP YP], with XP and YP the coordinates of
   the point in the coordinate system of the plane.

   [COORDS2D, Z] = planePosition(POINT, PLANE)
   Also returns the coordinates along the normal of the plane. When the
   point is within the plane, this coordinate should be zero.

   Example
     plane = [10 20 30  1 0 0  0 1 0];
     point = [13 24 35];
     pos = planePosition(point, plane)
     pos = 
         3   4

   Example
     % plane with non unit direction vectors
     p0 = [30 20 10]; v1 = [2 1 0]; v2 = [-2 4 0];
     plane = [p0 v1 v2];
     pts = [p0 ; p0 + v1 ; p0 + v2 ; p0 + 3 * v1 + 2 * v2];
     pos = planePosition(pts, plane)
     pos = 
          0     0
          1     0
          0     1
          3     2


   See also 
     geom3d, planes3d, points3d, planePoint




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 53
PLANEPOSITION 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: 615
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, normalizePlane, medianPlane, planeNormal, parallelPlane
   distancePointPlane, projPointOnPlane, planePosition, isBelowPlane
   intersectPlanes, intersectLinePlane, intersectEdgePlane
   dihedralAngle, planesBisector, polyhedronSlice, fitPlane, drawPlane3d
   clipConvexPolyhedronByPlane, clipPlane, transformPlane3d, isPlane
   clipMeshByPlane




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



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 868
PLANESBISECTOR Bisector plane between two other planes.
 
   BIS = planesBisector(PLANE1, PLANE2);
   Returns the planes that contains the intersection line between PLANE1 
   and PLANE2 and that bisect the dihedral angle of PLANE1 and PLANE2. 
   Note that computing the bisector of PLANE2 and PLANE1 (in that order) 
   returns the same plane but with opposite orientation.

   Example
     % Draw two planes together with their bisector
     pl1 = createPlane([3 4 5], [1 2 3]);
     pl2 = createPlane([3 4 5], [2 -3 4]);
     % compute bisector
     bis = planesBisector(pl1, pl2);
     % setup display
     figure; hold on; axis([0 10 0 10 0 10]);
     set(gcf, 'renderer', 'opengl')
     view(3);
     % draw the planes
     drawPlane3d(pl1, 'g');
     drawPlane3d(pl2, 'g');
     drawPlane3d(bis, 'b');

   See also
   planes3d, dihedralAngle, intersectPlanes




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 55
PLANESBISECTOR Bisector plane between two other planes.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 400
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, boundingBox3d
   anglePoints3d, angleSort3d, sphericalAngle
   sph2cart2, cart2sph2, cart2cyl, cyl2cart
   transformPoint3d, clipPoints3d




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



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 735
POLYGON3DNORMALANGLE Normal angle at a vertex of the 3D polygon.

   THETA = polygon3DNormalAngle(POLYGON, IND)
   where POLYGON is a set of points, and IND is index of a point in
   polygon. The function compute the angle of the normal cone localized at
   this vertex.
   If IND is a vector of indices, normal angle is computed for each vertex
   specified by IND.

   Example
   % create an equilateral triangle in space
   poly3d = [1 1 0;-1 0 1;0 -1 -1];
   % compute each normal angle
   theta = polygon3dNormalAngle(poly3d, 1:size(poly3d, 1));
   % sum of normal angles must be equal to 2*PI for simple polygons
   sum(theta)

   IMPORTANT NOTE: works only for convex angles ! ! ! !

   See also 
   polygons3d, faceNormalAngle



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 64
POLYGON3DNORMALANGLE Normal angle at a vertex of the 3D polygon.



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


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

   AREA = polygonArea3d(POLY)
   POLY is given as a N-by-3 array of vertex coordinates. The resulting
   area is positive.
   Works also for polygons given as a cell array of polygons.

   Example
     % area of a simple 3D square 
     poly = [10 30 20;20 30 20;20 40 20;10 40 20];
     polygonArea3d(poly)
     ans =
        100

     % Area of a 3D mesh
     [v f] = createCubeOctahedron;
     polygons = meshFacePolygons(v, f);
     areas = polygonArea3d(polygons);
     sum(areas)
     ans =
         18.9282

   See also 
     polygons3d, triangleArea3d, polygonArea, polygonCentroid3d



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



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 880
POLYGONCENTROID3D Centroid (or center of mass) of a polygon.

   PTC = polygonCentroid3d(POLY)
   Computes center of mass of a polygon defined by POLY. POLY is a N-by-3
   array of double containing coordinates of polygon vertices. The result
   PTC is given as a 1-by-3 numeric array.
   The algorithm assumes (1) that the vertices of the polygon are within
   the same plane and (2) that the planar projection of the polygon (on
   the embedding plane) do not self-intersect.

   PTC = polygonCentroid3d(VX, VY, VZ)
   Specifies vertex coordinates as three separate arrays.

   Example
     % compute centroid of a basic polygon
     poly = [0 0 0; 10 0 10;10 10 20;0 10 10];
     centro = polygonCentroid3d(poly)
     centro =
         5.0000    5.0000    10.0000

   See also 
     polygons3d, polygonArea3d, polygonCentroid, planePosition, planePoint




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 60
POLYGONCENTROID3D Centroid (or center of mass) of a polygon.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 566
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 
   polygonArea3d, triangleArea3d, polygonCentroid3d, polygon3dNormalAngle 
   intersectLinePolygon3d, intersectLineTriangle3d, intersectRayPolygon3d
   clipPolygonByPlane3d
   drawPolygon3d, drawPolyline3d, fillPolygon3d



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



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 769
PROJLINEONPLANE Return the orthogonal projection of a line on a plane.
 
   NEWLINE = PROJLINEONPLANE(LINE, PLANE) Returns the orthogonal
   projection of LINE or multiple lines on the PLANE.

   [..., ISORTHOGONAL] = PROJLINEONPLANE(LINE, PLANE) Also returns if the
   LINE is orthogonal to the PLANE.

   Example
     plane = [.1 .2 .3 .4 .5 .6 .7 .8 .9];
     lines = [0 .3 0 1 0 0;0  .5 .5 0 0 1;...
         .4 .1 .5 1 0 2;.2 .7 .1 0 1 0;...
         plane(1:3) planeNormal(plane)];
     [newLines, isOrthogonal] = projLineOnPlane(lines, plane);
     figure('color','w'); axis equal; view(3)
     drawLine3d(lines,'b')
     drawPlane3d(plane)
     drawLine3d(newLines(~isOrthogonal,:), 'r')

   See also 
   planes3d, lines3d, intersectLinePlane, projPointOnPlane



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 70
PROJLINEONPLANE Return the orthogonal projection of a line on a plane.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 474
PROJPOINTONCIRCLE3D Project a 3D point onto a 3D circle.

   PT2 = projPointOnCircle3d(PT, CIRCLE).
   Computes the projection of 3D point PT onto the 3D circle CIRCLE. 
   
   Point PT is a N-by-3 array, and CIRCLE is a 1-by-7 array.
   Result PT2 is a N-by-3 array, containing coordinates of projections of
   PT onto the circle CIRCLE. 

   See also 
   projPointOnLine3d, projPointOnPlane

   Source
   https://www.geometrictools.com/Documentation/DistanceToCircle3.pdf



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 56
PROJPOINTONCIRCLE3D Project a 3D point onto a 3D circle.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 620
PROJPOINTONCYLINDER Project a 3D point onto a cylinder.

   PTPROJ = projPointOnCircle3d(PT, CYLINDER).
   Computes the projection of 3D point PT onto the CYLINDER. 
   
   Point PT is a 1-by-3 array, and CYLINDER is a 1-by-7 array.
   Result PTPROJ is a 1-by-3 array, containing the coordinates of the
   projection of PT onto the CYLINDER.

   PTPROJ = projPointOnCircle3d(..., OPT)
   with OPT = 'open' (0) (default) or 'closed' (1), specify if the bases 
   of the cylinder should be included.

   Example
       demoProjPointOnCylinder

   See also 
       projPointOnLine3d, projPointOnPlane, projPointOnCircle3d




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 55
PROJPOINTONCYLINDER Project a 3D point onto a cylinder.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 530
PROJPOINTONLINE3D Project a 3D point orthogonally onto a 3D line.

   PT2 = projPointOnLine3d(PT, LINE).
   Computes the (orthogonal) projection of 3D point PT onto the 3D line
   LINE. 
   
   Function works also for multiple points and lines. In this case, it
   returns multiple points.
   Point PT1 is a N-by-3 array, and LINE is a N-by-6 array.
   Result PT2 is a N-by-3 array, containing coordinates of orthogonal
   projections of PT1 onto lines LINE. 


   See also 
   projPointOnLine, distancePointLine3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 65
PROJPOINTONLINE3D Project a 3D point orthogonally onto a 3D line.



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


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

   PT2 = projPointOnPlane(PT1, PLANE);
   Compute the (orthogonal) projection of point PT1 onto the plane PLANE,
   given as [X0 Y0 Z0  VX1 VY1 VZ1  VX2 VY2 VZ2] (origin point, first
   direction vector, second directionvector).
   
   The function is fully vectorized, in that multiple points may be
   projected onto multiple planes in a single call, returning multiple
   points. With the exception of the second dimension (where
   SIZE(PT1,2)==3, and SIZE(PLANE,2)==9), each dimension of PT1 and PLANE
   must either be equal or one, similar to the requirements of BSXFUN. In
   basic usage, 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. In
   vectorised usage, PT1 is an [N*3*M*P...] matrix, and PLANE is an
   [X*9*Y...] matrix, where (N,X), (M,Y), etc, are either equal pairs, or
   one of the two is one.

   See also 
   planes3d, points3d, planePosition, intersectLinePlane



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



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 204
PROLATESURFACEAREA  Approximated surface area of a prolate ellipsoid.

   S = prolateSurfaceArea(R1,R2)

   Example
   prolateSurfaceArea

   See also 
   geom3d, ellipsoidSurfaceArea, oblateSurfaceArea




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 69
PROLATESURFACEAREA  Approximated surface area of a prolate ellipsoid.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 774
RANDOMANGLE3D Return a 3D angle uniformly distributed on unit sphere.

   usage
   [THETA PHI] = randomAngle3d
   Generate an angle unformly distributed on the surface of the unit
   sphere.

   "Mathematical" convention is used: theta is the colatitude (angle with
   vertical axis, 0 for north pole, +pi for south pole, pi/2 for points at
   equator) with z=0. 
   phi is the same as matlab cart2sph: angle from Ox axis, counted
   positively counter-clockwise.

   [THETA PHI] = randomAngle3d(N)
   generates N random angles (N is a scalar). The result is a N-by-2
   array.

   Example:
     % Draw some points on the surface of a sphere
     figure;
     drawSphere; hold on;
     drawPoint3d(pts, '.');
     axis equal;

   See also 
   angles3d, sph2cart2, cart2sph2



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 69
RANDOMANGLE3D Return a 3D angle uniformly distributed on unit sphere.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 672
RANDOMPOINTINBOX3D Generate random point(s) within a 3D box.

   PTS = randomPointInBox3d(BOX)
   Generate a random point within the 3D box BOX. The result is a 1-by-3
   row vector.

   PTS = randomPointInBox3d(BOX, N)
   Generates N points within the box. The result is a N-by-3 array.

   BOX has the format:
   BOX = [XMIN XMAX YMIN YMAX ZMIN ZMAX].

   Example
     % draw points within a box
     box = [10 40 20 60 30 50];
     pts =  randomPointInBox3d(box, 500);
     figure(1); hold on;
     drawBox3d(box);
     drawPoint3d(pts, '.');
     axis('equal');
     axis([0 100 0 100 0 100]);
     view(3);

   See also 
   points3d, boxes3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 60
RANDOMPOINTINBOX3D Generate random point(s) within a 3D box.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 772
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: 69
RECENTERTRANSFORM3D Change the fixed point of an affine 3D transform.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 698
REGISTERPOINTS3DAFFINE Fit 3D affine transform using iterative algorithm.

   TRANS = registerPoints3dAffine(POINTS, TARGET)
   Computes the affine transform that maps the shape defines by POINTS
   onto the shape defined by the points TARGET. Both POINTS and TARGET are
   N-by-3 array of point coordinates, not necessarily the same size.
   The result TRANS is a 4-by-4 affine transform.

   TRANS = registerPoints3dAffine(POINTS, TARGET, NITER)
   Specifies the number of iterations for the algorithm.

   [TRANS, POINTS2] = registerPoints3dAffine(...)
   Also returns the set of transformed points.

   Example
     registerPoints3dAffine

   See also 
     transforms3d, fitAffineTransform3d




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 73
REGISTERPOINTS3DAFFINE Fit 3D affine transform using iterative algorithm.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 2224
REGISTERPOINTS3D_ICP Computes rigid transform between two 3D point sets.

   TRANSFO = registerPoints3d_icp(SOURCE, TARGET)
   Computes the 3D rigid transform (composed of a rotation and a
   translation) that maps the shape defined by the SOURCE points onto the
   shape defined by the the TARGET points, using the "Iterated Closest
   Point" (ICP) algorithm. 
   Both SOURCE and TARGET are N-by-3 numeric arrays representing point
   coordinates, not necessarily the same size. 
   The result TRANSFO is a 4-by-4 matrix representing the final affine
   transform.  

   TRANSFO = registerPoints3d_icp(SOURCE, TARGET, NITERS)
   Specifies the number of iterations of the algorithm (default is 10).

   [TRANSFO, RES] = registerPoints3d_icp(...)
   Also returns the result of the transform applied to SOURCE points.

   [TRANSFO, RES, ER] = registerPoints3d_icp(...)
   Also returns the error according to the iteration, as a NITERS+1 array
   of numeric values.

   [TRANSFO, RES, ER, T] = registerPoints3d_icp(...)
   Also returns the time spent for each iteration, as a NITERS+1 array
   of numeric values. T(1) corresponds to initialization time, T(end)
   corresponds to the total processing time

   [...] = registerPoints3d_icp(..., PNAME, PVALUE)
   Specifies additional optional arguments are parameter name-value pairs.
   Supported parameter names are:
   * 'Matching'    The point matching method. Can be one of 'naive'
       (the slowest), 'delaunay' (use a Delaunay diagram to reduce
       computations) or 'kdTree' (use a kd-Tree data structure. This is
       usually the fastest, but requires the Statistics Toolbox).


   Example
   registerPoints3d_icp

   See also
     transforms3d, registerPoints3dAffine, pcregistericp

 Rewritten from the "icp" function, by Martin Kjer and Jakob Wilm,
 Technical University of Denmark, 2012.
 Notable differences:
 * SOURCE and TARGET input arrays are given as N-by-3 arrays (using the
   general MatGeom convention) rather than 3-by-N arrays.
 * The resulting transform is packed into a single 4-by-4 array,
   representing the affine transfom matrix in homogeneous coordinates.
 * All the options available in the original file are not managed in this
   port.




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 72
REGISTERPOINTS3D_ICP Computes rigid transform between two 3D point sets.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 306
REVERSELINE3D Return same 3D line but with opposite orientation.

   INVLINE = reverseLine(LINE);
   Returns the opposite line of LINE.
   LINE has the format [x0 y0 z0 dx dy dz], then INVLINE will have
   following parameters: [x0 y0 z0 -dx -dy -dz].

   See also 
   reverseLine, reversePlane




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 64
REVERSELINE3D Return same 3D line but with opposite orientation.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 388
REVERSEPLANE Return same 3D plane but with opposite orientation.

   IP = reversePlane(PLANE);
   Returns a plane contining the same ppints but with normal opposite to
   that of PLANE. 
   If PLANE has the format [x0 y0 z0 dx1 dy1 dz1 dx2 dy2 dz2], then IP
   will have following parameters: [x0 y0 z0 dx1 dy1 dz1 -dx2 -dy2 -dz2].

   See also 
   createPlane, reverseLine3d




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 64
REVERSEPLANE Return same 3D plane but with opposite orientation.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1553
REVOLUTIONSURFACE 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 equal;

   See also 
       surf, transformPoint3d, drawSphere, drawTorus, drawEllipsoid
       surfature (on Matlab File Exchange)




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 69
REVOLUTIONSURFACE 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: 963
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: 72
ROTATION3DAXISANDANGLE Determine axis and angle of a 3D rotation matrix.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1218
ROTATION3DTOEULERANGLES Extract Euler angles from a rotation matrix.

   [PHI, THETA, PSI] = rotation3dToEulerAngles(MAT)
   Computes Euler angles PHI, THETA and PSI (in degrees) from a 3D 4-by-4
   or 3-by-3 rotation matrix.

   ANGLES = rotation3dToEulerAngles(MAT)
   Concatenates results in a single 1-by-3 row vector. This format is used
   for representing some 3D shapes like ellipsoids.

   ... = rotation3dToEulerAngles(MAT, CONVENTION)
   CONVENTION specifies the axis rotation sequence. Default is 'ZYX'.
   Supported conventions are: 
       'ZYX','ZXY','YXZ','YZX','XYZ','XZY'
       'ZYZ','ZXZ','YZY','YXY','XZX','XYX'

   Example
   rotation3dToEulerAngles

   References
   Code from '1994 - Shoemake - Graphics Gems IV: Euler Angle Conversion:
   http://webdocs.cs.ualberta.ca/~graphics/books/GraphicsGems/gemsiv/euler_angle/EulerAngles.c
   (see rotm2eul, that is part of MATLAB's Robotics System Toolbox)
   Modified using explanations in:
   http://www.gregslabaugh.net/publications/euler.pdf
   https://www.geometrictools.com/Documentation/EulerAngles.pdf

   See also 
   transforms3d, rotation3dAxisAndAngle, createRotation3dLineAngle,
   eulerAnglesToRotation3d




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 68
ROTATION3DTOEULERANGLES Extract Euler angles from a rotation matrix.



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


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

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

   S = [theta phi 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

   Example
     xyz = sph2cart2(pi/2, 0, 10)
     xyz =
        10.0000         0    0.0000

     xyz = sph2cart2(pi/2, pi/2, 10)
     xyz =
         0.0000   10.0000    0.0000

     % check consistency with cart2sph2
     sph2cart2(cart2sph2(0.7, 0.8, 5))
     ans =
         0.7000    0.8000    5.0000

   See also 
     angles3d, cart2sph2, sph2cart, sph2cart2d, eulerAnglesToRotation3d




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 65
SPH2CART2 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: 1152
SPH2CART2D Convert spherical coordinates to cartesian coordinates in degrees.

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

   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

   Example
     xyz = sph2cart2d(90, 0, 10)
     xyz =
        10    0    0

     xyz = sph2cart2d(90, 90, 10)
     xyz =
         0   10    0

     % check consistency with cart2sph2d
     cart2sph2d(sph2cart2d(30, 40, 5))
     ans =
        30.0000   40.0000    5.0000

   See also 
     angles3d, cart2sph2d, sph2cart2, eulerAnglesToRotation3d




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 77
SPH2CART2D 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: 669
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, equivalentEllipsoid
   intersectLineSphere, intersectPlaneSphere, sphericalVoronoiDomain
   drawSphere, drawEllipsoid, fillSphericalTriangle, fillSphericalPolygon
   drawSphericalEdge, drawSphericalTriangle, drawSphericalPolygon
   



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



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1269
SPHERICALANGLE Compute angle between points on the sphere.

   ALPHA = sphericalAngle(P1, P2, P3)
   Computes angle (P1, P2, P3), i.e. the angle, measured at point P2,
   between the direction (P2, P1) and the direction (P2, P3).
   The result is given in radians, between 0 and 2*PI.

   Points are given either as [x y z] (there will be normalized to lie on
   the unit sphere), or as [phi theta], with phi being the longitude in [0
   2*PI] and theta being the elevation on horizontal [-pi/2 pi/2].


   NOTE: 
   this is an 'oriented' version of the angle computation, that is, the
   result of sphericalAngle(P1, P2, P3) equals
   2*pi-sphericalAngle(P3,P2,P1). To have the more classical relation
   (with results given betwen 0 and PI), it suffices to take the minimum
   of angle and 2*pi-angle.
   
   Examples
     % Use inputs as cartesian coordinates   
     p1 = [0 1 0];
     p2 = [1 0 0];
     p3 = [0 0 1];
     alpha = sphericalAngle(p1, p2, p3)
     alpha =
         1.5708

     % Use inputs as spherical coordinates   
     sph1 = [.1 0];
     sph2 = [0 0];
     sph3 = [0 .1];
     alphas = sphericalAngle(sph1, sph2, sph3)
     alphas =
         1.5708
 

   See also 
   geom3d, angles3d, spheres, sph2cart



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 58
SPHERICALANGLE Compute angle between points on the sphere.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 517
SPHERICALVORONOIDOMAIN Compute a spherical voronoi domain.

   POLY = sphericalVoronoiDomain(GERM, NEIGHBORS)
   GERM is a 1-by-3 row vector representing cartesian coordinates of a
   point on the unit sphere (in X, Y Z order)
   NEIGHBORS is a N-by-3 array representing cartesian coordinates of the
   germ neighbors. It is expected that NEIGHBORS contains only neighbors
   that effectively contribute to the voronoi domain.

   Example
   sphericalVoronoiDomain

   See also 
   drawSphericalPolygon



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 58
SPHERICALVORONOIDOMAIN Compute a spherical voronoi domain.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 213
SURFACECURVATURE Curvature on a surface from angle and principal curvatures.

   usage:
   KAPPA = surfaceCurvature(KAPPA1, KAPPA2, THETA)
   return the curvature KAPPA of surface with respect to direction THETA.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 76
SURFACECURVATURE Curvature on a surface from angle and principal curvatures.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 588
TRANSFORMCIRCLE3D Transform a 3D circle with a 3D affine transformation.

   CIRCLE2 = transformPlane3d(CIRCLE, TFM)

   Example
     circle = [1 1 1 2 45 45 0];
     tfm = createRotationOz(pi);
     circle2 = transformCircle3d(circle, tfm);
     figure('color','w'); hold on; axis equal tight; view(-10,25);
     xlabel('x'); ylabel('y'); zlabel('z');
     drawCircle3d(circle,'r'); drawPoint3d(circle(1:3),'r+')
     drawCircle3d(circle2,'g'); drawPoint3d(circle2(1:3),'g+')

   See also 
     transforms3d, transformPoint3d, transformVector3d, transformLine3d, 
     transformPlane3d




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 72
TRANSFORMCIRCLE3D Transform a 3D circle with a 3D affine transformation.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 478
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: 63
TRANSFORMLINE3D Transform a 3D line with a 3D affine transform.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 531
TRANSFORMPLANE3D Transform a 3D plane with a 3D affine transform.

   PLANE2 = transformPlane3d(PLANE, TRANS)

   Example
     p1 = [10 20 30];
     p2 = [30 40 50];
     p3 = [0 -10 -20];
     plane = createPlane(p1, p2, p3);
     rot = createRotationOx(p1, pi/6);
     plane2 = transformPlane3d(plane, rot);
     figure; hold on;
     axis([0 100 0 100 0 100]); view(3);
     drawPlane3d(plane, 'b');
     drawPlane3d(plane2, 'm');

   See also 
   lines3d, transforms3d, transformPoint3d, transformVector3d,
   transformLine3d




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 65
TRANSFORMPLANE3D Transform a 3D plane 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: 1512
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 3-by-3, 3-by-4, or
   4-by-4 matrix, returns the point transformed according to the affine
   transform specified by TRANS.

   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 N-by-3-by-M-by-P-by-ETC 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.
   
   MESH2 = transformPoint3d(MESH, TRANS) 
   transforms the field 'vertices' of the struct MESH and returns the same
   struct with the transformed vertices.
   (It is recommended to use the function 'transformMesh', within the
   "meshes3d" module). 

   See also 
     points3d, transforms3d, transformMesh, createTranslation3d
     createRotationOx, createRotationOy, createRotationOz, createScaling




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



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1080
TRANSFORMPOINT3D Transform a polygon with a 3D affine transform.

   TFMPOLY = transformPoint3d(POLY, TFM);
   returns the polygon TFMPOLY by transforming POLY according to the
   affine transform specified by TFM. POLY can be either 2D or 3D. If POLY
   is 2D, zeros are added as third dimension, before the transformation is
   performed.

   Example
     center=-100+200*rand(1,3);
     phi=randi([-180,180]); theta=randi([-180,180]); psi=randi([-180,180]);
     tfm=eulerAnglesToRotation3d(phi, theta, psi, 'ZYZ'); tfm(1:3,4)=center';
     r = [2.5, 2, 1];
     poly = flipud(circleToPolygon([0 0 r(1)], round(2*pi*r(1))));
     midCircle = circleToPolygon([0 0 r(2)], round(2*pi*r(2)));
     innerCircle = flipud(circleToPolygon([0 0 r(3)], round(2*pi*r(3))));
     poly = {poly, midCircle, innerCircle};
     tfmPoly = transformPolygon3d(poly, tfm);
     figure('color','w'); axis equal; view(3)
     drawPolygon3d(tfmPoly, 'r')

   See also 
     transforms3d, transformPoint3d, createTranslation3d
     createRotationOx, createRotationOy, createRotationOz, createScaling




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 64
TRANSFORMPOINT3D Transform a polygon 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: 879
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: 64
TRANSFORMVECTOR3D Transform a vector with a 3D affine transform.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1017
TRANSFORMS3D  Conventions for manipulating 3D affine transforms.

   By 'transform' we mean an affine transform. A 3D affine transform
   is represented by a 4*4 matrix. The last row of the matrix is equal to
   [0 0 0 1].

   

   Example:
   % create a translation by the vector [10 20 30]:
   T = createTranslation3d([10 20 30]);
   % Transform a basic point:
   PT1 = [4 5 6];
   PT2 = transformPoint3d(PT1, T)
   % returns:
   PT2 = 
       14   25   36

   See also 
   composeTransforms3d, createBasisTransform3d, createRotation3dLineAngle,
   createRotationAboutPoint3d, createRotationOx, createRotationOy, 
   createRotationOz, createRotationVector3d, createRotationVectorPoint3d, 
   createScaling3d, createTranslation3d, eulerAnglesToRotation3d, 
   fitAffineTransform3d, isTransform3d, recenterTransform3d, 
   rotation3dAxisAndAngle, rotation3dToEulerAngles
   transformCircle3d, transformLine3d, transformPlane3d, transformPoint3d, 
   transformPolygon3d, transformVector3d




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 64
TRANSFORMS3D  Conventions for manipulating 3D affine transforms.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 878
TRIANGLEAREA3D Area of a 3D triangle.

   AREA = triangleArea3d(P1, P2, P3)
   Computes area of the 3D triangle whose vertices are given by P1, P2 and
   P3. Each vertex is either a 1-by-3 row vector, or an array with 3
   columns, each column representing coordinate of a vertex.
   The result AREA has as many rows as the number of rows of the largest
   input array.
   Compared to polygonArea3d, this function is assumed to be faster, as it
   does not requires iteration over vertices. Moreover, it can be used to
   computes the area of several triangles simultaneously.

   AREA = triangleArea3d(PTS)
   Concatenates vertex coordinates in a 3-by-3 array. Each row of the
   array contains coordinates of one vertex.


   Example
   triangleArea3d([10 10 10], [30 10 10], [10 40 10])
   ans = 
       300

   See also 
   polygons3d, polygonArea3d



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 37
TRIANGLEAREA3D Area of a 3D triangle.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 491
VECTORANGLE3D 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, vectorNorm3d, crossProduct3d




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



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 379
VECTORNORM3D Norm of a 3D vector or of set of 3D vectors.

   N = vectorNorm3d(V);
   Returns the norm of vector V.

   When V is a N-by-3 array, compute norm for each vector of the array.
   Vectors are given as rows. Result is then a N-by-1 array.

   NOTE: Computes only the Euclidean norm.

   See also 
     vectors3d, normalizeVector3d, vectorAngle3d, hypot3




# name: <cell-element>
# type: sq_string
# elements: 1
# length: 57
VECTORNORM3D Norm of a 3D vector or of set of 3D vectors.



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


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 412
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-by-3 arrays, with the coordinates
   of each vector on a row.


   See also 
   vectorNorm3d, normalizeVector3d, crossProduct3d, vectorAngle3d
   isParallel3d, isPerpendicular3d, createTranslation3d
   drawVector3d




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





