Beta
Static
fromStatic
fromStatic
fromBeta
Constructs a cap with the given center and surface area. Note that the area can also be interpreted as the solid angle subtended by the cap (because the sphere has unit radius). A negative area yields an empty cap; an area of 4*π or more yields a full cap.
Static
fromStatic
fromStatic
fromBeta
centerBeta
radBeta
Reports whether this cap is equal to the other cap within the given tolerance.
Beta
Returns the surface area of the Cap on the unit sphere.
Beta
Computes a covering of the Cap. In general the covering consists of at most 4 cells except for very large caps, which may need up to 6 cells. The output is not sorted.
Beta
Returns the true centroid of the cap multiplied by its surface area. The result lies on the ray from the origin through the cap's center, but it is not unit length. Note that if you just want the "surface centroid", i.e. the normalized result, then it is simpler to call CENTER_POINT.
The reason for multiplying the result by the cap area is to make it easier to compute the centroid of more complicated shapes. The centroid of a union of disjoint regions can be computed simply by adding their centroid results. Caveat: for caps that contain a single point (i.e., zero radius), this method always returns the origin (0, 0, 0). This is because shapes with no area don't affect the centroid of a union whose total area is positive.
Beta
Returns the complement of the interior of the cap. A cap and its complement have the same boundary but do not share any interior points. The complement operator is not a bijection because the complement of a singleton cap (containing a single point) is the same as the complement of an empty cap.
Beta
Returns a new cap expanded by the given angle. If the cap is empty, it returns an empty cap.
Beta
Returns the height of the cap. This is the distance from the center point to the cutoff plane.
Beta
Reports whether this cap's interior intersects the other cap.
Beta
Reports whether the cap is empty, i.e. it contains no points.
Beta
Reports whether the cap is full, i.e. it contains all points.
Beta
Reports whether the Cap is considered valid.
Beta
Returns the cap radius as an Angle. Note that the cap angle is stored internally as a ChordAngle, so this method requires a trigonometric operation and may yield a slightly different result than the value passed to Cap.fromCenterAngle.
Beta
Returns a string representation of an object.
Static
emptyStatic
fullStatic
radiusBeta
Converts an Angle into the height of the cap.
Cap represents a disc-shaped region defined by a center and radius. Technically this shape is called a "spherical cap" (rather than disc) because it is not planar; the cap represents a portion of the sphere that has been cut off by a plane. The boundary of the cap is the circle defined by the intersection of the sphere and the plane. For containment purposes, the cap is a closed set, i.e. it contains its boundary.
For the most part, you can use a spherical cap wherever you would use a disc in planar geometry. The radius of the cap is measured along the surface of the sphere (rather than the straight-line distance through the interior). Thus a cap of radius π/2 is a hemisphere, and a cap of radius π covers the entire sphere.
The center is a point on the surface of the unit sphere. (Hence the need for it to be of unit length.)
A cap can also be defined by its center point and height. The height is the distance from the center point to the cutoff plane. There is also support for "empty" and "full" caps, which contain no points and all points respectively.
Here are some useful relationships between the cap height (h), the cap radius (r), the maximum chord length from the cap's center (d), and the radius of cap's base (a).
h = 1 - Math.cos(r) = 2 * Math.sin^2(r/2) d^2 = 2 * h = a^2 + h^2
The zero value of Cap is an invalid cap. Use emptyCap to get a valid empty cap.
incomplete