more rot doc tweaks

This commit is contained in:
Adrian Mariano 2021-03-09 16:47:26 -05:00
parent 3334f00b70
commit 6f9ea55bc8

View file

@ -329,16 +329,16 @@ function up(z=0, p) = move([0,0,z],p=p);
// rot([X,Y,Z], <cp>, <reverse>) {...} // rot([X,Y,Z], <cp>, <reverse>) {...}
// rot(a, v, <cp>, <reverse>) {...} // rot(a, v, <cp>, <reverse>) {...}
// rot(from, to, <a>, <reverse>) {...} // rot(from, to, <a>, <reverse>) {...}
// Usage: Get Transformation Matrix // Usage: As a Function to transform data in `p`
// pts = rot(a, <cp=>, <reverse=>, <planar=>);
// pts = rot([X,Y,Z], <cp=>, <reverse=>, <planar=>);
// pts = rot(a, v, <cp=>, <reverse=>, <planar=>);
// pts = rot(from=, to=, <a=>, <reverse=>, <planar=>);
// Usage: As a Function
// pts = rot(a, p=, <cp=>, <reverse=>); // pts = rot(a, p=, <cp=>, <reverse=>);
// pts = rot([X,Y,Z], p=, <cp=>, <reverse=>); // pts = rot([X,Y,Z], p=, <cp=>, <reverse=>);
// pts = rot(a, v, p=, <cp=>, <reverse=>); // pts = rot(a, v, p=, <cp=>, <reverse=>);
// pts = rot(<a>, from=, to=, p=, <reverse=>); // pts = rot(<a>, from=, to=, p=, <reverse=>);
// Usage: As a Function to return a transform matrix
// M = rot(a, <cp=>, <reverse=>, <planar=>);
// M = rot([X,Y,Z], <cp=>, <reverse=>, <planar=>);
// M = rot(a, v, <cp=>, <reverse=>, <planar=>);
// M = rot(from=, to=, <a=>, <reverse=>, <planar=>);
// //
// Topics: Affine, Matrices, Transforms, Rotation // Topics: Affine, Matrices, Transforms, Rotation
// See Also: xrot(), yrot(), zrot(), affine2d_zrot(), affine3d_xrot(), affine3d_yrot(), affine3d_zrot(), affine3d_rot_by_axis(), affine3d_rot_from_to() // See Also: xrot(), yrot(), zrot(), affine2d_zrot(), affine3d_xrot(), affine3d_yrot(), affine3d_zrot(), affine3d_rot_by_axis(), affine3d_rot_from_to()
@ -364,7 +364,7 @@ function up(z=0, p) = move([0,0,z],p=p);
// * Called as a function without a `p` argument, and `planar` is false, returns the affine3d rotational matrix. // * Called as a function without a `p` argument, and `planar` is false, returns the affine3d rotational matrix.
// //
// Arguments: // Arguments:
// a = Scalar angle or vector of XYZ rotation angles to rotate by, in degrees. If `planar` is true and `p` is not given, then `a` must be a finite scalar. Default: `0` // a = Scalar angle or vector of XYZ rotation angles to rotate by, in degrees. If `planar` is true or if `p` holds 2d data, or if you use the `from` and `to` arguments then `a` must be a scalar. Default: `0`
// v = vector for the axis of rotation. Default: [0,0,1] or UP // v = vector for the axis of rotation. Default: [0,0,1] or UP
// --- // ---
// cp = centerpoint to rotate around. Default: [0,0,0] // cp = centerpoint to rotate around. Default: [0,0,0]
@ -372,7 +372,7 @@ function up(z=0, p) = move([0,0,z],p=p);
// to = Target vector for vector-based rotations. // to = Target vector for vector-based rotations.
// reverse = If true, exactly reverses the rotation, including axis rotation ordering. Default: false // reverse = If true, exactly reverses the rotation, including axis rotation ordering. Default: false
// planar = If called as a function, this specifies if you want to work with 2D points. // planar = If called as a function, this specifies if you want to work with 2D points.
// p = If called as a function, this contains a point or list of points to rotate. // p = If called as a function, this contains data to rotate: a point, list of points, bezier patch or VNF.
// //
// Example: // Example:
// #cube([2,4,9]); // #cube([2,4,9]);
@ -453,9 +453,9 @@ function rot(a=0, v, cp, from, to, reverse=false, planar=false, p, _m) =
// //
// Usage: As Module // Usage: As Module
// xrot(a, <cp=>) ... // xrot(a, <cp=>) ...
// Usage: Rotate Points // Usage: As a function to rotate points
// rotated = xrot(a, p, <cp=>); // rotated = xrot(a, p, <cp=>);
// Usage: Get Rotation Matrix // Usage: As a function to return rotation matrix
// mat = xrot(a, <cp=>); // mat = xrot(a, <cp=>);
// //
// Topics: Affine, Matrices, Transforms, Rotation // Topics: Affine, Matrices, Transforms, Rotation
@ -473,7 +473,7 @@ function rot(a=0, v, cp, from, to, reverse=false, planar=false, p, _m) =
// //
// Arguments: // Arguments:
// a = angle to rotate by in degrees. // a = angle to rotate by in degrees.
// p = If called as a function, this contains a point or list of points to rotate. // p = If called as a function, this contains data to rotate: a point, list of points, bezier patch or VNF.
// --- // ---
// cp = centerpoint to rotate around. Default: [0,0,0] // cp = centerpoint to rotate around. Default: [0,0,0]
// //
@ -519,7 +519,7 @@ function xrot(a=0, p, cp) = rot([a,0,0], cp=cp, p=p);
// //
// Arguments: // Arguments:
// a = angle to rotate by in degrees. // a = angle to rotate by in degrees.
// p = If called as a function, this contains a point or list of points to rotate. // p = If called as a function, this contains data to rotate: a point, list of points, bezier patch or VNF.
// --- // ---
// cp = centerpoint to rotate around. Default: [0,0,0] // cp = centerpoint to rotate around. Default: [0,0,0]
// //
@ -545,9 +545,9 @@ function yrot(a=0, p, cp) = rot([0,a,0], cp=cp, p=p);
// //
// Usage: As Module // Usage: As Module
// zrot(a, <cp=>) ... // zrot(a, <cp=>) ...
// Usage: Rotate Points // Usage: As Function to rotate points
// rotated = zrot(a, p, <cp=>); // rotated = zrot(a, p, <cp=>);
// Usage: Get Rotation Matrix // Usage: As Function to return rotation matrix
// mat = zrot(a, <cp=>); // mat = zrot(a, <cp=>);
// //
// Topics: Affine, Matrices, Transforms, Rotation // Topics: Affine, Matrices, Transforms, Rotation
@ -565,7 +565,7 @@ function yrot(a=0, p, cp) = rot([0,a,0], cp=cp, p=p);
// //
// Arguments: // Arguments:
// a = angle to rotate by in degrees. // a = angle to rotate by in degrees.
// p = If called as a function, this contains a point or list of points to rotate. // p = If called as a function, this contains data to rotate: a point, list of points, bezier patch or VNF.
// --- // ---
// cp = centerpoint to rotate around. Default: [0,0,0] // cp = centerpoint to rotate around. Default: [0,0,0]
// //
@ -591,9 +591,9 @@ function zrot(a=0, p, cp) = rot(a, cp=cp, p=p);
// //
// Usage: As Module // Usage: As Module
// xyrot(a, <cp=>) ... // xyrot(a, <cp=>) ...
// Usage: Rotate Points // Usage: As a Function to rotate points
// rotated = xyrot(a, p, <cp=>); // rotated = xyrot(a, p, <cp=>);
// Usage: Get Rotation Matrix // Usage: As a Function to get rotation matrix
// mat = xyrot(a, <cp=>); // mat = xyrot(a, <cp=>);
// //
// Topics: Affine, Matrices, Transforms, Rotation // Topics: Affine, Matrices, Transforms, Rotation
@ -610,7 +610,7 @@ function zrot(a=0, p, cp) = rot(a, cp=cp, p=p);
// //
// Arguments: // Arguments:
// a = angle to rotate by in degrees. // a = angle to rotate by in degrees.
// p = If called as a function, this contains a point or list of points to rotate. // p = If called as a function, this contains data to rotate: a point, list of points, bezier patch or VNF.
// --- // ---
// cp = centerpoint to rotate around. Default: [0,0,0] // cp = centerpoint to rotate around. Default: [0,0,0]
// //
@ -635,9 +635,9 @@ function xyrot(a=0, p, cp) = rot(a=a, v=[1,1,0], cp=cp, p=p);
// //
// Usage: As Module // Usage: As Module
// xzrot(a, <cp=>) ... // xzrot(a, <cp=>) ...
// Usage: Rotate Points // Usage: As Function to rotate points
// rotated = xzrot(a, p, <cp=>); // rotated = xzrot(a, p, <cp=>);
// Usage: Get Rotation Matrix // Usage: As Function to return rotation matrix
// mat = xzrot(a, <cp=>); // mat = xzrot(a, <cp=>);
// //
// Topics: Affine, Matrices, Transforms, Rotation // Topics: Affine, Matrices, Transforms, Rotation
@ -654,7 +654,7 @@ function xyrot(a=0, p, cp) = rot(a=a, v=[1,1,0], cp=cp, p=p);
// //
// Arguments: // Arguments:
// a = angle to rotate by in degrees. // a = angle to rotate by in degrees.
// p = If called as a function, this contains a point or list of points to rotate. // p = If called as a function, this contains data to rotate: a point, list of points, bezier patch or VNF.
// --- // ---
// cp = centerpoint to rotate around. Default: [0,0,0] // cp = centerpoint to rotate around. Default: [0,0,0]
// //
@ -679,9 +679,9 @@ function xzrot(a=0, p, cp) = rot(a=a, v=[1,0,1], cp=cp, p=p);
// //
// Usage: As Module // Usage: As Module
// yzrot(a, <cp=>) ... // yzrot(a, <cp=>) ...
// Usage: Rotate Points // Usage: As Function to rotate points
// rotated = yzrot(a, p, <cp=>); // rotated = yzrot(a, p, <cp=>);
// Usage: Get Rotation Matrix // Usage: As Function to return rotation matrix
// mat = yzrot(a, <cp=>); // mat = yzrot(a, <cp=>);
// //
// Topics: Affine, Matrices, Transforms, Rotation // Topics: Affine, Matrices, Transforms, Rotation
@ -698,7 +698,7 @@ function xzrot(a=0, p, cp) = rot(a=a, v=[1,0,1], cp=cp, p=p);
// //
// Arguments: // Arguments:
// a = angle to rotate by in degrees. // a = angle to rotate by in degrees.
// p = If called as a function, this contains a point or list of points to rotate. // p = If called as a function, this contains data to rotate: a point, list of points, bezier patch or VNF.
// --- // ---
// cp = centerpoint to rotate around. Default: [0,0,0] // cp = centerpoint to rotate around. Default: [0,0,0]
// //
@ -723,9 +723,9 @@ function yzrot(a=0, p, cp) = rot(a=a, v=[0,1,1], cp=cp, p=p);
// //
// Usage: As Module // Usage: As Module
// xyzrot(a, <cp=>) ... // xyzrot(a, <cp=>) ...
// Usage: Rotate Points // Usage: As Function to rotate points
// rotated = xyzrot(a, p, <cp=>); // rotated = xyzrot(a, p, <cp=>);
// Usage: Get Rotation Matrix // Usage: As Function to return rotation matrix
// mat = xyzrot(a, <cp=>); // mat = xyzrot(a, <cp=>);
// //
// Topics: Affine, Matrices, Transforms, Rotation // Topics: Affine, Matrices, Transforms, Rotation
@ -742,7 +742,7 @@ function yzrot(a=0, p, cp) = rot(a=a, v=[0,1,1], cp=cp, p=p);
// //
// Arguments: // Arguments:
// a = angle to rotate by in degrees. // a = angle to rotate by in degrees.
// p = If called as a function, this contains a point or list of points to rotate. // p = If called as a function, this contains data to rotate: a point, list of points, bezier patch or VNF.
// --- // ---
// cp = centerpoint to rotate around. Default: [0,0,0] // cp = centerpoint to rotate around. Default: [0,0,0]
// //